[Home]

Summary:ASTERISK-16993: regression improper sip parse when invite contains values to the left of the @ ;phone-context=+1;npdi=yes
Reporter:Daniel Jacobson (danimal)Labels:
Date Opened:2010-11-21 13:58:57.000-0600Date Closed:2011-05-20 08:42:18
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
is related toASTERISK-26316 res_pjsip_callerid: Irregular URI causes unexpected callerid
Environment:Attachments:( 0) sip_debug.log
Description:This is related to a circa 2006 issue ASTERISK-7707761

when a call origionates from the pstn to a sonus and terminates to asterisk 1.8 sonus adds values to the left side of the @ side in the invite. Previous versions of asterisk would return only the telephone number in ${EXTEN}. 1.8 is returning everything to the left of the @ sign in ${EXTEN}/

steps to reproduce.
1. install centos 5.5
2. install asterisk 1.8 via the digium repository / yum install
3. my upstream provider uses a sonus GW for pstn terminaltion.
4. call from the pstn to asterisk 1.8
5. exten =>_X!,1,NOOP(dialed number => ${EXTEN})
6, notice the value of ${EXTEN}

anticipated results
asterisk will return only the DID number in ${EXTEN}

actual results
asterisk is returning everything to the left side of the @ symbol in ${EXTEN} this value is then also stored in the cdr records as well.

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

========  sip.conf  =========
[360trunk]  
call-limit=40
type=peer
host=66.62.140.44
port=5060
context=default
country=us
dtmfmode=rfc2833
nat=never
restrictcid=no
canreinvite=yes
insecure=no
disallow=all
allow=ulaw
promiscredir=yes
qualify=yes
t38pt_udptl=yes
sendrpid=no
trustrpid=no
tos=0xb8
transport=udp

=====extensions.conf========
[default]
include => incoming ; Inbound Calls Context

[incoming]
exten => _X!,1,NOOP(==================================>)
exten => _X!,n,NOOP(== incoming wildcard extension =>)
exten => _X!,n,NOOP(==================================>)
exten => _X!,n,NOOP(callerid => ${CALLERID(all)})
exten => _X!,n,NOOP(dialed number => ${EXTEN})



========= sip debug of incoming call=========
<--- SIP read from UDP:66.62.140.44:5060 --->
INVITE sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK96b6cf87df92316e0cf72901dbbda8fc
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3252 INVITE
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed
Contact: "KANOBE LLC " <sip:2069106501@66.62.140.44:5060;transport=udp>
Supported: timer,100rel
Session-Expires: 1800
Min-SE: 1800
Content-Length: 268
Content-Disposition: session; handling=required
Content-Type: application/sdp

v=0
o=Sonus_UAC 1708701 170870100 IN IP4 66.62.140.38
s=SIP Media Capabilities
c=IN IP4 66.62.140.38
t=0 0
m=audio 16784 RTP/AVP 0 18 100
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-15
a=sendrecv
a=maxptime:20
<------------->
--- (16 headers 12 lines) ---
 == Using UDPTL TOS bits 184
 == Using UDPTL CoS mark 5
Sending to 66.62.140.44:5060 (no NAT)
Using INVITE request as basis request - 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
Found peer '360trunk' for '2069106501;phone-context=+1' from 66.62.140.44:5060
 == Using SIP RTP TOS bits 184
 == Using SIP RTP CoS mark 5
