[asterisk-users] Capture "Server" header in SIP reply.
Alex Balashov
abalashov at evaristesys.com
Sun May 17 08:50:15 CDT 2009
It is fairly trivial to modify chan_sip to expose headers from final
replies to the SIP_HEADER container or some other channel variables.
Just make sure to disambiguate names of headers if you put them in a
conflicting namespace.
There is one big switch statement that dispatches handling behaviour
for various message types, including final replies. Go in the 200 OK
handler for INVITEs and add some magic.
By default, only headers from initial INVITE request can be accessed.
But, you can change that.
I would be inclined to ask if Asterisk is the right tool for the job,
though, if you need to go that low-level.
--
Sent from mobile device
On May 17, 2009, at 9:04 AM, Chris Maciejewski <chris at wima.co.uk> wrote:
> Hi David,
>
> Thanks for your post.
>
> Unfortunately SIP_HEADER(FROM) is not an option for me.
>
> What I want to do is record in CDRs "User-Agent" header of calling
> party (this can be easily done with ${CHANNEL(useragent)}), and SIP
> "Server" header of called party (from 200 OK response to INVITE
> generated by Asterisk).
>
>
> 2009/5/17 David Backeberg <dbackeberg at gmail.com>:
>> On Sun, May 17, 2009 at 6:43 AM, Chris Maciejewski
>> <chris at wima.co.uk> wrote:
>>> I am trying to capture "Server" header in a 200 OK reply message.
>>> My idea was to use Dail(SIP/user at domain,30,M(GetOtherPartyInfo)),
>>> and inside of GetOtherPartyInfo macro use SIP_HEADER function.
>>> unfortunately the above doesn't seem to work:
>>> Is there any way to capture SIP headers from reply messages
>>> generated
>>> by a called party?
>>
>> http://www.voip-info.org/wiki/view/Asterisk+func+sip_header
>>
>> You might prefer the SIP_HEADER(FROM) field.
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list