Modify Contact In PJsip
Hi Guys
We are using the wizard to configure our pjsip trunk(see below)
How do we get this setting to work
contact_user=username
We want to change the contact field in the sip invite to display the username of the trunk
[trunk_defaults](!)
type = wizard
transport = transport-udp
endpoint/allow_subscribe = no
endpoint/allow = !all,g729
aor/qualify_frequency = 30
registration/expiration = 1800
contact_pattern=xxx
[xxx](trunk_defaults)
sends_auth = yes
sends_registrations = yes
endpoint/context = extensions
remote_hosts = xxx.xx.xx.xx
accepts_registrations = no
endpoint/send_rpid = yes
endpoint/send_pai = yes
outbound_auth/username = xxx
outbound_auth/password = xxx
contact_pattern=xxx
6 thoughts on - Modify Contact In PJsip
The Contact header can not currently be modified on a per-endpoint basis and takes its values from the generated From header. On a global scale it could be controlled using the default_user global option. Otherwise there’s no real way without adding explicit support for it.
Hi Joshua If i put the default_user option per endpoint would it work?
So what exactly does the contact_user option do?
I know that in freeswitch there is the option extension-in-contact.We basically need to achieve the same functionality
Thanks
The Contact header can not currently be modified on a per-endpoint basis and takes its values from the generated From header. On a global scale it could be controlled using the default_user global option. Otherwise there’s no real way without adding explicit support for it.
No, it’s a global only option.
It sets the Contact user in an outbound registration so that the URI
dialed by the remote SIP server may contain that user (or may not, depending on their configuration/deployment).
It would require modifying the code and adding support.
Do you know if this can be achieved with the standard sip stack in asterisk?
Kind Regards Andrew Colin Converged Telecoms (Pty) Ltd. Licensed Telecoms Operator : (0258/IECS/JAN/09) (0258/IECNS/JAN/09)
Switchboard: +27 (0)10
If you are referring to chan_sip I don’t believe so but it is possible there is some obscure option or method to do it that I am aware of.
Ok thanks Joshua
Do you know what this error means when I dial out in pjsip and the call fails
Unable to create request with auth.No auth credent als for any realms in challenge
Kind Regards Andrew Colin Converged Telecoms (Pty) Ltd. Licensed Telecoms Operator : (0258/IECS/JAN/09) (0258/IECNS/JAN/09)
Switchboard: +27 (0)10