Found RTP audio format 0
Found RTP audio format 18
Found RTP audio format 100
Found audio description format PCMU for ID 0
Found audio description format G729 for ID 18
Found audio description format telephone-event for ID 100
Capabilities: us - 0x4 (ulaw), peer - audio=0x104 (ulaw|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 66.62.140.38:16784
Looking for 4259967033;phone-context=+1;npdi=yes in default (domain 76.191.73.19:5060)
list_route: hop: <sip:2069106501@66.62.140.44:5060;transport=udp>

<--- Transmitting (no NAT) to 66.62.140.44:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK96b6cf87df92316e0cf72901dbbda8fc;received=66.62.140.44
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3252 INVITE
Server: KanobeVOICE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060>
Content-Length: 0


<------------>
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:1] NoOp("SIP/360trunk-0000001a", "==================================>") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:2] NoOp("SIP/360trunk-0000001a", "== incoming wildcard extension =>") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:3] NoOp("SIP/360trunk-0000001a", "==================================>") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:4] NoOp("SIP/360trunk-0000001a", "callerid => "KANOBE LLC " <2069106501>") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:5] NoOp("SIP/360trunk-0000001a", "dialed number => 4259967033;phone-context=+1;npdi=yes") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:6] ExecIf("SIP/360trunk-0000001a", "0?Set(DIALEDNUMBER=4259967033;phone-context=+1;npdi=yes") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:7] ExecIf("SIP/360trunk-0000001a", "0?Set(DIALEDNUMBER=259967033;") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:8] ExecIf("SIP/360trunk-0000001a", "1?Set(DIALEDNUMBER=4259967033") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:9] NoOp("SIP/360trunk-0000001a", "dialed number => 4259967033") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:10] NoOp("SIP/360trunk-0000001a", "===============================>") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:11] NoOp("SIP/360trunk-0000001a", "==    CURL ROUTING ENGINE    ==>") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:12] NoOp("SIP/360trunk-0000001a", "===============================>") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:13] Set("SIP/360trunk-0000001a", "DIDTEST=1+2005400+1+SIP/4259967033@2005666") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:14] Set("SIP/360trunk-0000001a", "ISLOCAL=1") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:15] Set("SIP/360trunk-0000001a", "ACCOUNTCODE=2005400") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:16] Set("SIP/360trunk-0000001a", "ACCOUNTSTATUS=1") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:17] Set("SIP/360trunk-0000001a", "ROUTETO=SIP/4259967033@2005666") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:18] GotoIf("SIP/360trunk-0000001a", "1?LocalDial:ExternalDial") in new stack
   -- Goto (default,4259967033;phone-context=+1;npdi=yes,19)
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:19] ExecIf("SIP/360trunk-0000001a", "1?Set(CDR(accountcode)=2005400)") in new stack
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:20] GotoIf("SIP/360trunk-0000001a", "1?AccountActive") in new stack
   -- Goto (default,4259967033;phone-context=+1;npdi=yes,23)
   -- Executing [4259967033;phone-context=+1;npdi=yes@default:23] Dial("SIP/360trunk-0000001a", "SIP/4259967033@2005666") in new stack
 == Using UDPTL TOS bits 184
 == Using UDPTL CoS mark 5
 == Using SIP RTP TOS bits 184
 == Using SIP RTP CoS mark 5
   -- Called 4259967033@2005666
   -- SIP/2005666-0000001b answered SIP/360trunk-0000001a
Audio is at 5060
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to 66.62.140.44:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK96b6cf87df92316e0cf72901dbbda8fc;received=66.62.140.44
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>;tag=as7aac8b01
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3252 INVITE
Server: KanobeVOICE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060>
Content-Type: application/sdp
Content-Length: 232

v=0
o=root 818997582 818997582 IN IP4 76.191.73.19
s=Asterisk PBX 1.8.0
c=IN IP4 76.191.73.19
t=0 0
m=audio 18940 RTP/AVP 0 100
a=rtpmap:0 PCMU/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-16
a=ptime:20
a=sendrecv

<------------>
   -- Locally bridging SIP/360trunk-0000001a and SIP/2005666-0000001b

<--- SIP read from UDP:66.62.140.44:5060 --->
ACK sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060 SIP/2.0
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK6b38db7ebfa0e007b765f5b3192e560e
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>;tag=as7aac8b01
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3252 ACK
Max-Forwards: 70
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:66.62.140.44:5060 --->
INVITE sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060 SIP/2.0
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK17d7ff698b24dbaf7d82326d58330c67
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>;tag=as7aac8b01
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3253 INVITE
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed
Contact: "KANOBE LLC " <sip:2069106501@66.62.140.44:5060;transport=udp>
Supported: timer,100rel
Session-Expires: 1800;refresher=uac
Min-SE: 1800
Content-Length: 242
Content-Disposition: session; handling=required
Content-Type: application/sdp

v=0
o=Sonus_UAC 1708701 170870101 IN IP4 66.62.140.38
s=SIP Media Capabilities
c=IN IP4 66.62.140.38
t=0 0
m=audio 16784 RTP/AVP 0 100
a=rtpmap:0 PCMU/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-15
a=sendrecv
a=maxptime:20
<------------->
--- (16 headers 11 lines) ---
Sending to 66.62.140.44:5060 (no NAT)
Found RTP audio format 0
Found RTP audio format 100
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 100
Capabilities: us - 0x4 (ulaw), peer - audio=0x4 (ulaw)/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 66.62.140.38:16784

