Changing The Contact Header
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)=
But the came back with:
No headers had been previously added to this session.
If I try to do:
Set(PJSIP_HEADER(add,contact)=
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
One thought on - Changing The Contact Header
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.
[global]
use_callerid_contact=yes
Cheers, Kingsley.
—