VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
dorofeev at xfit.ru Guest
|
Posted: Thu Sep 17, 2015 5:37 am Post subject: [asterisk-users] how to get an info from "To:" hea |
|
|
Hello list!
Sorry for kinda dumb question, I guess, but I have too little time to research it by myself.
I have a SIP packet, which looks like this:
<--- SIP read from UDP:10.186.0.38:5060 --->
INVITE [url=sip:XXXXXXX@10.186.35.98:5060;user=phone]sip:XXXXXXX@10.186.35.98:5060;user=phone[/url] SIP/2.0
Via: SIP/2.0/UDP 10.186.0.38:5060;branch=z9hG4bKh4utm43008vheqk093b0.1
Call-ID: ba9vp4zsbbsfi0vagdafg0vpzpp0z9wh@SoftX3000
From: <[url=sip:495XXXXXXX@10.186.0.38;user=phone]sip:495XXXXXXX@10.186.0.38;user=phone[/url]>;tag=zwbzfehp-CC-22
To: <[url=sip:38XXXXXXX@10.186.35.98:5060;user=phone]sip:38XXXXXXX@10.186.35.98:5060;user=phone[/url]>
CSeq: 1 INVITE
Contact: <[url=sip:495XXXXXXX@10.186.0.38:5060;transport=udp]sip:495XXXXXXX@10.186.0.38:5060;transport=udp[/url]>
Min-SE: 90
Session-Expires: 300
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,REGISTER,INFO,PRACK,SUBSCRIBE,NOTIFY,UPDATE,MESSAGE,REFER
User-Agent: Huawei SoftX3000 V300R011
Diversion: <[url=sip:38XXXXXXX@10.248.82.4;user=phone]sip:38XXXXXXX@10.248.82.4;user=phone[/url]>;reason=unconditional;counter=1
Supported: 100rel,timer
Max-Forwards: 69
Content-Length: 338
Content-Type: application/sdp
Priority: urgent
I need to use info from fields “To:” and “Contact:” later in my dialplan. I belive, I have to do something like “exten => _X.,1,Set(VAR=${WHAT_SHOULD_I_TYPE_HERE?})”
Could you kindly help me, please?
WBR,
Dorofeev Sergey
Это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию и предназначены исключительно для использования сотрудниками компании, физическим или юридическим лицом, которому они адресованы. Уведомляем Вас о том, что если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, не допускается. Если вы получили это электронное сообщение по ошибке, пожалуйста, свяжитесь с отправителем и удалите электронное сообщение и любые файлы, передаваемые с ним, с компьютера незамедлительно. Спасибо. |
|
Back to top |
|
|
admin at tootai.net Guest
|
Posted: Thu Sep 17, 2015 6:34 am Post subject: [asterisk-users] how to get an info from "To:" hea |
|
|
Le 17/09/2015 12:37, п■п╬я─п╬я└п╣п╣п╡ п║п╣я─пЁп╣п╧ a ц╘crit :
Hello
Quote: |
Sorry for kinda dumb question, I guess, but I have too little time to
research it by myself.
I have a SIP packet, which looks like this:
<--- SIP read from UDP:10.186.0.38:5060 --->
INVITE sip:XXXXXXX@10.186.35.98:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.186.0.38:5060;branch=z9hG4bKh4utm43008vheqk093b0.1
Call-ID: ba9vp4zsbbsfi0vagdafg0vpzpp0z9wh@SoftX3000
From: <sip:495XXXXXXX@10.186.0.38;user=phone>;tag=zwbzfehp-CC-22
To: <sip:38XXXXXXX@10.186.35.98:5060;user=phone>
CSeq: 1 INVITE
Contact: <sip:495XXXXXXX@10.186.0.38:5060;transport=udp>
Min-SE: 90
Session-Expires: 300
Allow:
INVITE,ACK,OPTIONS,BYE,CANCEL,REGISTER,INFO,PRACK,SUBSCRIBE,NOTIFY,UPDATE,MESSAGE,REFER
User-Agent: Huawei SoftX3000 V300R011
Diversion:
<sip:38XXXXXXX@10.248.82.4;user=phone>;reason=unconditional;counter=1
Supported: 100rel,timer
Max-Forwards: 69
Content-Length: 338
Content-Type: application/sdp
Priority: urgent
I need to use info from fields Б─°To:Б─² and Б─°Contact:Б─² later in my
dialplan. I belive, I have to do something like Б─°exten =>
_/X.,1,Set(VAR=${WHAT/_SHOULD_I_TYPE_HERE?})Б─²
|
Sample:
exten => s,1,Set(__DIALEDNUMBER=${SIP_HEADER(TO):5})
exten => s,n,Set(__DIALEDNUMBER=${CUT(DIALEDNUMBER,@,1)})
...
Regards
--
Daniel
--
_____________________________________________________________________
-- 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 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|