[asterisk-users] How to append custom option to Contact: header on outgoing SIP INVITE msgs?
Bob Beers
bob.beers at gmail.com
Fri Nov 5 09:58:03 CDT 2010
Hi list,
My need is to append a site specific parameter to the
Contact: header on all INVITEs exiting * via a SIP trunk.
I'd like it to look something like this:
Contact: <bob:3125551212 at 10.10.10.10;SITE-ID=us.here>
where SITE-ID=us.here is set in a config file that * parses on
startup. Or in a Dial() command option? Or I don't care exactly
how. :-)
It is possible to affect the Contact: header via a line in sip.conf:
register => toronto:welcome at 192.168.1.101/contact
but I can't get it to also accept any ;X=Y params for the
contact.
I can add a custom Contact header in the dialplan with SipAddHeader,
but then I have two. SipRemoveHeader only removes headers
previously added by SipAddHeader, so no luck there.
I have googled, and searched the asterisk-users mailing list archives
and not yet found a solution. I did see some work back in 2004
(issues 732 and 777) which mentioned not stripping contact header
parameters from arriving requests/registrations, but nothing about
creating any such parameters.
Thanks for any help/hints,
--
-Bob Beers
More information about the asterisk-users
mailing list