Olivier CALVANO
2011-Mar-24 05:49 UTC
[asterisk-users] SIP Invite and Asterisk API/Variable
Hi I have in a SIP invite of a incoming call: INVITE sip:003318364xxxx at 78.41.xxx.xxx:5060;transport=udp SIP/2.0 Allow: UPDATE,REFER,INFO Call-ID: 04459-NK-5fa6f8a0-18641fd41 at sip.myoperator.net Contact: <sip:91.121.xxx.xxx:5060> Content-Type: application/sdp CSeq: 1602837515 INVITE From: "033426aaaaaa" <sip:033426aaaaaa at sip.myoperator.net;user=phone>;tag=04459-CI-5fa6f8a1-6f03b5b60 Max-Forwards: 30 P-Preferred-Identity: <sip:033426aaaaaa at sip.myoperator.net;user=phone> To: <sip:081169xxxx at 91.121.xxx.xxx;user=phone> User-Agent: Cirpack/v4.42s (gw_sip) Via: SIP/2.0/UDP 91.121.xxx.xxx:5060;branch=z9hG4bK-4B4B-2D82DB2 Content-Length: 481 The To, "To: <sip:081169xxxx at 91.121.xxx.xxx;user=phone>", can i get it into a variable for sent it at a API ? Sample: in extension.conf: exten => _003318364xxxx,1,AGI(Caller-ID_Phibee.agi,${CALLERID(name)},${VARIABLE}) exten => _003318364xxxx,2,Dial(SIP/185,180,rt) in this sample, ${VARIABLE} = 081169xxxx Thanks for your help Olivier
On 24/03/11 05:49, Olivier CALVANO wrote:> The To, "To:<sip:081169xxxx at 91.121.xxx.xxx;user=phone>", can i get it into > a variable for sent it at a API ? >You want the sip_header function: http://www.voip-info.org/wiki/view/Asterisk+func+sip_header cheers, Paul.