[asterisk-bugs] [Asterisk 0015106]: Routing Extensions between 2 asterisk servers in 2 directions fails with "482 Loop Detected"

Asterisk Bug Tracker noreply at bugs.digium.com
Fri May 15 08:49:24 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15106 
====================================================================== 
Reported By:                timeshell
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15106
Category:                   General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.0.9 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-05-14 09:35 CDT
Last Modified:              2009-05-15 08:49 CDT
====================================================================== 
Summary:                    Routing Extensions between 2 asterisk servers in 2
directions fails with "482 Loop Detected"
Description: 
A* has a user created by asterisk-gui2.
B* has a trunkA created to connect to user on A*.
Calling rule for trunkA on B* allows exts connected to B* to call exts on
A*.

Now, I want exts connected to A* to be able to call exts on B*.

Scenario 1
Create SIP trunk user on B* with asterisk-gui2.  Connect trunk from A* to
user on B* and appropriate outgoing rule.
Result:  calls from one or both sides will get error in CLI reporting "482
Loop Detected"

Scenario 2
Create SIP trunk using asterisk-gui2 on A* but leave hostname, username
and secret blank.  Change registersip to = no.
Manually edit extensions.conf and change the global for the new SIP trunk
to be something like "trunk_1=SIP/A*Ext" where A*Ext is the trunk extension
for B* to connect a trunk to A*.
Create outgoing rule on A* to route B* exts to B*.
Create incoming rule on B* to accept incoming calls on trunk to A* and set
it to route to ${EXTEN}.
Result:  Calls may or may not work in one direction and the other
direction will not work reporting "482 Loop Detected"


====================================================================== 

---------------------------------------------------------------------- 
 (0104817) timeshell (reporter) - 2009-05-15 08:49
 https://issues.asterisk.org/view.php?id=15106#c104817 
---------------------------------------------------------------------- 
Debug from initiating server.  Remote server has no debug information.

[root at localhost ~]# asterisk -r
Asterisk 1.6.0.9, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster at digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for
details.
This is free software, with components licensed under the GNU General
Public
License version 2 and other licenses; you are welcome to redistribute it
under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.0.9 currently running on localhost (pid =
23639)
Verbosity is at least 10
localhost*CLI> sip set debug on
SIP Debugging enabled
localhost*CLI>
<--- SIP read from UDP://10.20.20.62:5060 --->
INVITE sip:7000 at 10.20.20.25:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.20.20.62;branch=z9hG4bKfd60efc75894B0DC
From: "Greg Nutt" <sip:5221 at 10.20.20.25>;tag=7B2AD619-818A3948
To: <sip:7000 at 10.20.20.25;user=phone>
CSeq: 1 INVITE
Call-ID: efc8325d-32a442a3-3821af9a at 10.20.20.62
Contact: <sip:5221 at 10.20.20.62>
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE,
NOTIFY, PRACK, UPDATE, REFER
User-Agent: PolycomSoundPointIP-SPIP_501-UA/3.1.2.0392
Accept-Language: en
Supported: 100rel,replaces
Allow-Events: talk,hold,conference
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 268

v=0
o=- 1242330512 1242330512 IN IP4 10.20.20.62
s=Polycom IP Phone
c=IN IP4 10.20.20.62
t=0 0
a=sendrecv
m=audio 2222 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000

