Provisining registration parameters in PJSIP

Hi all,

I am using FreePBX13 paired with Asterisk13 running PJSIP driver only (chan_sip is disabled). My VoIP provider requires sending custom contact and auth user in SIP registration string. In the “old” chan_sip driver this was not an issue as these parameters could have been configured in one string (parameter “register string”) and transparently provisioned to sip.conf in Asterisk.

However, I have not found any way to provision these parameters in PJSIP trunk settings.
Moreover, I tried to specify them in pjsip.registration_custom.conf and pjsip.registration_custom_post.conf files, but they do not seem to be read.
I used the following syntax:

Does anyone know if there is any way to provision these parameters in UI?
If otherwise, how to specify them in custom files correctly?

Thank you in advance.

I have not figured a way of modifying FreePBX PJSIP contexts using [context](+). Asterisk says nothing has been changed with the way conf files are parsed, so it appears to be limitation of PJSIP /shrug.

Short term fix is to use chan_sip for your trunk(s). Proper fix is to file a feature request to have a contact_user field added to the GUI so the param is written to the registration.

Thank you Lorne.

By this statement you admit that this feature is not implemented in FreePBX13, right?

“[context](+)” works for endpoint parameters, but does not work for registrations… Unfortunately…

I think he “admits” that Asterisk doesn’t do this, and therefore isn’t supported in FreePBX (any version). Once Asterisk and PJ-SIP support this, FreePBX will support it “out of the box”.

There is a “Contact User” parameter on the Advanced tab of PJSIP Settings when you edit a pjsip trunk which appears to write out the contact_user for the pjsip registration, have you tried this?

I think my question belongs here. I am running extensions and trunks with PJSIP. I’ve had no trouble for a few weeks (since install), but in the past week or so I frequently lose registration to my sip provider.

[2018-04-30 22:06:26] VERBOSE[28573] res_pjsip/pjsip_configuration.c: Contact Telecube_home/sip:[email protected]:5060 is now Unreachable. RTT: 0.000 msec
[2018-04-30 22:06:26] VERBOSE[28573] res_pjsip/pjsip_configuration.c: Endpoint Telecube_home is now Unreachable

Then it comes back.
[2018-04-30 22:10:26] VERBOSE[28573] res_pjsip/pjsip_configuration.c: Contact Telecube_home/sip:[email protected]:5060 is now Reachable. RTT: 205.693 msec

I don’t know if it could have anything to do with this:
[2018-04-30 22:07:25] ERROR[10775] res_pjsip.c: Error 320052 ‘DNS “Server failure” (PJLIB_UTIL_EDNS_SERVFAIL)’ sending OPTIONS request to endpoint Telecube_home

One question: On the GUI what is the pathway to the Advanced tab of PJSIP settings mentioned above, and would fixing Contact User address this issue?
Is this to do with changing the frequency of registration requests to the SIP provider?

Second, should I try switching the trunk to Chan-Sip? (the SIP provider suggested that-I have only used PJSIP till now and am nervous of changing-sounds like the ports get complicated)

(I am not an expert in any of these fields, thanks)

Asterisk 13.19.1

Seems to have been fixed by changing PJSIP to Chan-SIP on that trunk.
Incoming calls routed from vega over a PJSIP trunk still working well.
I didn’t do anything about Ports-just left them as default (had to change to Both in Advanced Settings)