[asterisk-bugs] [Asterisk 0007403]: [patch] allow SIP Spiral to work instead of causing a '482 Loop Detected' condition

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Aug 30 01:09:58 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=7403 
====================================================================== 
Reported By:                stephen_dredge
Assigned To:                oej
====================================================================== 
Project:                    Asterisk
Issue ID:                   7403
Category:                   Core/General
Reproducibility:            N/A
Severity:                   tweak
Priority:                   normal
Status:                     assigned
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 47646 
Disclaimer on File?:        No 
Request Review:              
====================================================================== 
Date Submitted:             06-21-2006 00:13 CDT
Last Modified:              08-30-2007 01:09 CDT
====================================================================== 
Summary:                    [patch] allow SIP Spiral to work instead of causing
a '482 Loop Detected' condition
Description: 
A sip call originating from asterisk causes a '482 Loop Detected' response
when forwarded back to asterisk from a external proxy. This should be
allowed when the request URI has been changed by the proxy and the call is
now targeted at a different user.
====================================================================== 

---------------------------------------------------------------------- 
 gautam_dawar - 08-30-07 01:09  
---------------------------------------------------------------------- 
qwell: Thanks a lot for making the patches available.

However, there is a little issue with the patch. ;)

ibc: The crashes you are encountering are because of the invalid
initialization of the variable chan_is_outgoing in the function find_call.
When this variable is being initialized, sip_pvt pointer 'p' is pointing to
NULL and hence call to ast_test_flag at that point causes the crash. 

To fix the issue, just update the if statement where chan_is_outgoing is
being evaluated.
i.e.
Change 
<snip>
/* UAC channel does not have a dialog yet. reponse has a to tag
establishing a new dialog */
if ( p->theirtag[0] == '\0' && chan_is_outgoing && ( req->method ==
SIP_RESPONSE )) {
</snip>

to 

<snip>
/* UAC channel does not have a dialog yet. reponse has a to tag
establishing a new dialog */
if ( p->theirtag[0] == '\0' && ast_test_flag(&p->flags[0], SIP_OUTGOING)
&& ( req->method == SIP_RESPONSE )) {
</snip> 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
08-30-07 01:09  gautam_dawar   Note Added: 0069683                          
======================================================================




More information about the asterisk-bugs mailing list