diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index cc931f1904..af363e06ae 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -7913,10 +7913,10 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu, ***/ ast_manager_event(chan, EVENT_FLAG_CALL, "MessageWaiting", - "Mailbox: %s@%s\r\n" + "Mailbox: %s\r\n" "Waiting: %d\r\n" "New: %d\r\n" - "Old: %d\r\n", vmu->mailbox, vmu->context, ast_app_has_voicemail(ext_context, NULL), newmsgs, oldmsgs); + "Old: %d\r\n", ext_context, ast_app_has_voicemail(ext_context, NULL), newmsgs, oldmsgs); run_externnotify(vmu->context, vmu->mailbox, flag); #ifdef IMAP_STORAGE @@ -11595,15 +11595,19 @@ out: if (valid) { int new = 0, old = 0, urgent = 0; snprintf(ext_context, sizeof(ext_context), "%s@%s", vms.username, vmu->context); + ast_app_inboxcount2(ext_context, &urgent, &new, &old); /*** DOCUMENTATION Raised when a user has finished listening to their messages. ***/ - ast_manager_event(chan, EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s\r\nWaiting: %d\r\n", ext_context, has_voicemail(ext_context, NULL)); + ast_manager_event(chan, EVENT_FLAG_CALL, "MessageWaiting", + "Mailbox: %s\r\n" + "Waiting: %d\r\n" + "New: %d\r\n" + "Old: %d\r\n", ext_context, ast_app_has_voicemail(ext_context, NULL), new, old); /* Urgent flag not passwd to externnotify here */ run_externnotify(vmu->context, vmu->mailbox, NULL); - ast_app_inboxcount2(ext_context, &urgent, &new, &old); queue_mwi_event(ext_context, urgent, new, old); } #ifdef IMAP_STORAGE