[asterisk-users] SIP_HEADER function; what names are available?

kjcsb kjcsb at orcon.net.nz
Fri Aug 18 12:21:32 MST 2006


>> I have read the wiki about the SIP_HEADER function (http://www.voip- 
>> info.org/wiki/index.php?page=Asterisk+func+sip_header). Where can I  get 
>> a list of the names that are available to be used with the  function e.g. 
>> TO is one name as in ${SIP_HEADER(TO)}. What are the  others?
>>
>
> I would guess that you can check the RFC. Easier is to turn on SIP  debug 
> and see the INVITE packet yourself and
> check the headers that you have with your equipment.
>
> /Olle
>
Thanks but I don't know how to get the actual INVITE details (the request 
URI?). For example I want to get sip:95556789 at 60.234.xxx.xxx SIP/2.0 from 
the following dialogue:

INVITE sip:95556789 at 60.234.xxx.xxx SIP/2.0
Record-Route: <sip:147.202.nn.nnn;ftag=bf7eced18eb7271b;lr=on>
Via: SIP/2.0/UDP 147.202.nn.nnn;branch=z9hG4bKe49c.21b320a3.0
Via: SIP/2.0/UDP 60.234.nnn.nnn;branch=z9hG4bK76bf3dec8d45b972
From: "User" <sip:1122334455 at proxy.domain.com>;tag=bf7eced18eb7271b
To: <sip:5556789 at domain.com>

etc

I can get Record-Route, Via, From, To etc but don't know how to get the bit 
after the INVITE. Interestingly only the first Via is returned by 
${SIP_HEADER(VIA)}.

I've tried R-URI, RURI, URI, ALL, *, blank.

Any advice appreciated.

Cameron 




More information about the asterisk-users mailing list