Custom registration string in PJSIP

Hi all,

I am running Asterisk 13 with PJSIP channel driver and need to connect it to VoIP provider which requires a custom registration string on a SIP trunk.

Setting a custom registration string in chan_sip driver was quite straightforward by using “register” directive in sip.conf file. However, it is not that straightforward in chan_pjsip.

  1. Are custom registration strings supported in chan_pjsip?
  2. Are client_uri and server_uri parameters in [register] section the right places for customizing registration string?
  3. Are there any syntax guidelines for these parameters? Which of them (or both) should be manipulated to get a custom string?

Thank you in advance.

What do you mean by “custom registration string”.

I mean register directive which in chan_sip is specified in sip.conf with “register =>” instruction.
Its format might be different, but usually it is “username@password:host” or “username@password:host/extension”.
For some SIP providers, it is important to specify extension in the correct format as default “s” would not be accepted.

The equivalent in PJSIP to that is “contact_user” on the outbound registration.

Thank you jcolp.
I cannot find “contact_user” parameter in Asterisk configuration reference.
Maybe “contact” (in AOR)?
If it is “contact_user” - in which section should I include it?

It’s in the outbound registration section (type=registration)[1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Configuration_res_pjsip_outbound_registration

Thank you, got it. Will try.