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

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Mar 3 12:26:12 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/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:                     ready for review
Asterisk Version:           1.4.18 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2008-03-14 11:45 CDT
Last Modified:              2009-03-03 12:26 CST
====================================================================== 
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...
====================================================================== 

---------------------------------------------------------------------- 
 (0101093) mmichelson (administrator) - 2009-03-03 12:26
 http://bugs.digium.com/view.php?id=12215#c101093 
---------------------------------------------------------------------- 
I would have put some comments on this soon after it was assigned to me,
but I came down with the flu and didn't get a chance to comment on this
until now. After reading through things a bit here, I have a couple of
comments. 

First of all, the new flag used in the patches,
SIP_PAGE2_GOT_OK_FOR_INVITE, can probably be done away with. The
invitestate variable on the sip_pvt could probably be used for this.
Specifically, checking if p->invitestate is INV_TERMINATED should do the
trick there.

Looking through the patch history, what *seems* like the most correct way
to do things is similar to
asterisk-1.4.19-chan_sip-loop-detection-fix-v2.patch. The comments indicate
that that particular patch caused problems such as the channel never going
away, but the idea of why that happened wasn't explored too heavily. Based
on the trace that remiq uploaded, my guess is that Asterisk is not properly
detecting this re-INVITE as a re-INVITE and instead thinks that there is a
new dialog being started.

I'm going to take a closer look at handle_request_invite to see if I can
find why this may be happening. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-03-03 12:26 mmichelson     Note Added: 0101093                          
======================================================================




More information about the asterisk-bugs mailing list