[asterisk-users] Want to retrieve the value of contact header
Jim Dickenson
dickenson at cfmc.com
Wed Jun 30 21:45:08 CDT 2010
You might take a look at the SIPHEADER function which can return specific SIP headers.
--
Jim Dickenson
mailto:dickenson at cfmc.com
CfMC
http://www.cfmc.com/
On Jun 30, 2010, at 7:36 PM, kamrun nahar bina wrote:
> Dear all,
>
> I want to retrieve the value from Contact header and from "From header " which is "0345001280" from the following two lines:
> Contact: <sip:0345001280 at 123.50.217.143>
> From: "999999 9999" <sip:0345001280 at 113.34.235.106>;tag=as191896a1
>
> Is it possible in asterisk to retrieve that value? I am getting following value in the corresponding variable when I pass the following SIP message. Is there anything which contain the value of "0345001280" of contact ?
> Corresponding value:
> CALLERID(num) : 0000185475
> CALLERID(name) : 999999 9999
> SCI-PEERNAME : 0000185475
>
> SIP message:
>
> INVITE sip:08058913782 at 113.34.235.106 SIP/2.0
> Via: SIP/2.0/UDP 123.50.217.143:5060;branch=z9hG4bK100b063a;rport
> From: "999999 9999" <sip:0345001280 at 113.34.235.106>;tag=as191896a1
> To: <sip:08058913782 at 113.34.235.106>
> Contact: <sip:0345001280 at 123.50.217.143>
> Call-ID: 0f3fbfe3463035d04f05534824a18012 at 113.34.235.106
> CSeq: 102 INVITE
> User-Agent: Asterisk PBX
> Max-Forwards: 70
> Date: Thu, 01 Jul 2010 02:20:18 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Content-Type: application/sdp
> Content-Length: 267
>
> v=0
> o=root 22702 22702 IN IP4 123.50.217.143
> s=session
> c=IN IP4 123.50.217.143
> t=0 0
> m=audio 17262 RTP/AVP 0 8 3 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:3 GSM/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
>
>
> Is it possible to retrieve the value of contact in asterisk ? Please let me know.
> Is there anyone who knows the solution? I need this urgent.
>
> Thanks in advance
>
> Nahar
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100630/94411245/attachment.htm
More information about the asterisk-users
mailing list