<------------->
--- (15 headers 12 lines) ---
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
Sending to 10.20.20.62 : 5060 (NAT)
Using INVITE request as basis request -
efc8325d-32a442a3-3821af9a at 10.20.20.62
Found user '5221' for '5221'
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 18
Found RTP audio format 101
Peer audio RTP is at port 10.20.20.62:2222
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format G729 for ID 18
Found audio description format telephone-event for ID 101
Capabilities: us - 0x6 (gsm|ulaw), peer - audio=0x10c
(ulaw|alaw|g729)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x4
(ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1
(telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 10.20.20.62:2222
Looking for 7000 in DLPN_DialPlan1 (domain 10.20.20.25)
list_route: hop: <sip:5221 at 10.20.20.62>

<--- Transmitting (NAT) to 10.20.20.62:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
10.20.20.62;branch=z9hG4bKfd60efc75894B0DC;received=10.20.20.62
From: "Greg Nutt" <sip:5221 at 10.20.20.25>;tag=7B2AD619-818A3948
To: <sip:7000 at 10.20.20.25;user=phone>
Call-ID: efc8325d-32a442a3-3821af9a at 10.20.20.62
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Contact: <sip:7000 at 10.20.20.25>
Content-Length: 0


<------------>
    -- Executing [7000 at DLPN_DialPlan1:1] Macro("SIP/5221-090d3d00",
"trunkdial-failover-0.3,SIP/NUTT_LOCAL/7000,,NUTT_LOCAL,") in new stack
    -- Executing [s at macro-trunkdial-failover-0.3:1]
GotoIf("SIP/5221-090d3d00", "0?1-fmsetcid,1") in new stack
    -- Executing [s at macro-trunkdial-failover-0.3:2]
GotoIf("SIP/5221-090d3d00", "0?1-setgbobname,1") in new stack
    -- Executing [s at macro-trunkdial-failover-0.3:3]
Set("SIP/5221-090d3d00", "CALLERID(num)=") in new stack
    -- Executing [s at macro-trunkdial-failover-0.3:4]
GotoIf("SIP/5221-090d3d00", "0?1-dial,1") in new stack
    -- Executing [s at macro-trunkdial-failover-0.3:5]
Set("SIP/5221-090d3d00", "CALLERID(all)=") in new stack
    -- Executing [s at macro-trunkdial-failover-0.3:6]
Goto("SIP/5221-090d3d00", "1-dial,1") in new stack
    -- Goto (macro-trunkdial-failover-0.3,1-dial,1)
    -- Executing [1-dial at macro-trunkdial-failover-0.3:1]
Dial("SIP/5221-090d3d00", "SIP/NUTT_LOCAL/7000") in new stack
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
Audio is at 142.46.193.202 port 16240
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding codec 0x800 (g726) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 206.248.146.138:5060:
INVITE sip:7000 at 206.248.146.138 SIP/2.0
Via: SIP/2.0/UDP 142.46.193.202:5060;branch=z9hG4bK75e12728
Max-Forwards: 70
From: "asterisk" <sip:asterisk at 142.46.193.202>;tag=as2100555a
To: <sip:7000 at 206.248.146.138>
Contact: <sip:asterisk at 142.46.193.202>
Call-ID: 65b268180ec7f49d716e8fe15d41a4f4 at 142.46.193.202
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Fri, 15 May 2009 08:09:44 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 345

v=0
o=root 1040231192 1040231192 IN IP4 142.46.193.202
s=Asterisk PBX 1.6.0.9
c=IN IP4 142.46.193.202
t=0 0
m=audio 16240 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

---
    -- Called NUTT_LOCAL/7000

<--- SIP read from UDP://127.0.0.1:5060 --->
INVITE sip:7000 at 206.248.146.138 SIP/2.0
Via: SIP/2.0/UDP 142.46.193.202:5060;branch=z9hG4bK75e12728
Max-Forwards: 70
From: "asterisk" <sip:asterisk at 142.46.193.202>;tag=as2100555a
To: <sip:7000 at 206.248.146.138>
Contact: <sip:asterisk at 142.46.193.202>
Call-ID: 65b268180ec7f49d716e8fe15d41a4f4 at 142.46.193.202
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Fri, 15 May 2009 08:09:44 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 345

v=0
o=root 1040231192 1040231192 IN IP4 142.46.193.202
s=Asterisk PBX 1.6.0.9
c=IN IP4 142.46.193.202
t=0 0
m=audio 16240 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------->
--- (14 headers 15 lines) ---

<--- Transmitting (NAT) to 0.0.0.0:5060 --->
SIP/2.0 482 Loop Detected
Via: SIP/2.0/UDP
142.46.193.202:5060;branch=z9hG4bK75e12728;received=127.0.0.1
From: "asterisk" <sip:asterisk at 142.46.193.202>;tag=as2100555a
To: <sip:7000 at 206.248.146.138>;tag=as2100555a
Call-ID: 65b268180ec7f49d716e8fe15d41a4f4 at 142.46.193.202
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Length: 0
X-Asterisk-HangupCause: User busy
X-Asterisk-HangupCauseCode: 17


<------------>
Scheduling destruction of SIP dialog
'65b268180ec7f49d716e8fe15d41a4f4 at 142.46.193.202' in 32000 ms (Method:
INVITE)

<--- SIP read from UDP://127.0.0.1:5060 --->
SIP/2.0 482 Loop Detected
Via: SIP/2.0/UDP
142.46.193.202:5060;branch=z9hG4bK75e12728;received=127.0.0.1
From: "asterisk" <sip:asterisk at 142.46.193.202>;tag=as2100555a
To: <sip:7000 at 206.248.146.138>;tag=as2100555a
Call-ID: 65b268180ec7f49d716e8fe15d41a4f4 at 142.46.193.202
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Length: 0
X-Asterisk-HangupCause: User busy
X-Asterisk-HangupCauseCode: 17


<------------->
--- (12 headers 0 lines) ---
    -- Got SIP response 482 "Loop Detected" back from 0.0.0.0
Transmitting (NAT) to 127.0.0.1:5060:
ACK sip:7000 at 206.248.146.138 SIP/2.0
Via: SIP/2.0/UDP 142.46.193.202:5060;branch=z9hG4bK75e12728
Max-Forwards: 70
From: "asterisk" <sip:asterisk at 142.46.193.202>;tag=as2100555a
To: <sip:7000 at 206.248.146.138>;tag=as2100555a
Contact: <sip:asterisk at 142.46.193.202>
Call-ID: 65b268180ec7f49d716e8fe15d41a4f4 at 142.46.193.202
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0


---

<--- SIP read from UDP://127.0.0.1:5060 --->
ACK sip:7000 at 206.248.146.138 SIP/2.0
Via: SIP/2.0/UDP 142.46.193.202:5060;branch=z9hG4bK75e12728
Max-Forwards: 70
From: "asterisk" <sip:asterisk at 142.46.193.202>;tag=as2100555a
To: <sip:7000 at 206.248.146.138>;tag=as2100555a
Contact: <sip:asterisk at 142.46.193.202>
Call-ID: 65b268180ec7f49d716e8fe15d41a4f4 at 142.46.193.202
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---
    -- Now forwarding SIP/5221-090d3d00 to 'Local/7000 at DID_NUTT_LOCAL'
(thanks to SIP/NUTT_LOCAL-091034d0)
[May 15 04:09:44] NOTICE[30637]: chan_local.c:654 local_alloc: No such
extension/context 7000 at DID_NUTT_LOCAL creating local channel
[May 15 04:09:44] NOTICE[30637]: app_dial.c:513 do_forward: Unable to
create local channel for call forward to 'Local/7000 at DID_NUTT_LOCAL' (cause
= 0)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [1-dial at macro-trunkdial-failover-0.3:2]
GotoIf("SIP/5221-090d3d00", "0 > 0 ?1-CHANUNAVAIL,1:1-out,1") in new stack
    -- Goto (macro-trunkdial-failover-0.3,1-out,1)
    -- Executing [1-out at macro-trunkdial-failover-0.3:1]
Hangup("SIP/5221-090d3d00", "") in new stack
  == Spawn extension (macro-trunkdial-failover-0.3, 1-out, 1) exited
non-zero on 'SIP/5221-090d3d00' in macro 'trunkdial-failover-0.3'
  == Spawn extension (DLPN_DialPlan1, 7000, 1) exited non-zero on
'SIP/5221-090d3d00'
Scheduling destruction of SIP dialog
'efc8325d-32a442a3-3821af9a at 10.20.20.62' in 32000 ms (Method: INVITE)

<--- Reliably Transmitting (NAT) to 10.20.20.62:5060 --->
SIP/2.0 603 Declined
Via: SIP/2.0/UDP
10.20.20.62;branch=z9hG4bKfd60efc75894B0DC;received=10.20.20.62
From: "Greg Nutt" <sip:5221 at 10.20.20.25>;tag=7B2AD619-818A3948
To: <sip:7000 at 10.20.20.25;user=phone>;tag=as51c7378c
Call-ID: efc8325d-32a442a3-3821af9a at 10.20.20.62
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Length: 0


<------------>
localhost*CLI>
<--- SIP read from UDP://10.20.20.62:5060 --->
ACK sip:7000 at 10.20.20.25:5060 SIP/2.0
Via: SIP/2.0/UDP 10.20.20.62;branch=z9hG4bKfd60efc75894B0DC
From: "Greg Nutt" <sip:5221 at 10.20.20.25>;tag=7B2AD619-818A3948
To: <sip:7000 at 10.20.20.25;user=phone>;tag=as51c7378c
CSeq: 1 ACK
Call-ID: efc8325d-32a442a3-3821af9a at 10.20.20.62
Contact: <sip:5221 at 10.20.20.62>
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE,
NOTIFY, PRACK, UPDATE, REFER
User-Agent: PolycomSoundPointIP-SPIP_501-UA/3.1.2.0392
Accept-Language: en
Max-Forwards: 70
Content-Length: 0


<------------->
--- (12 headers 0 lines) ---
Really destroying SIP dialog
'65b268180ec7f49d716e8fe15d41a4f4 at 142.46.193.202' Method: ACK
localhost*CLI> sip set debug off
SIP Debugging Disabled
localhost*CLI> 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-15 08:49 timeshell      Note Added: 0104817                          
======================================================================




More information about the asterisk-bugs mailing list