Hi every one,
In my connect to My provider i see that, have two INVITE. The 1st INVITE have hearder History-Info. The 2nd INVITE have not. I want to get that heard in 1st. I am using below command. But the result is null. I think that Asterisk had get data from 2nd INVETE. Pls help me to do get data from 1st hearder.
exten => xxxxxx,1,Answer()
exten => xxxxxx,n,Set(STR=${SIP_HEADER(History-Info)})
exten => xxxxxx,n,NoOp(${STR})
i am using SIP with asterisk 16.
below log SIP with INVITE
<------------>
Scheduling destruction of SIP dialog '6ou4s6m6m3p4p64zmu4to83p5sh3z8th@10.18.5.64' in 32000 ms (Method: OPTIONS)
Really destroying SIP dialog '38p429585o82t4hp5863058954szttp2@10.18.5.64' Method: OPTIONS
<--- SIP read from UDP:10.226.4.2:5065 --->
INVITE sip:67075000173@10.226.240.6;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.226.4.2:5065;branch=z9hG4bKdrqagqgdsrk8inr9tqu3kn91a;X-DispMsg=1400
Route: <sip:10.226.240.6:5060;transport=udp;lr>
Call-ID: itu9819113sotg9n8ttrirk1unon33is@10.18.5.64
From: "75947754"<sip:75947754@10.226.4.2;transport=udp;user=phone>;tag=gnon31rk-CC-1003-OFC-27
To: "67075000173"<sip:67075000173@10.226.240.6;transport=udp;user=phone>
CSeq: 1 INVITE
P-Access-Network-Info: GEN-ACCESS;"area-number=+6707"
Max-Forwards: 70
Contact: <sip:75947754@10.226.4.2:5060;user=phone>
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,PRACK,NOTIFY,MESSAGE,REFER,UPDATE
P-Asserted-Identity: <tel:75947754>
History-Info: <sip:75582956@anonymous.invalid?reason=SIP%3Bcause%3D503%3Btext%3D%22Subscriber%20Not%20Reachable%22&Privacy=history>;index=1
History-Info: <sip:67075000173@10.226.240.6:5060;transport=udp>;index=1.1
P-Early-Media: supported
Supported: 100rel,timer,histinfo,precondition
Min-SE: 90
Session-Expires: 1800;refresher=uac
Content-Length: 682
Content-Type: application/sdp
v=0
o=HuaweiSoftx3000 1124732562 1124732563 IN IP4 10.226.4.2
s=SipCall
c=IN IP4 10.226.1.3
t=0 0
m=audio 61516 RTP/AVP 100 105 3 107 106 8 108 116
a=rtpmap:100 AMR/8000
a=fmtp:100 mode-set=0,2,5,7;mode-change-neighbor=1;mode-change-period=2
a=rtpmap:105 GSM-EFR/8000
a=rtpmap:3 GSM/8000
a=rtpmap:107 AMR/8000
a=fmtp:107 mode-set=0,2,4;mode-change-neighbor=1;mode-change-period=2
a=rtpmap:106 GSM-HR/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:108 AMR/8000
a=fmtp:108 mode-set=7
a=rtpmap:116 telephone-event/8000
a=ptime:20
a=maxptime:20
a=curr:qos local sendrecv
a=curr:qos remote none
a=des:qos mandatory local sendrecv
a=des:qos optional remote sendrecv
a=3gOoBTC
<------------->
--- (20 headers 24 lines) ---
Sending to 10.226.4.2:5065 (no NAT)
Sending to 10.226.4.2:5065 (no NAT)
Using INVITE request as basis request - itu9819113sotg9n8ttrirk1unon33is@10.18.5.64
Found peer 'trunk_GMSC42' for '75947754' from 10.226.4.2:5065
== Using SIP RTP CoS mark 5
Got SDP version 1124732563 and unique parts [HuaweiSoftx3000 1124732562 IN IP4 10.226.4.2]
Found RTP audio format 100
Found RTP audio format 105
Found RTP audio format 3
Found RTP audio format 107
Found RTP audio format 106
Found RTP audio format 8
Found RTP audio format 108
Found RTP audio format 116
Found unknown media description format AMR for ID 100
Found unknown media description format GSM-EFR for ID 105
Found audio description format GSM for ID 3
Found unknown media description format AMR for ID 107
Found unknown media description format GSM-HR for ID 106
Found audio description format PCMA for ID 8
Found unknown media description format AMR for ID 108
Found audio description format telephone-event for ID 116
Capabilities: us - (gsm|alaw|ulaw), peer - audio=(gsm|alaw)/video=(nothing)/text=(nothing), combined - (gsm|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
> 0x7f902c0009a0 -- Strict RTP learning after remote address set to: 10.226.1.3:61516
Peer audio RTP is at port 10.226.1.3:61516
Looking for 67075000173 in from_trunk_GMSC (domain 10.226.240.6)
sip_route_dump: route/path hop: <sip:75947754@10.226.4.2:5060;user=phone>
<--- Transmitting (no NAT) to 10.226.4.2:5065 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.226.4.2:5065;branch=z9hG4bKdrqagqgdsrk8inr9tqu3kn91a;X-DispMsg=1400;received=10.226.4.2
From: "75947754"<sip:75947754@10.226.4.2;transport=udp;user=phone>;tag=gnon31rk-CC-1003-OFC-27
To: "67075000173"<sip:67075000173@10.226.240.6;transport=udp;user=phone>
Call-ID: itu9819113sotg9n8ttrirk1unon33is@10.18.5.64
CSeq: 1 INVITE
Server: Asterisk PBX 16.20.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: <sip:67075000173@10.226.240.6:5060>
Content-Length: 0
<------------>
-- Executing [67075000173@from_trunk_GMSC:1] Answer("SIP/trunk_GMSC42-000003ae", "") in new stack
Audio is at 55468
Adding codec gsm to SDP
Adding codec alaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP
<--- Reliably Transmitting (no NAT) to 10.226.4.2:5065 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.226.4.2:5065;branch=z9hG4bKdrqagqgdsrk8inr9tqu3kn91a;X-DispMsg=1400;received=10.226.4.2
From: "75947754"<sip:75947754@10.226.4.2;transport=udp;user=phone>;tag=gnon31rk-CC-1003-OFC-27
To: "67075000173"<sip:67075000173@10.226.240.6;transport=udp;user=phone>;tag=as4bb03489
Call-ID: itu9819113sotg9n8ttrirk1unon33is@10.18.5.64
CSeq: 1 INVITE
Server: Asterisk PBX 16.20.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: <sip:67075000173@10.226.240.6:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 263
v=0
o=root 1481256456 1481256456 IN IP4 10.226.240.6
s=Asterisk PBX 16.20.0
c=IN IP4 10.226.240.6
t=0 0
m=audio 55468 RTP/AVP 3 8 116
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:116 telephone-event/8000
a=fmtp:116 0-16
a=maxptime:150
a=sendrecv
<------------>
<--- SIP read from UDP:10.226.4.2:5065 --->
ACK sip:67075000173@10.226.240.6:5060 SIP/2.0
Via: SIP/2.0/UDP 10.226.4.2:5065;branch=z9hG4bKt3iot8ust83dnngnaa9q3tn18;X-DispMsg=1400
Call-ID: itu9819113sotg9n8ttrirk1unon33is@10.18.5.64
From: "75947754"<sip:75947754@10.226.4.2;transport=udp;user=phone>;tag=gnon31rk-CC-1003-OFC-27
To: "67075000173"<sip:67075000173@10.226.240.6;transport=udp;user=phone>;tag=as4bb03489
CSeq: 1 ACK
Max-Forwards: 70
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
<--- SIP read from UDP:10.226.4.2:5065 --->
INVITE sip:67075000173@10.226.240.6:5060 SIP/2.0
Via: SIP/2.0/UDP 10.226.4.2:5065;branch=z9hG4bKqsao99unto1dd3oaduunqn818;X-DispMsg=1400
Call-ID: itu9819113sotg9n8ttrirk1unon33is@10.18.5.64
From: "75947754"<sip:75947754@10.226.4.2;transport=udp;user=phone>;tag=gnon31rk-CC-1003-OFC-27
To: "67075000173"<sip:67075000173@10.226.240.6;transport=udp;user=phone>;tag=as4bb03489
CSeq: 2 INVITE
Max-Forwards: 70
Contact: <sip:10.226.4.2:5060>
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,PRACK,NOTIFY,MESSAGE,REFER
Supported: timer
Content-Length: 200
Content-Type: application/sdp
v=0
o=HuaweiSoftx3000 1124732562 1124732564 IN IP4 10.226.4.2
s=SipCall
c=IN IP4 10.226.1.3
t=0 0
m=audio 61516 RTP/AVP 3 116
a=rtpmap:3 GSM/8000
a=rtpmap:116 telephone-event/8000
a=ptime:20
<------------->
--- (12 headers 9 lines) ---
Sending to 10.226.4.2:5065 (no NAT)
Comparing SDP version 1124732563 -> 1124732564 and unique parts [HuaweiSoftx3000 1124732562 IN IP4 10.226.4.2] -> [HuaweiSoftx3000 1124732562 IN IP4 10.226.4.2]
Found RTP audio format 3
Found RTP audio format 116
Found audio description format GSM for ID 3
Found audio description format telephone-event for ID 116
Capabilities: us - (gsm|alaw|ulaw), peer - audio=(gsm)/video=(nothing)/text=(nothing), combined - (gsm)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
> 0x7f902c0009a0 -- Strict RTP learning after remote address set to: 10.226.1.3:61516
Peer audio RTP is at port 10.226.1.3:61516
<--- Transmitting (no NAT) to 10.226.4.2:5065 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.226.4.2:5065;branch=z9hG4bKqsao99unto1dd3oaduunqn818;X-DispMsg=1400;received=10.226.4.2
From: "75947754"<sip:75947754@10.226.4.2;transport=udp;user=phone>;tag=gnon31rk-CC-1003-OFC-27
To: "67075000173"<sip:67075000173@10.226.240.6;transport=udp;user=phone>;tag=as4bb03489
Call-ID: itu9819113sotg9n8ttrirk1unon33is@10.18.5.64
CSeq: 2 INVITE
Server: Asterisk PBX 16.20.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: <sip:67075000173@10.226.240.6:5060>
Content-Length: 0
<------------>
Audio is at 55468
Adding codec gsm to SDP
Adding non-codec 0x1 (telephone-event) to SDP
<--- Reliably Transmitting (no NAT) to 10.226.4.2:5065 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.226.4.2:5065;branch=z9hG4bKqsao99unto1dd3oaduunqn818;X-DispMsg=1400;received=10.226.4.2
From: "75947754"<sip:75947754@10.226.4.2;transport=udp;user=phone>;tag=gnon31rk-CC-1003-OFC-27
To: "67075000173"<sip:67075000173@10.226.240.6;transport=udp;user=phone>;tag=as4bb03489
Call-ID: itu9819113sotg9n8ttrirk1unon33is@10.18.5.64
CSeq: 2 INVITE
Server: Asterisk PBX 16.20.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: <sip:67075000173@10.226.240.6:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 239
v=0
o=root 1481256456 1481256457 IN IP4 10.226.240.6
s=Asterisk PBX 16.20.0
c=IN IP4 10.226.240.6
t=0 0
m=audio 55468 RTP/AVP 3 116
a=rtpmap:3 GSM/8000
a=rtpmap:116 telephone-event/8000
a=fmtp:116 0-16
a=maxptime:300
a=sendrecv
<------------>
<--- SIP read from UDP:10.226.4.2:5065 --->
ACK sip:67075000173@10.226.240.6:5060 SIP/2.0
Via: SIP/2.0/UDP 10.226.4.2:5065;branch=z9hG4bKo1t318rrt1sqs1ntouut8sost;X-DispMsg=1400
Call-ID: itu9819113sotg9n8ttrirk1unon33is@10.18.5.64
From: "75947754"<sip:75947754@10.226.4.2;transport=udp;user=phone>;tag=gnon31rk-CC-1003-OFC-27
To: "67075000173"<sip:67075000173@10.226.240.6;transport=udp;user=phone>;tag=as4bb03489
CSeq: 2 ACK
Max-Forwards: 70
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
> 0x7f902c0009a0 -- Strict RTP switching to RTP target address 10.226.1.3:61516 as source
-- Executing [67075000173@from_trunk_GMSC:2] Set("SIP/trunk_GMSC42-000003ae", "STR=") in new stack
-- Executing [67075000173@from_trunk_GMSC:3] NoOp("SIP/trunk_GMSC42-000003ae", "") in new stack
-- Executing [67075000173@from_trunk_GMSC:4] Set("SIP/trunk_GMSC42-000003ae", "MSISDN=") in new stack
-- Executing [67075000173@from_trunk_GMSC:5] Set("SIP/trunk_GMSC42-000003ae", "MSISDN=") in new stack
-- Executing [67075000173@from_trunk_GMSC:6] NoOp("SIP/trunk_GMSC42-000003ae", "") in new stack
-- Executing [67075000173@from_trunk_GMSC:7] AGI("SIP/trunk_GMSC42-000003ae", "agi://127.0.0.1:8400/IVR.MCA.MISSCALL?msisdn=") in new stack
-- <SIP/trunk_GMSC42-000003ae>AGI Script agi://127.0.0.1:8400/IVR.MCA.MISSCALL?msisdn= completed, returning 4
== Spawn extension (from_trunk_GMSC, 67075000173, 7) exited non-zero on 'SIP/trunk_GMSC42-000003ae'
Scheduling destruction of SIP dialog 'itu9819113sotg9n8ttrirk1unon33is@10.18.5.64' in 32000 ms (Method: ACK)
set_destination: Parsing <sip:75947754@10.226.4.2:5060;user=phone> for address/port to send to
set_destination: set destination to 10.226.4.2:5060
Reliably Transmitting (no NAT) to 10.226.4.2:5060:
BYE sip:75947754@10.226.4.2:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.226.240.6:5060;branch=z9hG4bK4ef4515e
Max-Forwards: 70
From: "67075000173"<sip:67075000173@10.226.240.6;transport=udp;user=phone>;tag=as4bb03489
To: "75947754"<sip:75947754@10.226.4.2;transport=udp;user=phone>;tag=gnon31rk-CC-1003-OFC-27
Call-ID: itu9819113sotg9n8ttrirk1unon33is@10.18.5.64
CSeq: 102 BYE
User-Agent: Asterisk PBX 16.20.0
X-Asterisk-HangupCause: Unknown
X-Asterisk-HangupCauseCode: 0
Content-Length: 0
Thanks.