[asterisk-bugs] [Asterisk 0014584]: [patch] Asterisk does not stop retransmission

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jun 22 09:42:56 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=14584 
====================================================================== 
Reported By:                klaus3000
Assigned To:                mmichelson
====================================================================== 
Project:                    Asterisk
Issue ID:                   14584
Category:                   Channels/chan_sip/Interoperability
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for review
Target Version:             1.4.27
Asterisk Version:           1.4.23 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-03-02 09:22 CST
Last Modified:              2009-06-22 09:42 CDT
====================================================================== 
Summary:                    [patch] Asterisk does not stop retransmission
Description: 
Scenario:

<pre>
client                Asterisk
  ------INV,407,ACK-------->
  ------INV---------------->
                            -----INV---->
                            <---183------
  <-------183---------------
                            <---180------
  <-------180---------------
  --------CANCEL----------->
    X----487, 200-(loss)----

  ---CANCEL retransmission->
  <----487, 200-------------
  ---ACK------------------->

  <----487------------------
  <----487------------------
  <----487------------------
  <----487------------------
  <----487------------------
</pre>
====================================================================== 

---------------------------------------------------------------------- 
 (0106810) svnbot (reporter) - 2009-06-22 09:42
 https://issues.asterisk.org/view.php?id=14584#c106810 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 202341

U   branches/1.4/channels/chan_sip.c

------------------------------------------------------------------------
r202341 | mmichelson | 2009-06-22 09:42:55 -0500 (Mon, 22 Jun 2009) | 26
lines

Fix a situation in which Asterisk would not stop retransmitting 487s.

If a CANCEL were received by Asterisk, we would send a 487 in response
to the original INVITE and a 200 OK for the CANCEL. If there were a
network
hiccup which caused the 200 OK and the 487 to be lost, then the UA
communicating
with Asterisk may try to retransmit its CANCEL. Asterisk's response to
this used
to be to try sending another 487 to the canceled INVITE and another 200 OK
to the
CANCEL.

The problem here is that the originally-sent 487 was sent "reliably"
meaning that
it will be retransmitted until it is received properly. So when we receive
the second
CANCEL it is likely that the first batch of 487s we sent is still going
strong and
reaches the UA. The result was that the second set of 487s would be
retransmitted
constantly until the maximum number of retries had been reached.

The fix for this is that if we receive a second CANCEL for an INVITE, then
we cancel
the retransmission of the first set of 487s and start a second set. This
causes the
dialog to be terminated reasonably.

(closes issue https://issues.asterisk.org/view.php?id=14584)
Reported by: klaus3000
Patches:
      14584_v2.patch uploaded by mmichelson (license 60)
Tested by: klaus3000


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=202341 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-06-22 09:42 svnbot         Checkin                                      
2009-06-22 09:42 svnbot         Note Added: 0106810                          
======================================================================




More information about the asterisk-bugs mailing list