Question for the PJSIP Guru's

Ok, I am registering a trunk against a Broadsoft - here is the SIP registration string:

register=5058675309@example.com:7qrx5yQas337432b:5058675309@lax-iad3.masteraccess.com/5058675309

Which works fine with Chan-SIP - but I can not for the life of me figure out how to translate this into PJSIP - In the example above:

Username: 5058675309
Fromdomain: example.com
Secret: 7qrx5yQas337432b
Registrar: lax-iad3.masteraccess.com

So translated from above, the Broadsoft wants:

username@fromdomain:secret:username@registrar/username

How do I translate this into server_uri and client_uri?

Thanks!

Greg

server_uri=sip:lax-iad3.masteraccess.com
client_uri=sip:5058675309@example.com

The authentication credentials would be in a normal type=auth section and referenced in the registration section.

Tried that (ad infinitum) and it will never register - Is this something Paid support could help with - I am desperate!

Another wrinkle is that I am trying to translate this into FreePBX and that is additionally hard - although for testing purposes I am editing the .conf files manually.

If you provide the SIP traffic of a chan_sip and chan_pjsip then the differences could be seen.

Capturing now - give me a minute.

Ok - Well, a register is never being sent from PJSIP on Asterisk - I can see the SIP register, but never the PJSIP - What would stop it trying?

It staggers registrations but they should show up. If the configuration entry was invalid it would not send it (a message would be output during configuration loading). You can also check if it was loaded by doing “pjsip show registrations” from the CLI.

Yeah, I did that and I also just switched a phone over to PJSIP and it nailed right up. Is there somewhere PJSIP logs what it tries to do?

It goes to the Asterisk console, and if you want packet level logging it can be turned on using “pjsip set logger on”. Any parsing or configuration issues are output at load (or reload) time.

Turned the logger on - I am seeing this:

[2017-02-14 15:06:44] ERROR[63319]: res_pjsip.c:3235 create_out_of_dialog_request: Unable to apply outbound proxy on request OPTIONS to endpoint BluIP as outbound proxy URI ‘lax-iad3.masteraccess.com’ is not valid
[2017-02-14 15:06:44] ERROR[63319]: res_pjsip/pjsip_options.c:417 qualify_contact: Unable to create request to qualify contact sip:5058675309@lax-iad3.masteraccess.com:5060

The outbound_proxy needs to be a URI, therefore sip:lax-iad3.masteraccess.com instead of just lax-iad3.masteraccess.com

1 Like

OMG - It’s Registered!!! The Proxy was the thing - Testing now! You are the master!

There is an issue[1] you can add yourself to as a watcher which is for improving the documentation to make it clearer.

[1] https://issues.asterisk.org/jira/browse/ASTERISK-26782