Hi David,

I chanced upon your question while I was looking for the same thing
myself. I don't know whether this is still relevant to you, given that
it's over 2 years ago since you asked the question.

There's an option in the global section of pjsip.conf that defaults to
"no", but if you set it to yes, the user part of the Contact header
will be taken from the value of CALLERID(num):

I found this looking at the source code in res_pjsip.c - there's a load
of XML documentation at the top.



On Wed, 2020-11-25 at 05:58 -0500, Dovid Bender wrote:
> Hi,
> Is anyone aware of any way of changing the contact header on a call?
> We are sending 911 calls to a provider and they require that the
> contact be the call back number. I tried:
> Set(PJSIP_HEADER(update,contact)=<sip:foobar@>)
> But the came back with:
> No headers had been previously added to this session.
> If I try to do:
> Set(PJSIP_HEADER(add,contact)=<sip:foobar@>)
> Then Asterisk just adds a second contact header but does not replace
> the original (I also suspect adding a contact breaks the RFC?)
> Is anyone aware of a way to modify the contact header?
> TIA.
> Dovid

-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:

Reply via email to