header on outgoing SIP INVITE msgs?

Home » Asterisk Users » header on outgoing SIP INVITE msgs?
Asterisk Users 2 Comments

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:


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@
but I can’t get it to also accept any ;X=Y params for the

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,

2 thoughts on - header on outgoing SIP INVITE msgs?

  • Am I on the wrong list?

    I have not noticed any replies, so I have moved forward with this idea:

    # cat redhat/SOURCES/asterisk-1.8.0-beta2-Contactoption-bbeers03.patch

  • The linewrapping by gmail of the patch file makes it difficult to read.
    So, I added it as an attachment for any interested readers.