[asterisk-bugs] [Asterisk 0017192]: [patch] Phone keeps ringing when hangup between 'NOTIFY' and 'Status: 180 Ringing'

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Jul 8 13:30:36 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17192 
====================================================================== 
Reported By:                ronaldderksen
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17192
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     confirmed
Asterisk Version:           1.6.0.26 
JIRA:                       SWP-1350 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.0 
SVN Revision (number only!): 257592 
Request Review:              
====================================================================== 
Date Submitted:             2010-04-16 04:49 CDT
Last Modified:              2010-07-08 13:30 CDT
====================================================================== 
Summary:                    [patch] Phone keeps ringing when hangup between
'NOTIFY' and 'Status: 180 Ringing'
Description: 
When I call my aastra SIP phone and hangup before the aastra phone sents
back the 'Status: 180 Ringing' the phone keeps ringing 'forever'
This is what I see with tshark when I hangup right after I dialed the
phone.

  0.000000 192.168.12.4 -> 192.168.12.100 SIP Request: NOTIFY
sip:400 at 192.168.12.100:5060;transport=udp
  0.044154 192.168.12.100 -> 192.168.12.4 SIP Status: 200 OK
  0.351948 192.168.12.4 -> 192.168.12.100 SIP/SDP Request: INVITE
sip:400 at 192.168.12.100:5060;transport=udp, with session description
  0.355715 192.168.12.4 -> 192.168.12.100 SIP Request: NOTIFY
sip:400 at 192.168.12.100:5060;transport=udp
  0.525349 192.168.12.100 -> 192.168.12.4 SIP Status: 180 Ringing
  0.529074 192.168.12.100 -> 192.168.12.4 SIP Status: 200 OK

The aastra phone sents the 'Status: 180 Ringing' message after 529ms. That
is a a big window. When I first play a message with 'Playback' application
and the caller decides to hangup, the window of 529ms is too much. There is
a big change people hangup in that 529ms.

I can also reproduce this with a polycom phone. But with polucom it is
harder because it sents the 'Status: 180 Ringing' quicker (186 ms) I cannot
reproduce this problem with a linksys phone. Linksys phone sents the
'Status: 180 Ringing' in 20ms.

A normal Dial -> ringing -> hangup looks like this (with aastra phone):

  0.000000 192.168.12.4 -> 192.168.12.100 SIP Request: NOTIFY
sip:400 at 192.168.12.100:5060;transport=udp
  0.047770 192.168.12.100 -> 192.168.12.4 SIP Status: 200 OK
  0.331322 192.168.12.4 -> 192.168.12.100 SIP/SDP Request: INVITE
sip:400 at 192.168.12.100:5060;transport=udp, with session description
  0.464797 192.168.12.100 -> 192.168.12.4 SIP Status: 180 Ringing
  2.822520 192.168.12.4 -> 192.168.12.100 SIP Request: NOTIFY
sip:400 at 192.168.12.100:5060;transport=udp
  2.823327 192.168.12.4 -> 192.168.12.100 SIP Request: CANCEL
sip:400 at 192.168.12.100:5060;transport=udp
  2.983367 192.168.12.100 -> 192.168.12.4 SIP Status: 200 OK
  2.986478 192.168.12.100 -> 192.168.12.4 SIP Status: 487 Request
Terminated

So When I hangup after the phone ringed ones, I see that asterisk sents a
'CANCEL' message. I think this 'CANCEL' message also need to be sent when
asterisk did not yet receive the 'Status: 180 Ringing' message.

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0017096 C keeps ringing when hanging A and B af...
related to          0013626 [patch] CANCEL before Trying
====================================================================== 

---------------------------------------------------------------------- 
 (0124364) davidw (reporter) - 2010-07-08 13:30
 https://issues.asterisk.org/view.php?id=17192#c124364 
---------------------------------------------------------------------- 
Something is wrong if 183 is faulted, but not 180.  In any case, you cannot
respond with responses to responses!  The only possible response to a
response is ACK or CANCEL, and then only for certain methods.

I might be wrong a about the reliability of CANCEL, but the acknowledgment
is 200 or 481.  The 487 response is optional and is to the original
INVITE.

The possibility that one might think of a no such leg response, would
imply the sip_pvt is being created in response to the response.  If it is
stray responses should be handled according to the following rules, i.e.
discarded; if not you can do this handling properly by remembering the
cancel pending state for the dialogue.  (Asterisk is a UA.)

RFC 3261
   If there are any client transactions in existence, the client
   transport uses the matching procedures of Section 17.1.3 to attempt
   to match the response to an existing transaction.  If there is a
   match, the response MUST be passed to that transaction.  Otherwise,
   the response MUST be passed to the core (whether it be stateless
   proxy, stateful proxy, or UA) for further processing.  Handling of
   these "stray" responses is dependent on the core (a proxy will
   forward them, while a UA will discard, for example).

I.e. responding to an unmatched response is a protocol error. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-07-08 13:30 davidw         Note Added: 0124364                          
======================================================================




More information about the asterisk-bugs mailing list