[asterisk-users] SIP Invite and Asterisk API/Variable

Olivier CALVANO o.calvano at gmail.com
Thu Mar 24 00:49:52 CDT 2011


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



More information about the asterisk-users mailing list