Hello, did you manage to move forward with this toppic?
I’m actually facing something similar as it looks to me. Topology:
100 is a sip phone, IP 192.168.1.107
Asterisk 1.8.8.0 running on a DD-WRT box with two ip interfaces: LAN 192.168.1.254 and WAN 172.16.1.100. Further on I am connected to a DSL router with public IP 92.81.131.67.
My provider is voip.clicknet.ro, the siptrunk with this provider is called romtelecom_voip.
When I originate any outgoing call using this SIP provider I get the error “SIP/2.0 482 Loop Detected” from my Asterisk.
In sip.conf I have the following configuration wih regards to NAT:
nat=yes
externaddr = ********.dyndns.org
localnet = 192.168.1.100/255.255.255.0
localnet = 172.16.1.100/255.255.255.0
qualify= yes
<— SIP read from UDP:192.168.1.107:5060 —>
INVITE sip:0754333333@192.168.1.254:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.107:5060;branch=z9hG4bK35174378a4b5d2928
Max-Forwards: 70
From: Main Number sip:100@192.168.1.254;tag=ff699c2c47;epid=SC09e274
To: sip:0754333333@192.168.1.254:5060;transport=udp
Call-ID: 8d1ff4449bb75e25
CSeq: 1 INVITE
Allow: INVITE,ACK,CANCEL,BYE,REFER,NOTIFY,UPDATE
Allow-Events: talk, hold, conference
Contact: Main Number sip:100@192.168.1.107:5060;transport=udp
Min-SE: 90
Supported: timer, replaces, 100rel
User-Agent: optiPoint 410 Standard/V7 V7 R6.3.0
X-Siemens-Call-Type: ST-insecure
Content-Type: application/sdp
Content-Length: 371
v=0
o=MxSIP 0 1198510064 IN IP4 192.168.1.107
s=SIP Call
c=IN IP4 192.168.1.107
t=0 0
m=audio 5004 RTP/AVP 8 0 9 18 4 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:101 telephone-event/8000
a=silenceSupp:off - - - -
a=fmtp:4 annexa=no
a=fmtp:18 annexb=no
a=fmtp:101 0-15
a=ptime:20
<------------->
— (16 headers 17 lines) —
Sending to 192.168.1.107:5060 (NAT)
Using INVITE request as basis request - 8d1ff4449bb75e25
Found peer ‘100’ for ‘100’ from 192.168.1.107:5060
<— Reliably Transmitting (NAT) to 192.168.1.107:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.107:5060;branch=z9hG4bK35174378a4b5d2928;received=192.168.1.107;rport=5060
From: Main Number sip:100@192.168.1.254;tag=ff699c2c47;epid=SC09e274
To: sip:0754333333@192.168.1.254:5060;transport=udp;tag=as44a4d29e
Call-ID: 8d1ff4449bb75e25
CSeq: 1 INVITE
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="797691de"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog ‘8d1ff4449bb75e25’ in 6400 ms (Method: INVITE)
<— SIP read from UDP:192.168.1.107:5060 —>
ACK sip:0754333333@192.168.1.254:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.107:5060;branch=z9hG4bK35174378a4b5d2928
Max-Forwards: 70
From: Main Number sip:100@192.168.1.254;tag=ff699c2c47;epid=SC09e274
To: sip:0754333333@192.168.1.254:5060;transport=udp;tag=as44a4d29e
Call-ID: 8d1ff4449bb75e25
CSeq: 1 ACK
User-Agent: optiPoint 410 Standard/V7 V7 R6.3.0
Content-Length: 0
<------------->
— (9 headers 0 lines) —
<— SIP read from UDP:192.168.1.107:5060 —>
INVITE sip:0754333333@192.168.1.254:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.1.107:5060;branch=z9hG4bK63c4aa06f1afb7c86
Max-Forwards: 70
From: Main Number sip:100@192.168.1.254;tag=ff699c2c47;epid=SC09e274
To: sip:0754333333@192.168.1.254:5060;transport=udp
Call-ID: 8d1ff4449bb75e25
CSeq: 2 INVITE
Allow: INVITE,ACK,CANCEL,BYE,REFER,NOTIFY,UPDATE
Allow-Events: talk, hold, conference
Authorization: Digest username=“100”,realm=“asterisk”,nonce=“797691de”,uri=“sip:0754333333@192.168.1.254:5060;transport=udp”,response=“8a2b876568ac274de43f394c5c5e498c”,algorithm=MD5
Contact: Main Number sip:100@192.168.1.107:5060;transport=udp
Min-SE: 90
Supported: timer, replaces, 100rel
User-Agent: optiPoint 410 Standard/V7 V7 R6.3.0
X-Siemens-Call-Type: ST-insecure
Content-Type: application/sdp
Content-Length: 371
v=0
o=MxSIP 0 1198510064 IN IP4 192.168.1.107
s=SIP Call
c=IN IP4 192.168.1.107
t=0 0
m=audio 5004 RTP/AVP 8 0 9 18 4 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:101 telephone-event/8000
a=silenceSupp:off - - - -
a=fmtp:4 annexa=no
a=fmtp:18 annexb=no
a=fmtp:101 0-15
a=ptime:20
<------------->
— (17 headers 17 lines) —
Sending to 192.168.1.107:5060 (NAT)
Using INVITE request as basis request - 8d1ff4449bb75e25
Found peer ‘100’ for ‘100’ from 192.168.1.107:5060
== Using SIP RTP CoS mark 5
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 9
Found RTP audio format 18
Found RTP audio format 4
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format G722 for ID 9
Found audio description format G729 for ID 18
Found audio description format G723 for ID 4
Found audio description format telephone-event for ID 101
Capabilities: us - 0x10c (ulaw|alaw|g729), peer - audio=0x110d (g723|ulaw|alaw|g729|g722)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x10c (ulaw|alaw|g729)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.1.107:5004
Looking for 0754333333 in outgoing (domain 192.168.1.254:5060)
list_route: hop: sip:100@192.168.1.107:5060;transport=udp
<— Transmitting (NAT) to 192.168.1.107:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.107:5060;branch=z9hG4bK63c4aa06f1afb7c86;received=192.168.1.107;rport=5060
From: Main Number sip:100@192.168.1.254;tag=ff699c2c47;epid=SC09e274
To: sip:0754333333@192.168.1.254:5060;transport=udp
Call-ID: 8d1ff4449bb75e25
CSeq: 2 INVITE
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:0754333333@192.168.1.254:5060
Content-Length: 0
<------------>
– Executing [0754333333@outgoing:1] Macro(“SIP/100-0000003c”, “trunkdial,SIP/romtelecom_voip/0754333333,0373301111”) in new stack
– Executing [s@macro-trunkdial:1] Set(“SIP/100-0000003c”, “CALLERID(all)=0373301111”) in new stack
– Executing [s@macro-trunkdial:2] Dial(“SIP/100-0000003c”, “SIP/romtelecom_voip/0754333333”) in new stack
== Using SIP RTP CoS mark 5
Audio is at 5060
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 80.97.237.2:5060:
INVITE sip:0754333333@voip.clicknet.ro SIP/2.0
Via: SIP/2.0/UDP 172.16.1.100:5060;branch=z9hG4bK709cb7da;rport
Max-Forwards: 70
From: “0373301111” sip:77*******27@voip.clicknet.ro;tag=as64504dfe
To: sip:0754333333@voip.clicknet.ro
Contact: sip:77*******27@172.16.1.100:5060
Call-ID: 131df0286cd3ce622876f86615cc87cb@voip.clicknet.ro
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Tue, 27 Dec 2011 23:32:16 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 285
v=0
o=root 916402646 916402646 IN IP4 172.16.1.100
s=Asterisk PBX 1.8.8.0
c=IN IP4 172.16.1.100
t=0 0
m=audio 10350 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
-- Called SIP/romtelecom_voip/0754333333
<— SIP read from UDP:92.81.131.67:5060 —>
INVITE sip:0754333333@voip.clicknet.ro SIP/2.0
Via: SIP/2.0/UDP 92.81.131.67:5060;branch=z9hG4bK709cb7da;rport
Max-Forwards: 70
From: “0373301111” sip:77*******27@voip.clicknet.ro;tag=as64504dfe
To: sip:0754333333@voip.clicknet.ro
Contact: sip:77*******27@92.81.131.67:5060
Call-ID: 131df0286cd3ce622876f86615cc87cb@voip.clicknet.ro
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Tue, 27 Dec 2011 23:32:16 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 285
v=0
o=root 916402646 916402646 IN IP4 92.81.131.67
s=Asterisk PBX 1.8.8.0
c=IN IP4 92.81.131.67
t=0 0
m=audio 14688 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
<------------->
— (14 headers 13 lines) —
<— Transmitting (NAT) to 92.81.131.67:5060 —>
SIP/2.0 482 Loop Detected
Via: SIP/2.0/UDP 92.81.131.67:5060;branch=z9hG4bK709cb7da;received=92.81.131.67;rport=5060
From: “0373301111” sip:77*******27@voip.clicknet.ro;tag=as64504dfe
To: sip:0754333333@voip.clicknet.ro;tag=as64504dfe
Call-ID: 131df0286cd3ce622876f86615cc87cb@voip.clicknet.ro
CSeq: 102 INVITE
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '131df0286cd3ce622876f86615cc87cb@voip.clicknet.ro’ in 6400 ms (Method: INVITE)
<— SIP read from UDP:92.81.131.67:5060 —>
SIP/2.0 482 Loop Detected
Via: SIP/2.0/UDP 92.81.131.67:5060;branch=z9hG4bK709cb7da;received=92.81.131.67;rport=5060
From: “0373301111” sip:77*******27@voip.clicknet.ro;tag=as64504dfe
To: sip:0754333333@voip.clicknet.ro;tag=as64504dfe
Call-ID: 131df0286cd3ce622876f86615cc87cb@voip.clicknet.ro
CSeq: 102 INVITE
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
<------------->
— (10 headers 0 lines) —
– Got SIP response 482 “Loop Detected” back from 92.81.131.67:5060
Transmitting (NAT) to 92.81.131.67:5060:
ACK sip:0754333333@voip.clicknet.ro SIP/2.0
Via: SIP/2.0/UDP 172.16.1.100:5060;branch=z9hG4bK709cb7da;rport
Max-Forwards: 70
From: “0373301111” sip:77*******27@voip.clicknet.ro;tag=as64504dfe
To: sip:0754333333@voip.clicknet.ro;tag=as64504dfe
Contact: sip:77*******27@172.16.1.100:5060
Call-ID: 131df0286cd3ce622876f86615cc87cb@voip.clicknet.ro
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0
<— SIP read from UDP:92.81.131.67:5060 —>
ACK sip:0754333333@voip.clicknet.ro SIP/2.0
Via: SIP/2.0/UDP 92.81.131.67:5060;branch=z9hG4bK709cb7da;rport
Max-Forwards: 70
From: “0373301111” sip:77*******27@voip.clicknet.ro;tag=as64504dfe
To: sip:0754333333@voip.clicknet.ro;tag=as64504dfe
Contact: sip:77*******27@92.81.131.67:5060
Call-ID: 131df0286cd3ce622876f86615cc87cb@voip.clicknet.ro
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0
<------------->
— (10 headers 0 lines) —
– SIP/romtelecom_voip-0000003d is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [s@macro-trunkdial:3] Goto(“SIP/100-0000003c”, “s-CONGESTION,1”) in new stack
– Goto (macro-trunkdial,s-CONGESTION,1)
– Executing [s-CONGESTION@macro-trunkdial:1] NoOp(“SIP/100-0000003c”, “”) in new stack
– Auto fallthrough, channel ‘SIP/100-0000003c’ status is ‘CONGESTION’
<— Reliably Transmitting (NAT) to 192.168.1.107:5060 —>
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 192.168.1.107:5060;branch=z9hG4bK63c4aa06f1afb7c86;received=192.168.1.107;rport=5060
From: Main Number sip:100@192.168.1.254;tag=ff699c2c47;epid=SC09e274
To: sip:0754333333@192.168.1.254:5060;transport=udp;tag=as59d5d295
Call-ID: 8d1ff4449bb75e25
CSeq: 2 INVITE
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
X-Asterisk-HangupCause: Interworking, unspecified
X-Asterisk-HangupCauseCode: 127
Content-Length: 0
What could it be the cause? Please help.