<--- Transmitting (no NAT) to 66.62.140.44:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK17d7ff698b24dbaf7d82326d58330c67;received=66.62.140.44
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>;tag=as7aac8b01
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3253 INVITE
Server: KanobeVOICE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060>
Content-Length: 0


<------------>
Audio is at 5060
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to 66.62.140.44:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK17d7ff698b24dbaf7d82326d58330c67;received=66.62.140.44
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>;tag=as7aac8b01
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3253 INVITE
Server: KanobeVOICE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060>
Content-Type: application/sdp
Content-Length: 232

v=0
o=root 818997582 818997583 IN IP4 76.191.73.19
s=Asterisk PBX 1.8.0
c=IN IP4 76.191.73.19
t=0 0
m=audio 18940 RTP/AVP 0 100
a=rtpmap:0 PCMU/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-16
a=ptime:20
a=sendrecv

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

<--- SIP read from UDP:66.62.140.44:5060 --->
ACK sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060 SIP/2.0
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bKbf3c410367b0505b8a90dedc1836d6bc
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>;tag=as7aac8b01
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3253 ACK
Max-Forwards: 70
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:66.62.140.44:5060 --->
INVITE sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060 SIP/2.0
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK159afd52c8662b484e4764cc316947d9
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>;tag=as7aac8b01
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3254 INVITE
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed
Contact: "KANOBE LLC " <sip:2069106501@66.62.140.44:5060;transport=udp>
Supported: timer,100rel
Session-Expires: 1800;refresher=uac
Min-SE: 1800
Content-Length: 268
Content-Disposition: session; handling=required
Content-Type: application/sdp

v=0
o=Sonus_UAC 1708701 170870101 IN IP4 66.62.140.38
s=SIP Media Capabilities
c=IN IP4 66.62.140.38
t=0 0
m=audio 16784 RTP/AVP 0 18 100
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-15
a=sendrecv
a=maxptime:20
<------------->
--- (16 headers 12 lines) ---
Sending to 66.62.140.44:5060 (no NAT)

<--- Transmitting (no NAT) to 66.62.140.44:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK159afd52c8662b484e4764cc316947d9;received=66.62.140.44
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>;tag=as7aac8b01
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3254 INVITE
Server: KanobeVOICE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060>
Content-Length: 0


<------------>
Audio is at 5060
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to 66.62.140.44:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK159afd52c8662b484e4764cc316947d9;received=66.62.140.44
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>;tag=as7aac8b01
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3254 INVITE
Server: KanobeVOICE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060>
Content-Type: application/sdp
Content-Length: 232

v=0
o=root 818997582 818997583 IN IP4 76.191.73.19
s=Asterisk PBX 1.8.0
c=IN IP4 76.191.73.19
t=0 0
m=audio 18940 RTP/AVP 0 100
a=rtpmap:0 PCMU/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-16
a=ptime:20
a=sendrecv

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

<--- SIP read from UDP:66.62.140.44:5060 --->
ACK sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060 SIP/2.0
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK2f54ef84a4f92fa961acd029a34d6186
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>;tag=as7aac8b01
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3254 ACK
Max-Forwards: 70
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:66.62.140.44:5060 --->
BYE sip:4259967033;phone-context=+1;npdi=yes@76.191.73.19:5060 SIP/2.0
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK340e430c7713c2925882ac9f058de4a7
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>;tag=as7aac8b01
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3255 BYE
Max-Forwards: 70
Supported: 100rel
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Sending to 66.62.140.44:5060 (no NAT)
Scheduling destruction of SIP dialog '0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44' in 6400 ms (Method: BYE)

<--- Transmitting (no NAT) to 66.62.140.44:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 66.62.140.44:5060;branch=z9hG4bK340e430c7713c2925882ac9f058de4a7;received=66.62.140.44
From: "KANOBE LLC " <sip:2069106501;phone-context=+1@76.191.73.19:5060;user=phone>;tag=9b85b6358c7c201476787c3241c38f29
To: <sip:4259967033;phone-context=+1@76.191.73.19:5060;user=phone>;tag=as7aac8b01
Call-ID: 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44
CSeq: 3255 BYE
Server: KanobeVOICE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Length: 0


