Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 286645) +++ channels/chan_sip.c (working copy) @@ -16850,7 +16850,8 @@ return 0; /* Check for messages */ - ast_app_inboxcount(peer->mailbox, &newmsgs, &oldmsgs); + if (!ast_app_inboxcount(peer->mailbox, &newmsgs, &oldmsgs)) + return 0; peer->lastmsgcheck = time(NULL);