[asterisk-bugs] [Asterisk 0012215]: [patch] Asterisk returns 482 Loop Detected upon receiving re-invite

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 14 17:23:31 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=12215 
====================================================================== 
Reported By:                jpyle
Assigned To:                mmichelson
====================================================================== 
Project:                    Asterisk
Issue ID:                   12215
Category:                   Channels/chan_sip/General
Reproducibility:            random
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           1.4.18 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-03-14 11:45 CDT
Last Modified:              2009-05-14 17:23 CDT
====================================================================== 
Summary:                    [patch] Asterisk returns 482 Loop Detected upon
receiving re-invite
Description: 
Asterisk sends a 482 Loop Detected upon receiving a presumably valid
re-INVITE.  Pedantic is enabled globally in sip.conf.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
duplicate of        0007403 [patch] allow SIP Spiral to work instea...
====================================================================== 

---------------------------------------------------------------------- 
 (0104791) svnbot (reporter) - 2009-05-14 17:23
 https://issues.asterisk.org/view.php?id=12215#c104791 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 194507

_U  branches/1.6.1/
U   branches/1.6.1/channels/chan_sip.c

------------------------------------------------------------------------
r194507 | mmichelson | 2009-05-14 17:23:28 -0500 (Thu, 14 May 2009) | 37
lines

Merged revisions 194496 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r194496 | mmichelson | 2009-05-14 17:20:51 -0500 (Thu, 14 May 2009) | 30
lines
  
  Merged revisions 194484 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r194484 | mmichelson | 2009-05-14 17:17:55 -0500 (Thu, 14 May 2009) |
24 lines
    
    Fix a race condition where a reinvite could trigger a 482 response.
    
    The loop detection/spiral detection code in chan_sip used the owner
    channel's state as a criterion for determining if the incoming INVITE
    is a looped request. The problem with this is that the INVITE-handling
    code happens in a different thread than the thread that marks the
owner
    channel as being up. As a result, if a reinvite were to come in very
quickly,
    say from another Asterisk on the same LAN, it was possible for the
reinvite
    to arrive before the owner channel had been set to the up state.
    
    This patch corrects the problem by using the invitestate of the
sip_pvt
    instead, since that can be guaranteed to be set correctly by the time
    the reinvite arrives. Since there is a switch statement further in the
    INVITE-handling code, the AST_STATE_RINGING state also checks the
invitestate
    of the sip_pvt in case we should actually be treating the channel as
if it were
    up already.
    
    (closes issue https://issues.asterisk.org/view.php?id=12215)
    Reported by: jpyle
    Patches:
          12215_confirmed.patch uploaded by mmichelson (license 60)
    Tested by: lmadsen
  ........
................

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-14 17:23 svnbot         Checkin                                      
2009-05-14 17:23 svnbot         Note Added: 0104791                          
======================================================================




More information about the asterisk-bugs mailing list