Summary: | ASTERISK-12167: SIP qualify option destroys the MWI subscription, causing no new MWI messages to be sent. | ||
Reporter: | Ramon Peek-Fares (ramonpeek) | Labels: | |
Date Opened: | 2008-06-10 08:21:40 | Date Closed: | 2008-06-10 08:29:40 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Subscriptions |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) trace1.txt | |
Description: | We encountered many problems with the MWI notifications on our Snom phones. After some testing we discovered the MWI was working fine for the first 60 seconds after the initial registration of the phone and then stopped working. So I crawled a bit trough the source code and added a few log notices in chan_sip, right here; /*! \brief Check whether peer needs a new MWI notification check */ static int does_peer_need_mwi(struct sip_peer *peer) { time_t t = time(NULL); if (ast_test_flag(&peer->flags[1], SIP_PAGE2_SUBSCRIBEMWIONLY) && !peer->mwipvt) { /* We don't have a subscription */ peer->lastmsgcheck = t; /* Reset timer */ ast_log(LOG_NOTICE, "We don't have subscription for peer: %s \n ", peer->name); return FALSE; } if (!ast_strlen_zero(peer->mailbox) && (t - peer->lastmsgcheck) > global_mwitime) { ast_log(LOG_NOTICE, "Checking status change MWI for peer: %s \n ", peer->name); return TRUE; } return FALSE; } After that I could clearly see that right after a SIP OPTIONS was transmitted the asterisk could not longer find a subscription for MWI on that peer. So I set qualify=no (instead of qualify=5000) and the problem no longer occured. It seems that after sending the SIP OPTION, the mwipvt is also deleted. This is how far my search has lead me.. I'd like to search further, but don't really comprehend that part of the code. I've added a trace that clearly shows the issue. Just notice that right after the SIP OPTIONS message has been acknowlegded the MWI subscription is lost. | ||
Comments: | By: Digium Subversion (svnbot) 2008-06-10 08:27:46 Repository: asterisk Revision: 121495 U branches/1.4/channels/chan_sip.c ------------------------------------------------------------------------ r121495 | file | 2008-06-10 08:27:39 -0500 (Tue, 10 Jun 2008) | 4 lines If we are destroying a dialog only set the MWI dialog pointer on the related peer to NULL if it is the dialog currently being destroyed. (closes issue ASTERISK-12167) Reported by: ramonpeek ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=121495 By: Digium Subversion (svnbot) 2008-06-10 08:29:40 Repository: asterisk Revision: 121496 _U trunk/ U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r121496 | file | 2008-06-10 08:29:31 -0500 (Tue, 10 Jun 2008) | 12 lines Merged revisions 121495 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r121495 | file | 2008-06-10 10:34:27 -0300 (Tue, 10 Jun 2008) | 4 lines If we are destroying a dialog only set the MWI dialog pointer on the related peer to NULL if it is the dialog currently being destroyed. (closes issue ASTERISK-12167) Reported by: ramonpeek ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=121496 |