[asterisk-bugs] [JIRA] Created: (ASTERISK-20217) AST_EVENT_MWI does not always trigger instant MWI

alexr1 (JIRA) noreply at issues.asterisk.org
Sun Aug 12 09:31:07 CDT 2012


AST_EVENT_MWI does not always trigger instant MWI
-------------------------------------------------

                 Key: ASTERISK-20217
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20217
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
    Affects Versions: 1.8.11.1, 1.8.16.0
         Environment: CENTOS 5, Asterisk 1.8 compiled from source. Have applied patch from https://issues.asterisk.org/jira/secure/attachment/41538/patch-chan_sip-unsolicited_notify_routing.diff.txt 
            Reporter: alexr1
            Severity: Minor


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 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list