--- chan_iax2.ref 2004-05-20 13:35:21.000000000 -0500 +++ chan_iax2.c 2004-05-20 13:37:38.000000000 -0500 @@ -4143,8 +4143,11 @@ iax_ie_append_addr(&ied, IAX_IE_APPARENT_ADDR, &p->addr); if (!ast_strlen_zero(p->mailbox)) { msgcount = ast_app_has_voicemail(p->mailbox); - if (msgcount) - msgcount = 65535; + if (msgcount) { + int oldMsg, newMsg; + ast_app_messagecount(p->mailbox, &newMsg, &oldMsg); + msgcount = (newMsg + oldMsg); + } iax_ie_append_short(&ied, IAX_IE_MSGCOUNT, msgcount); } if (p->hascallerid)