[asterisk-bugs] [Asterisk 0010052]: NOTIFY race condition when state changes happen very fast

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Feb 6 01:36:29 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10052 
====================================================================== 
Reported By:                raarts
Assigned To:                oej
====================================================================== 
Project:                    Asterisk
Issue ID:                   10052
Category:                   Channels/chan_sip/Registration
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:            1.2.19  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        Yes 
Request Review:              
====================================================================== 
Date Submitted:             06-25-2007 08:47 CDT
Last Modified:              02-06-2008 01:36 CST
====================================================================== 
Summary:                    NOTIFY race condition when state changes happen very
fast
Description: 
This particular problem was encountered with SNOM360 phones, but it is not
specific to it.

What happens:
- SNOM has subscribed a LED to another phone
- SNOM user dials this other phone. 
- dialplan adds an answer-after=0 SIP header.
- asterisk send INVITE to the other phone
- other phone send back RINGING, this is sent back to the SNOM as well
- asterisk send NOTIFY 'early' to the SNOM
- meanwhile, the other phone answers very quickly
- asterisk sends OK to INVITE to SNOM to indicate the other phone 
  has answered the line, and immediately after that, a NOTIFY 'confirmed'.

  At this point in time the OK to the previous NOTIFY 'early' has not 
  been sent yet by the SNOM.

Now the system is confused, because the SNOM finally sends the OK
to the NOTIFY 'early', but asterisk is only expecting an OK to the
last sent NOTIFY, and starts retrying. See attached trace.

I think asterisk should not sent a new NOTIFY. I think ideally NOTIFY's
should be queued on a per-channel basis. Or should asterisk remember
earlier



======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0011736 sip hung channels and UDP ports
related to          0011231 [patch] Many retransmits when chan_sip ...
====================================================================== 

---------------------------------------------------------------------- 
 tbelder - 02-06-08 01:36  
---------------------------------------------------------------------- 
I have a simular problem here with Asterisk 1.4.17:

A Snom device is subscribed to extension 408 which handles the state of
SIP/408 and SIP/102 (exten = 408,hint,SIP/408&SIP/102)

When calling extension 301 both phones are ringing. And the following
state are sent:
Asterisk: NOTIFY with ringing cseq 106
Snom: OK
-- SIP/301 picked up the phone and SIP/401 stops ringing
Asterisk: NOTIFY with inuse+ringing, cseq: 107
Asterisk: NOTIFY with inuse, cseq: 108
Snom: OK, cseq 107
Snom: OK, cseq 108
Asterisk: retransmits cseq 107 for more than 5 times
Snom: OK cseq 107 (as many asterisk sends the NOTIFY message)

Now the snom device indicates that SIP/301 or SIP/401 still is ringing.

-- SIP/408 hangs up the phone

Asterisk: NOTIFY with idle, cseq: 109
Snom: OK, cseq 109


You can see this behavior in the attached file. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
02-06-08 01:36  tbelder        Note Added: 0081740                          
======================================================================




More information about the asterisk-bugs mailing list