<------------>
   -- Executing [h@default:1] NoOp("SIP/360trunk-0000001a", "==================================>") in new stack
   -- Executing [h@default:2] NoOp("SIP/360trunk-0000001a", " incoming h extension") in new stack
   -- Executing [h@default:3] NoOp("SIP/360trunk-0000001a", "==================================>") in new stack
   -- Executing [h@default:4] NoOp("SIP/360trunk-0000001a", "Terminating Call from "KANOBE LLC " <2069106501>") in new stack
   -- Executing [h@default:5] NoOp("SIP/360trunk-0000001a", "Extension: SIP/360trunk-0000001a") in new stack
   -- Executing [h@default:6] NoOp("SIP/360trunk-0000001a", "sipcallid => 0ab959c4528e734d1c22e6f8a694bc59-851e8@66.62.140.44") in new stack
   -- Executing [h@default:7] NoOp("SIP/360trunk-0000001a", "uniqueid => 1290367148.26") in new stack
   -- Executing [h@default:8] NoOp("SIP/360trunk-0000001a", "callerid => "KANOBE LLC " <2069106501>") in new stack
   -- Executing [h@default:9] NoOp("SIP/360trunk-0000001a", "disposition => ANSWERED") in new stack
   -- Executing [h@default:10] NoOp("SIP/360trunk-0000001a", "call duration => 3 seconds") in new stack
   -- Executing [h@default:11] NoOp("SIP/360trunk-0000001a", "current number of active calls => 1") in new stack
   -- Executing [h@default:12] NoOp("SIP/360trunk-0000001a", "HANGUPCAUSE: 16") in new stack
   -- Executing [h@default:13] NoOp("SIP/360trunk-0000001a", "REASON: ") in new stack
   -- Executing [h@default:14] NoOp("SIP/360trunk-0000001a", "rtpqos all => ssrc=1781615572;themssrc=0;lp=0;rxjitter=0.000000;rxcount=0;txjitter=0.000000;txcount=0;rlp=0;rtt=0.000000") in new stack
   -- Executing [h@default:15] NoOp("SIP/360trunk-0000001a", "WRITING CDR RECORD") in new stack
   -- Executing [h@default:16] ResetCDR("SIP/360trunk-0000001a", "w") in new stack
   -- Executing [h@default:17] NoCDR("SIP/360trunk-0000001a", "") in new stack
 == Spawn extension (default, 4259967033;phone-context=+1;npdi=yes, 23) exited non-zero on 'SIP/360trunk-0000001a'
Comments:By: Stefan Schmidt (schmidts) 2010-11-22 15:47:26.000-0600

I think this is a regression cause RFC 3261 says:
The escaping rules defined above allow a semicolon to appear unescaped in this field.  For the purposes of this protocol, the field is opaque.  The structure of that value is only useful to the SIP element responsible for the resource.

See chapter 19.1.3 for the user part of a Sip-Uri and telephony subscriber field handling (RFC RFC 2806 part 9)

btw please attach logfiles only as text files and not in your description.


thx
Stefan

By: Andy Boatman (mrhanman) 2010-12-03 13:30:49.000-0600

I'm seeing this issue as well coming from 1.6 to 1.8.  We have calls coming from a Nortel CS1000 via SIP.  Previously, the DID is set to just the extension dialed.  Now, it is set to "8000;phone-context=cdp.udp".  I attached a copy of the console output with SIP debugging on.

By: Jim Beckner III (kg4ysy) 2010-12-03 14:17:28.000-0600

We also run CS1000 to Asterisk.  As a "fix"  I made the following adjustment to the incoming context for the CS1000 trunks.  This may have to be slightly adjusted depending on what the CS1000 is sending you.  Hopefully this is helpful for those looking for a quick "fix".

