[Home]

Summary:ASTERISK-17759: When calling myself with a SIP TRUNK with ITSP provider, incoming call is considered diverted and channel converted to Local/
Reporter:Alberto Sagredo (albersag)Labels:
Date Opened:2011-04-27 10:35:47Date Closed:2011-06-07 14:10:09
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:1.6.2.17 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) sip_log_asterisk
( 1) sip_log_asterisk.rtf
Description:Asterisk connected to SIP Provider, seems to bridge SIP Channels or Console Channels as a call forwarding when they are incoming INVITES related to outbound call made with same SIP provider account. ( I call myself).

When asterisk make this threatment, i could not use SIP functions s as SIP_HEADER, because it is not a SIP CHANNEL as it has been considered a call diverted.

I attach sip trace

****** ADDITIONAL INFORMATION ******

asterisk*CLI> console dial 950956141@from-next
   -- Executing [950956141@from-next:1] NoOp("Console/default", "") in new stack
   -- Executing [950956141@from-next:2] SIPAddHeader("Console/default", "Remote-Party-ID:<sip:950479369@provider.com\;user=phone>\;privacy=off\;party=calling") in new stack
   -- Executing [950956141@from-next:3] Dial("Console/default", "SIP/NEXTC/950956141,,r") in new stack
 == Using SIP RTP TOS bits 184
 == Using SIP RTP CoS mark 5
Audio is at 192.168.5.100 port 10420
Adding codec 0x100 (g729) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 193.22.119.20:5060:
INVITE sip:950956141@provider.com SIP/2.0
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK7b9a1845;rport
Max-Forwards: 70
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>
Contact: <sip:account@192.168.5.100>
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.28
Date: Wed, 27 Apr 2011 15:20:42 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Remote-Party-ID: <sip:950479369@provider.com;user=phone>;privacy=off;party=calling
Content-Type: application/sdp
Content-Length: 313

v=0
o=root 1031639655 1031639655 IN IP4 192.168.5.100
s=Asterisk PBX 1.6.0.28
c=IN IP4 192.168.5.100
t=0 0
m=audio 10420 RTP/AVP 18 8 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
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 NEXTC/950956141
Really destroying SIP dialog '717ebb64653e00f77c83516c637666fa@127.0.1.1' Method: REGISTER
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK7b9a1845;rport=5060;received=333.444.555.666
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>;tag=ba3d51acad53eeb51d56ab2459dbff7b.b6e2
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 102 INVITE
Proxy-Authenticate: Digest realm="provider.com", nonce="1111"
Server: OpenSER (1.2.1-notls (i386/linux))
Content-Length: 0


<------------->
--- (9 headers 0 lines) ---
Transmitting (NAT) to 193.22.119.20:5060:
ACK sip:950956141@provider.com SIP/2.0
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK7b9a1845;rport
Max-Forwards: 70
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>;tag=ba3d51acad53eeb51d56ab2459dbff7b.b6e2
Contact: <sip:account@192.168.5.100>
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.0.28
Content-Length: 0


---
Audio is at 192.168.5.100 port 10420
Adding codec 0x100 (g729) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 193.22.119.20:5060:
INVITE sip:950956141@provider.com SIP/2.0
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK628c3d36;rport
Max-Forwards: 70
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>
Contact: <sip:account@192.168.5.100>
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 103 INVITE
User-Agent: Asterisk PBX 1.6.0.28
Proxy-Authorization: Digest username="account", realm="provider.com", algorithm=MD5, uri="sip:950956141@provider.com", nonce="111", response="2222"
Date: Wed, 27 Apr 2011 15:20:42 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Remote-Party-ID: <sip:950479369@provider.com;user=phone>;privacy=off;party=calling
Content-Type: application/sdp
Content-Length: 313

v=0
o=root 1031639655 1031639656 IN IP4 192.168.5.100
s=Asterisk PBX 1.6.0.28
c=IN IP4 192.168.5.100
t=0 0
m=audio 10420 RTP/AVP 18 8 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

---
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=9bbe2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-33e61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=9bbe2c31
To: sip:333.444.555.666:5060;tag=as1e8a6558
Call-ID: 415ba657-33e61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-33e61026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=1ebe2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-b5e61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=1ebe2c31
To: sip:333.444.555.666:5060;tag=as517672ba
Call-ID: 415ba657-b5e61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-b5e61026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)

