[Home]

Summary:ASTERISK-20217: AST_EVENT_MWI does not always trigger instant MWI
Reporter:alexr1 (alexr1)Labels:
Date Opened:2012-08-12 09:29:26Date Closed:2012-08-29 09:06:57
Priority:MinorRegression?
Status:Closed/CompleteComponents:
Versions:1.8.11.1 1.8.16.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:CENTOS 5, Asterisk 1.8 compiled from source. Have applied patch from (ASTERISK-17362) https://issues.asterisk.org/jira/secure/attachment/41538/patch-chan_sip-unsolicited_notify_routing.diff.txt Attachments:
Description:This issue can be reproduced every single time.

I am using the patch @ https://issues.asterisk.org/jira/secure/attachment/41538/patch-chan_sip-unsolicited_notify_routing.diff.txt (ASTERISK-17362) to receive NOTIFY's, decode them, and set local MWI on my phones from asterisk.

Regardless of the patch, the part below is basically the same. It queues & caches an MWI event.

I have allowsubscribe=no in sip.conf. No phones are allowed to subscribe, but they all receive voicemail MWI notify's just fine. Sometimes the MWI is received immediately, but most of the time the MWI is received directly after a REGISTER or INVITE. Every time there is an active REGISTER or INVITE dialog, MWI's will be received instantly - but as soon as the 32 seconds expire and asterisk kills the dialog, the MWI's stop coming through until next register/invite.

As per my post in ASTERISK-20119 - I thought it had something to do with that. None of my phones are subscribing for MWI's, but as soon as their active dialog ends with the server, their MWI-receiving capability ends as well.

                       if ((event = ast_event_new(AST_EVENT_MWI,
                                                  AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_STR, mailbox,
                                                  AST_EVENT_IE_CONTEXT, AST_EVENT_IE_PLTYPE_STR, context,
                                                  AST_EVENT_IE_NEWMSGS, AST_EVENT_IE_PLTYPE_UINT, atoi(new),
                                                  AST_EVENT_IE_OLDMSGS, AST_EVENT_IE_PLTYPE_UINT, atoi(old),
                                                  AST_EVENT_IE_END))) {
                               ast_event_queue_and_cache(event);
                       }

I put debugs in the various functions in the event queueing thing, but it is so dizzying down there. I couldn't find the part where Asterisk actually sends the notify. Any help would be greatly appreciated.


To reproduce problem, configure the mailbox= param for a SIP peer.
1. Make a test call from the phone and hang up.
2. Alternate the mailbox status with New messages and No messages using the patch above, or by manipulating the Asterisk voicemail spool directory.
3. Keep doing it for at least 32 seconds
4. Notice Asterisk stops sending NOTIFY's at that point.
5. Make another test call. The phone will receive the latest NOTIFY
6. Repeat test etc.
Comments:By: Rusty Newton (rnewton) 2012-08-14 16:46:39.062-0500

alexr1, thanks for providing instructions on how to reproduce the issue - if you already have the setup for reproduction, can you also provide an Asterisk debug log with VERBOSE and DEBUG message types of at least level 5 captured during the issue occurring. If you can also turn on SIP debug for that log, or else provide a packet capture that would be helpful as well. https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

By: Matt Jordan (mjordan) 2012-08-29 09:06:49.783-0500

Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.  Further information can be found at http://www.asterisk.org/developers/bug-guidelines

Please provide a DEBUG log illustrating the problem using an unpatched version of Asterisk.