[asterisk-users] Want to retrieve the value of contact header

kamrun nahar bina bina187 at gmail.com
Wed Jun 30 21:36:11 CDT 2010


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 <sip%3A0345001280 at 123.50.217.143>>
From: "999999 9999"
<sip:0345001280 at 113.34.235.106<sip%3A0345001280 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%3A08058913782 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<sip%3A0345001280 at 113.34.235.106>
>;tag=as191896a1
To: <sip:08058913782 at 113.34.235.106 <sip%3A08058913782 at 113.34.235.106>>
Contact: <sip:0345001280 at 123.50.217.143 <sip%3A0345001280 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100701/1ffd4ee0/attachment.htm 


More information about the asterisk-users mailing list