Pjsip: need to change "Contact" in SIP INVITE header

Hi team,

I need to change the “Contact” in SIP header.
currently we are getting
Contact: sip:asterisk@129.0.164.11:5060

but we need as like below
Contact: sip:+8978@129.0.164.11:5060

please suggest me

You can set the contact header in the address of record section (AOR) of your pjsip configuration.

The AOR contact field records what would have been received as Contact from the remote end if there were a registration, not what Asterisk sends in the Contact header.

Find a service provider that understands SIP. The only system to which the user part of the transmitted Contact header has any meaning is your own system. Any provider using it as an account name is broken.

It looks as though you may be able to work round their bug using contact_user in the type=endpoint section. I seem to remember that this was added because this abuse of Contact is not uncommon. If that doesn’t work, it is back to finding a competent provider.

You are right, actually I am using contact_user in the type=registration section myself for a specific service provider. For the endpoint, the setting is not needed.

Thanks you team for your wonderful support, its working.