[asterisk-bugs] [Asterisk 0012828]: SIP qualify option destroys the MWI subscription, causing no new MWI messages to be sent.
noreply at bugs.digium.com
noreply at bugs.digium.com
Tue Jun 10 08:27:57 CDT 2008
The following issue has been ASSIGNED.
======================================================================
http://bugs.digium.com/view.php?id=12828
======================================================================
Reported By: ramonpeek
Assigned To: file
======================================================================
Project: Asterisk
Issue ID: 12828
Category: Channels/chan_sip/Subscriptions
Reproducibility: always
Severity: major
Priority: normal
Status: assigned
Asterisk Version: 1.4.20.1
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 06-10-2008 08:21 CDT
Last Modified: 06-10-2008 08:27 CDT
======================================================================
Summary: SIP qualify option destroys the MWI subscription,
causing no new MWI messages to be sent.
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.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
06-10-08 08:27 svnbot Status new => assigned
06-10-08 08:27 svnbot Assigned To => file
======================================================================
More information about the asterisk-bugs
mailing list