<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=5ebe2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-f5e61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=5ebe2c31
To: sip:333.444.555.666:5060;tag=as49ee3853
Call-ID: 415ba657-f5e61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-f5e61026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=02ce2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-a9e61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=02ce2c31
To: sip:333.444.555.666:5060;tag=as31fd5d89
Call-ID: 415ba657-a9e61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-a9e61026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=26ce2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-cde61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=26ce2c31
To: sip:333.444.555.666:5060;tag=as42b7cf41
Call-ID: 415ba657-cde61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-cde61026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)

<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=56ce2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-fde61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=56ce2c31
To: sip:333.444.555.666:5060;tag=as284ac6ac
Call-ID: 415ba657-fde61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-fde61026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=98ce2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-30f61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=98ce2c31
To: sip:333.444.555.666:5060;tag=as085ce297
Call-ID: 415ba657-30f61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-30f61026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=b9ce2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-51f61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=b9ce2c31
To: sip:333.444.555.666:5060;tag=as64a7d3a9
Call-ID: 415ba657-51f61026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-51f61026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=6cde2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-04071026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=6cde2c31
To: sip:333.444.555.666:5060;tag=as138d3f54
Call-ID: 415ba657-04071026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-04071026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=0ede2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-a5071026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=0ede2c31
To: sip:333.444.555.666:5060;tag=as35a3efbc
Call-ID: 415ba657-a5071026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-a5071026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=aede2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-46071026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=aede2c31
To: sip:333.444.555.666:5060;tag=as0dd2d71d
Call-ID: 415ba657-46071026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-46071026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)

<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=dede2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-76071026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=dede2c31
To: sip:333.444.555.666:5060;tag=as2d0b1b44
Call-ID: 415ba657-76071026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-76071026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=7eee2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-16171026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=7eee2c31
To: sip:333.444.555.666:5060;tag=as5d13cba8
Call-ID: 415ba657-16171026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-16171026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=40fe2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-e7171026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=40fe2c31
To: sip:333.444.555.666:5060;tag=as25e98403
Call-ID: 415ba657-e7171026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-e7171026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=a1fe2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-49171026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=a1fe2c31
To: sip:333.444.555.666:5060;tag=as2cffdfa8
Call-ID: 415ba657-49171026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-49171026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
OPTIONS sip:333.444.555.666:5060 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0
From: sip:pinger@provider.com;tag=76fe2c31
To: sip:333.444.555.666:5060
Call-ID: 415ba657-1e171026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---
Looking for s in from-sip-external (domain 333.444.555.666)

