[Asterisk-Dev] Fwd: Loop Detection

Daniel Corbe daniel.junkmail at gmail.com
Thu Apr 14 09:17:42 MST 2005


I apologize for the cross-post, but I didn't get an answer on
asterisk-users.  I did a little more research and LOOP DETECTION seems
to be hard coded in asterisk so this is a more appropriate forum for
this question.

I need to disable loop detection in Asterisk.  would someone kindly
point me in the right direction?  Which source file(s) deal with loop
detection?

According to the RFC loop detection is entirely optional and by
disabling it, my call forwarding problems would go away.

Asterisk doesn't seem to follow RFC when it comes to loop detection. 
It automatically rejects the call based on the call ID and it
completely ignores the fact that I'm sending INVITES addressed to
different users, I have a new TAG= line and I have Max-Forwards: 70

-Daniel

---------- Forwarded message ----------
From: Daniel Corbe <daniel.junkmail at gmail.com>
Date: Apr 13, 2005 3:29 PM
Subject: Loop Detection
To: Asterisk Users Mailing List - Non-Commercial Discussion
<asterisk-users at lists.digium.com>


Hello,

Is there any way to turn Loop Detection off or tune the params a bit?
I am having an issue with Call Forwarding on my SIP Proxy Server which
is causing me great pains.

Here is the issue:

1) I have a SIP UA which registers with a SER proxy server.
2) I have an Asterisk TDM gateway in my network, also which registers with SER
3) A call comes in through the PSTN to the Asterisk Gateway.  The
Asterisk gateway sends the call to SER destined for my SIP UA
4) SER sees that the SIP UA has call forwarding enabled so it creates
a new outbound call with the same Call ID but it has a different TAG=
line and Max-Forwards is set to 70.
5) Since the fowarding number is out on the PSTN, SER routes the call
back through the same * gateway.
6) Asterisk rejects the phone call with "Loop Detected"

According to my interpretation of the RFC, it is more correct to base
loop detection off of the TAG= than it is off of the Call ID.  Having
said that, SER also sets the Max Forwards on the call.

Is there any way at all to get Asterisk to either base its loop
detection off the TAG= or respect the Max-Forwards setting?

I've also attached a libpcap packet dump of a phone call.

389.764074 62.25.108.211 -> 66.165.175.44 SIP/SDP Request: INVITE
sip:448701419604 at 66.165.175.44, with session description
389.885825 66.165.175.44 -> 62.25.108.211 SIP Status: 401 Unauthorized
389.885999 62.25.108.211 -> 66.165.175.44 SIP Request: ACK
sip:448701419604 at 66.165.175.44
389.886104 62.25.108.211 -> 66.165.175.44 SIP/SDP Request: INVITE
sip:448701419604 at 66.165.175.44, with session description
390.145261 66.165.175.44 -> 62.25.108.211 SIP Status: 100 trying --
your call is important to us
390.257658 66.165.175.44 -> 62.25.108.211 SIP/SDP Request: INVITE
sip:13012370123 at 62.25.108.211:5060, with session description
390.257706 62.25.108.211 -> 66.165.175.44 SIP Status: 482 Loop Detected
390.801964 66.165.175.44 -> 62.25.108.211 SIP/SDP Request: INVITE
sip:13012370123 at 62.25.108.211:5060, with session description
390.802007 62.25.108.211 -> 66.165.175.44 SIP Status: 482 Loop Detected
391.901785 66.165.175.44 -> 62.25.108.211 SIP/SDP Request: INVITE
sip:13012370123 at 62.25.108.211:5060, with session description
391.901829 62.25.108.211 -> 66.165.175.44 SIP Status: 482 Loop Detected
393.991808 66.165.175.44 -> 62.25.108.211 SIP/SDP Request: INVITE
sip:13012370123 at 62.25.108.211:5060, with session description
393.991851 62.25.108.211 -> 66.165.175.44 SIP Status: 482 Loop Detected
401.223872 62.25.108.211 -> 66.165.175.44 SIP Request: CANCEL
sip:448701419604 at 66.165.175.44
-------------- next part --------------
A non-text attachment was scrubbed...
Name: voip4u-2005040401.dump
Type: application/octet-stream
Size: 14356 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20050414/4bb10444/voip4u-2005040401.obj


More information about the asterisk-dev mailing list