[from-trunk-sip-CS1000]
exten => _.,1,Set(GROUP()=OUT_2)
exten => _.,2,GotoIf($[ "${EXTEN:-22}" = ";phone-context=udp.cdp"]?goto1:goto2
exten => _.,n(goto1),Goto(from-trunk,${EXTEN:0:-22},1)
exten => _.,n(goto2),Goto(from-trunk,${EXTEN},1)

By: Leif Madsen (lmadsen) 2010-12-06 14:30:38.000-0600

A better work around than using ${EXTEN:-22} would be:

exten => _.,1,Set(IncomingNumber=${CUT(EXTEN,;,1)})


or you could use FILTER()

exten => _.,1,Set(IncomingNumber=${FILTER(0-9a-zA-Z,${EXTEN})})

Something like that.

(In the first example the ; may need to be escaped with a backslash (\)

By: Daniel Jacobson (danimal) 2010-12-07 10:23:12.000-0600

I can verify on asterisk 1.8.0
running on centos 5.5
installed via digium repos
the backslash needs to be escaped

exten => _X!,n,ExecIf($[${LEN(${EXTEN})}>12]?Set(DIALEDNUMBER=${CUT(EXTEN,\;,1)})

By: Daniel Jacobson (danimal) 2010-12-18 16:36:33.000-0600

this issue exists in 1.8.1.1

Asterisk 1.8.1.1 built by root @ localhost.localdomain on a x86_64 running Linux on 2010-12-14 17:16:58 UTC

   -- Executing [4259967033;phone-context=+1;npdi=yes@default:5] NoOp("SIP/360trunk-00000094", "dialed number => 4259967033;phone-context=+1;npdi=yes") in new stack

By: Daniel Jacobson (danimal) 2011-01-02 14:11:19.000-0600

this issue DOES NOT exist in 1.6.2.15

Asterisk 1.6.2.15 built by root @ localhost.localdomain on a x86_64 running Linux on 2010-12-13 03:39:01 UTC

   -- Executing [4254887565@default:9] NoOp("SIP/360trunk-00000190", "dialed number => 4254887565") in new stack

By: Daniel Jacobson (danimal) 2011-03-21 13:48:06

This issue exists in 1.8.2.2

Asterisk 1.8.2.2 built by root @ localhost.localdomain on a x86_64 running Linux on 2011-01-20 21:32:01 UTC


   -- Executing [4254883646;phone-context=+1;npdi=yes@default:6] NoOp("SIP/360trunk-00000536", "dialed number => 4254883646;phone-context=+1;npdi=yes") in new stack

By: Daniel Jacobson (danimal) 2011-04-18 18:56:55

this issues exists in 1.8.3.2

Asterisk 1.8.3.2 built by root @ localhost.localdomain on a i686 running Linux on 2011-03-30 20:17:17 UTC


   -- Executing [4254883646;phone-context=+1;npdi=yes@voiptelout:1] NoOp("SIP/666@kanobe.com-00000001", "4254883646;phone-context=+1;npdi=yes") in new stack

By: Jonathan Rose (jrose) 2011-04-19 12:45:52

The good news is that I've been actively working on this for a while now.

https://reviewboard.asterisk.org/r/1188/

If you are particularly eager, you can try downloading the diff and using it as a patch.

By: Digium Subversion (svnbot) 2011-05-20 08:28:27

Repository: asterisk
Revision: 319938

U   branches/1.8/channels/chan_sip.c
U   branches/1.8/channels/sip/include/sip.h
U   branches/1.8/configs/sip.conf.sample

------------------------------------------------------------------------
r319938 | jrose | 2011-05-20 08:28:26 -0500 (Fri, 20 May 2011) | 12 lines

Adds legacy_useroption_parsing to address interoperability concerns.

With the new option engaged, Asterisk should interpret user fields with useroptions
contained within the userfield of the uri by stripping them out of the original message
whenever a semicolon is encountered in the userfield string.

(closes issue ASTERISK-16993)
Reported by: danimal
Tested by: jrose

Review: https://reviewboard.asterisk.org/r/1223/

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=319938

By: Digium Subversion (svnbot) 2011-05-20 08:42:17

Repository: asterisk
Revision: 319939

_U  trunk/
U   trunk/channels/chan_sip.c
U   trunk/channels/sip/include/sip.h
U   trunk/configs/sip.conf.sample

------------------------------------------------------------------------
r319939 | jrose | 2011-05-20 08:42:16 -0500 (Fri, 20 May 2011) | 19 lines

Merged revisions 319938 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
 r319938 | jrose | 2011-05-20 08:28:24 -0500 (Fri, 20 May 2011) | 12 lines
 
 Adds legacy_useroption_parsing to address interoperability concerns.
 
 With the new option engaged, Asterisk should interpret user fields with useroptions
 contained within the userfield of the uri by stripping them out of the original message
 whenever a semicolon is encountered in the userfield string.
 
 (closes issue ASTERISK-16993)
 Reported by: danimal
 Tested by: jrose
 
 Review: https://reviewboard.asterisk.org/r/1223/
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=319939