<--- Transmitting (no NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20:5060;branch=0;received=193.22.119.20
From: sip:pinger@provider.com;tag=76fe2c31
To: sip:333.444.555.666:5060;tag=as284c508c
Call-ID: 415ba657-1e171026-0c8082@193.22.119.20
CSeq: 1 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:192.168.5.100>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '415ba657-1e171026-0c8082@193.22.119.20' in 32000 ms (Method: OPTIONS)
Really destroying SIP dialog '3dfc2140626bcd5c173dea8b7d1218ec@127.0.1.1' Method: REGISTER
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
SIP/2.0 100 Runing CPL script...
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK628c3d36;rport=5060;received=333.444.555.666
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 103 INVITE
Server: OpenSER (1.2.1-notls (i386/linux))
Content-Length: 0


<------------->
--- (8 headers 0 lines) ---
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
SIP/2.0 100 Runing CPL script...
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK628c3d36;rport=5060;received=333.444.555.666
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 103 INVITE
Server: OpenSER (1.2.1-notls (i386/linux))
Content-Length: 0


<------------->
--- (8 headers 0 lines) ---
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
INVITE sip:s@192.168.5.100 SIP/2.0
Record-Route: <sip:193.22.119.20;lr=on;ftag=as636f7e93>
Record-Route: <sip:193.22.119.20;lr=on;ftag=as636f7e93>
Via: SIP/2.0/UDP 193.22.119.20;branch=z9hG4bK14b2.e7840977.0
Via: SIP/2.0/UDP 193.22.119.20;branch=z9hG4bK14b2.d7840977.0
Via: SIP/2.0/UDP 192.168.5.100:5060;received=333.444.555.666;branch=z9hG4bK628c3d36;rport=5060
Max-Forwards: 31
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>
Contact: <sip:account@333.444.555.666:5060;nat=yes;nat=yes>
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 103 INVITE
Date: Wed, 27 Apr 2011 15:20:42 GMT
Remote-Party-ID: <sip:950479369@provider.com;user=phone>;privacy=off;party=calling
Content-Type: application/sdp
Content-Length: 330
P-RTP-Proxy: YES
P-Asserted-Identity: <sip:950479369@provider.com;user=phone>
X-CPLFROM: account

v=0
o=root 1031639655 1031639656 IN IP4 192.168.5.100
s=Asterisk PBX 1.6.0.28
c=IN IP4 193.22.119.2
t=0 0
m=audio 63334 RTP/AVP 18 8 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
a=nortpproxy:yes

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

<--- Transmitting (NAT) to 193.22.119.20:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 193.22.119.20;branch=z9hG4bK14b2.e7840977.0;received=193.22.119.20
Via: SIP/2.0/UDP 193.22.119.20;branch=z9hG4bK14b2.d7840977.0
Via: SIP/2.0/UDP 192.168.5.100:5060;received=333.444.555.666;branch=z9hG4bK628c3d36;rport=5060
Record-Route: <sip:193.22.119.20;lr=on;ftag=as636f7e93>
Record-Route: <sip:193.22.119.20;lr=on;ftag=as636f7e93>
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 103 INVITE
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:account@192.168.5.100>
Content-Length: 0


<------------>
   -- Now forwarding Console/default to 'Local/s@from-provider' (thanks to SIP/NEXTC-0000048a)
Scheduling destruction of SIP dialog '0b0737290c8c655f1ca7fe5c3b308b3a@provider.com' in 6400 ms (Method: INVITE)
[Apr 27 17:20:42] WARNING[17514]: chan_sip.c:15559 func_header_read: This function can only be used on SIP channels.
Reliably Transmitting (NAT) to 193.22.119.20:5060:
CANCEL sip:950956141@provider.com SIP/2.0
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK628c3d36;rport
Max-Forwards: 70
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 103 CANCEL
User-Agent: Asterisk PBX 1.6.0.28
Content-Length: 0


---
   -- Executing [s@from-provider:1] NoOp("Local/s@from-provider-c91f;2", "") in new stack
[Apr 27 17:20:42] WARNING[17514]: chan_sip.c:15559 func_header_read: This function can only be used on SIP channels.
Scheduling destruction of SIP dialog '0b0737290c8c655f1ca7fe5c3b308b3a@provider.com' in 6400 ms (Method: INVITE)
   -- Executing [s@from-provider:2] Set("Local/s@from-provider-c91f;2", "dialed=") in new stack
   -- Executing [s@from-provider:3] Goto("Local/s@from-provider-c91f;2", "ext-did,,1") in new stack
   -- Goto (ext-did,s,1)
[Apr 27 17:20:42] WARNING[17514]: pbx.c:3781 __ast_pbx_run: Channel 'Local/s@from-provider-c91f;2' sent into invalid extension 's' in context 'ext-did', but no invalid handler
 == Everyone is busy/congested at this time (1:0/0/1)
   -- Executing [950956141@from-next:4] Hangup("Console/default", "") in new stack
 == Spawn extension (from-next, 950956141, 4) exited non-zero on 'Console/default'
 --- <("<) --- Hangup on Console --- (>")> ---
Really destroying SIP dialog '225dc8ab4963b9c0030343da710c040e@127.0.1.1' Method: REGISTER
asterisk*CLI>
<--- SIP read from UDP://192.168.31.101:5060 --->

<------------->
Really destroying SIP dialog '4bdef3090f8df2673fe4f43073eb7595@127.0.1.1' Method: REGISTER
Retransmitting #1 (NAT) to 193.22.119.20:5060:
CANCEL sip:950956141@provider.com SIP/2.0
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK628c3d36;rport
Max-Forwards: 70
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 103 CANCEL
User-Agent: Asterisk PBX 1.6.0.28
Content-Length: 0


---
Really destroying SIP dialog '7ae54185564cfa6126b99a1530084f65@127.0.1.1' Method: REGISTER
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
SIP/2.0 200 canceling
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK628c3d36;rport=5060;received=333.444.555.666
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>;tag=0dc66d454840fa7d0b618c9f0fdb83b7-d1fa
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 103 CANCEL
Server: OpenSER (1.2.1-notls (i386/linux))
Content-Length: 0


<------------->
--- (8 headers 0 lines) ---
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
CANCEL sip:s@192.168.5.100 SIP/2.0
Via: SIP/2.0/UDP 193.22.119.20;branch=z9hG4bK14b2.e7840977.0
Via: SIP/2.0/UDP 193.22.119.20;branch=z9hG4bK14b2.d7840977.0
Via: SIP/2.0/UDP 192.168.5.100:5060;received=333.444.555.666;branch=z9hG4bK628c3d36;rport=5060
Max-Forwards: 31
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 103 CANCEL
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---
Sending to 193.22.119.20 : 5060 (NAT)
Scheduling destruction of SIP dialog '0b0737290c8c655f1ca7fe5c3b308b3a@provider.com' in 6400 ms (Method: CANCEL)

<--- Reliably Transmitting (NAT) to 193.22.119.20:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK7b9a1845;received=193.22.119.20;rport=5060
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>;tag=0dc66d454840fa7d0b618c9f0fdb83b7-d1fa
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


<------------>

<--- Transmitting (NAT) to 193.22.119.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 193.22.119.20;branch=z9hG4bK14b2.e7840977.0;received=193.22.119.20
Via: SIP/2.0/UDP 193.22.119.20;branch=z9hG4bK14b2.d7840977.0
Via: SIP/2.0/UDP 192.168.5.100:5060;received=333.444.555.666;branch=z9hG4bK628c3d36;rport=5060
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>;tag=0dc66d454840fa7d0b618c9f0fdb83b7-d1fa
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 103 CANCEL
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


<------------>
Really destroying SIP dialog '1782a17244444ab40d24014327cb6b9e@127.0.1.1' Method: REGISTER
Really destroying SIP dialog '2a754bde4f0638e4249ee5905c243592@127.0.1.1' Method: REGISTER
asterisk*CLI>
<--- SIP read from UDP://193.22.119.20:5060 --->
SIP/2.0 200 canceling
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK628c3d36;rport=5060;received=333.444.555.666
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>;tag=0dc66d454840fa7d0b618c9f0fdb83b7-d1fa
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 103 CANCEL
Server: OpenSER (1.2.1-notls (i386/linux))
Content-Length: 0


<------------->
--- (8 headers 0 lines) ---
Retransmitting #1 (NAT) to 193.22.119.20:5060:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK7b9a1845;received=193.22.119.20;rport=5060
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>;tag=0dc66d454840fa7d0b618c9f0fdb83b7-d1fa
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


---
Really destroying SIP dialog '540b8664675933455eef7c5801e6ee6d@127.0.1.1' Method: REGISTER
Retransmitting #2 (NAT) to 193.22.119.20:5060:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK7b9a1845;received=193.22.119.20;rport=5060
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>;tag=0dc66d454840fa7d0b618c9f0fdb83b7-d1fa
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


---
Retransmitting #3 (NAT) to 193.22.119.20:5060:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK7b9a1845;received=193.22.119.20;rport=5060
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>;tag=0dc66d454840fa7d0b618c9f0fdb83b7-d1fa
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


---
Really destroying SIP dialog '415ba657-06a61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-88a61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-c8a61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-7ca61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-90b61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-c0b61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-03b61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-24b61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-d6c61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-78c61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-19c61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-49c61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-e8d61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-bad61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-1cd61026-2a8082@193.22.119.20' Method: OPTIONS
Really destroying SIP dialog '415ba657-e0e61026-2a8082@193.22.119.20' Method: OPTIONS
asterisk*CLI> consol
<--- SIP read from UDP://192.168.31.108:5060 --->

<------------->
Retransmitting #4 (NAT) to 193.22.119.20:5060:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK7b9a1845;received=193.22.119.20;rport=5060
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>;tag=0dc66d454840fa7d0b618c9f0fdb83b7-d1fa
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


---
Reliably Transmitting (NAT) to 10.0.0.43:5060:
OPTIONS sip:102@10.0.0.43:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.4:5060;branch=z9hG4bK11c32d7a;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@10.0.0.4>;tag=as19893121
To: <sip:102@10.0.0.43:5060>
Contact: <sip:Unknown@10.0.0.4>
Call-ID: 4747e4210f3dca5e466f730042d6c8fa@10.0.0.4
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Date: Wed, 27 Apr 2011 15:20:44 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


---
asterisk*CLI> console han
<--- SIP read from UDP://10.0.0.43:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.4:5060;branch=z9hG4bK11c32d7a;rport=5060
From: "Unknown" <sip:Unknown@10.0.0.4>;tag=as19893121
To: <sip:102@10.0.0.43:5060>;tag=3601982364
Call-ID: 4747e4210f3dca5e466f730042d6c8fa@10.0.0.4
CSeq: 102 OPTIONS
Contact: <sip:102@10.0.0.43:5060>
Supported: replaces
Allow-Events: message-summary, refer, ua-profile
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Accept: application/sdp,application/dtmf-relay,application/simple-message-summary,message/sipfrag
Accept-Encoding: identity
Accept-Language: en
Content-Length: 0


<------------->
--- (14 headers 0 lines) ---
Really destroying SIP dialog '4747e4210f3dca5e466f730042d6c8fa@10.0.0.4' Method: OPTIONS
Reliably Transmitting (NAT) to 10.0.0.44:5060:
OPTIONS sip:104@10.0.0.44:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.4:5060;branch=z9hG4bK006277c5;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@10.0.0.4>;tag=as037095bc
To: <sip:104@10.0.0.44:5060>
Contact: <sip:Unknown@10.0.0.4>
Call-ID: 180e6d2d5001b9c91745134826a159a5@10.0.0.4
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Date: Wed, 27 Apr 2011 15:20:44 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


---
asterisk*CLI> console hang
<--- SIP read from UDP://10.0.0.44:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.4:5060;branch=z9hG4bK006277c5;rport=5060
From: "Unknown" <sip:Unknown@10.0.0.4>;tag=as037095bc
To: <sip:104@10.0.0.44:5060>;tag=2207677857
Call-ID: 180e6d2d5001b9c91745134826a159a5@10.0.0.4
CSeq: 102 OPTIONS
Contact: <sip:104@10.0.0.44:5060>
Supported: replaces
Allow-Events: message-summary, refer, ua-profile
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Accept: application/sdp,application/dtmf-relay,application/simple-message-summary,message/sipfrag
Accept-Encoding: identity
Accept-Language: en
Content-Length: 0


<------------->
--- (14 headers 0 lines) ---
Really destroying SIP dialog '180e6d2d5001b9c91745134826a159a5@10.0.0.4' Method: OPTIONS
asterisk*CLI> console hangup
<--- SIP read from UDP://192.168.31.96:5060 --->

<------------->
Retransmitting ASTERISK-1 (NAT) to 193.22.119.20:5060:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK7b9a1845;received=193.22.119.20;rport=5060
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>;tag=0dc66d454840fa7d0b618c9f0fdb83b7-d1fa
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


---



<------------->
--- (13 headers 0 lines) ---
Sending to 10.0.0.52 : 5060 (NAT)
Reliably Transmitting (NAT) to 10.0.0.52:5060:
OPTIONS sip:201@10.0.0.52:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.4:5060;branch=z9hG4bK5a494b87;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@10.0.0.4>;tag=as013ebf5e
To: <sip:201@10.0.0.52:5060>
Contact: <sip:Unknown@10.0.0.4>
Call-ID: 417f38b50d3a6642741bd240472822dd@10.0.0.4
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.0.28
Date: Wed, 27 Apr 2011 15:20:47 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


---




<------------>
Scheduling destruction of SIP dialog '1985409740@10_0_0_52' in 32000 ms (Method: REGISTER)
asterisk*CLI> console hangup
<--- SIP read from UDP://10.0.0.52:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.4:5060;branch=z9hG4bK5a494b87;rport=5060
From: "Unknown" <sip:Unknown@10.0.0.4>;tag=as013ebf5e
To: <sip:201@10.0.0.52:5060>;tag=2975443970
Call-ID: 417f38b50d3a6642741bd240472822dd@10.0.0.4
CSeq: 102 OPTIONS
Contact: <sip:201@10.0.0.52:5060>
Supported: replaces
Allow-Events: message-summary, refer, ua-profile
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Accept: application/sdp,application/dtmf-relay,application/simple-message-summary,message/sipfrag
Accept-Encoding: identity
Accept-Language: en
Content-Length: 0


<------------->
--- (14 headers 0 lines) ---
Really destroying SIP dialog '417f38b50d3a6642741bd240472822dd@10.0.0.4' Method: OPTIONS
asterisk*CLI> console hangup
No call to hang up
Command 'console hangup' failed.
Retransmitting ASTERISK-2 (NAT) to 193.22.119.20:5060:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.5.100:5060;branch=z9hG4bK7b9a1845;received=193.22.119.20;rport=5060
From: "MyName Here" <sip:account@provider.com>;tag=as636f7e93
To: <sip:950956141@provider.com>;tag=0dc66d454840fa7d0b618c9f0fdb83b7-d1fa
Call-ID: 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.28
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


---
asterisk*CLI> exit
<--- SIP read from UDP://192.168.31.57:5060 --->

<------------->
asterisk*CLI> exit
<--- SIP read from UDP://192.168.31.63:5060 --->

<------------->
asterisk*CLI>
<--- SIP read from UDP://192.168.31.79:5060 --->

<------------->
asterisk*CLI> sip set debug off
SIP Debugging Disabled
[Apr 27 17:20:52] WARNING[3064]: chan_sip.c:2961 retrans_pkt: Maximum retries exceeded on transmission 0b0737290c8c655f1ca7fe5c3b308b3a@provider.com for seqno 102 (Critical Response) -- See doc/sip-retransmit.txt.
asterisk*CLI>
Comments:By: Alberto Sagredo (albersag) 2011-04-27 10:39:12

Im using this simple incoming dialplan

[from-voztele]
exten => s,1,Noop(${SIP_HEADER(To)})
exten => s,n,Set(dialed=${SIP_HEADER(To):5:9})
exten => s,n,Goto(ext-did,${dialed},1)


But for incoming call, my own DIDs is not usable, as SIP_HEADER is not usable because channel was converted to Local/

By: Paul Belanger (pabelanger) 2011-04-27 10:42:29

That is because you are using the console command, look into Originate(). This is not a bug, but a support request.
---
Thanks for your comments. This does not appear to be a bug report and we are closing it. We appreciate the difficulties you are facing, but it would make more sense to raise your question in the support tracker, http://www.asterisk.org/support

By: Alberto Sagredo (albersag) 2011-04-27 10:49:22

I get same problem when dialing with SIP internal extension. I will add this trace. Not only making console command

By: Leif Madsen (lmadsen) 2011-04-27 10:59:32

Please attach a plain text file, not a Rich Text Format file.

By: Leif Madsen (lmadsen) 2011-04-27 11:00:44

From the looks of it I agree with Paul that this is likely a configuration or education issue.

By: Alberto Sagredo (albersag) 2011-04-27 11:15:09

Please take a look to second trace. Sorry for last RTF format on file.

This call has been done from SIP local extension and i get the same

 -- Now forwarding SIP/100-000004bd to 'Local/s@from-voztele' (thanks to SIP/NEXTC-000004be)

By: David Woolley (davidw) 2011-04-27 12:02:26

It is behaving as intended.  After the redirect, there is no longer any SIP protocol running on the outbound side.  Your SIP provider is actually being nice by not charging you for the call.

The incoming call is not running on a local channel.  A local channel has been substituted for the SIP channel on which the original outbound call was attempted, which is on the other side of the Dial application from the incoming channel.

A local channel has to be used because Asterisk wants to interpret the redirected address in the name-space (context) associated with incoming calls from that peer, so it has to run dialplan to translate that number.

The final result may never end up on a channel, e.g. it might end up on a voice announcement, so you can't say that there is any physical channel technology associated with it.

If it does end up on a physical channel, that may not be SIP.  When it does and that channel is answered, the Local channel should be optimised out.

There does seem to be a problem with your SIP provider, if they provide DID for incoming calls, in that they should have redirected to the DID, but you should not be trying to disect SIP headers; you should be looking at the target ${EXTEN}.  In any case, the redirected address does not appear in a To header, it will be in a Contact header, but that SIP session will be completely dead by the time that the new target extension gets run.  All this paragraph is really about support issues.

By: David Woolley (davidw) 2011-04-27 12:39:52

Actually, in this case, the call hasn't been redirected by the SIP provider, so they are trying to charge you.  Asterisk has been clever enough to detect that there is a loop in the routing and has inferred the redirect, to optimise out that loop.

I can actually see why you are trying to parse out the To header, now, but that is a bug in the downstream system.  It has rewritten the user part of the INVITE parameter, which it should not do if it is providing proper DID service.

You shouldn't of course, be allowing such a loop to form in the first place - you should recognize and handle your own number without passing it to your service provider.

If you want me to go further, please take this to the Asterisk Support forum.

By: Alberto Sagredo (albersag) 2011-04-27 12:43:38

Thanks for clarification davidw.