SIP Trunk to Third Party PBX

Good Morning Colleagues
I hope you are doing good . I am trying to establish SIP trunk to third party SIP PBX . Below is the registration information:

  • Username: [email protected]
  • Password: mysecret
  • Third Party SIP PBX IP Address: 192.168.1.201

Below is my configuration



Below is the messages received on CLI:

freepbxCLI>
freepbx
CLI>
freepbxCLI>
[2023-10-17 08:11:31] ERROR[22407]: res_pjsip.c:1179 create_out_of_dialog_request: Unable to create outbound OPTIONS request to endpoint [email protected] as URI ‘sip:[email protected]@192.168.1.201:5060’ is not valid
[2023-10-17 08:11:31] ERROR[22407]: res_pjsip/pjsip_options.c:880 sip_options_qualify_contact: Unable to create request to qualify contact sip:[email protected]@192.168.1.201:5060 on AOR [email protected]
freepbx
CLI>
[2023-10-17 08:11:42] WARNING[31918]: res_pjsip_registrar.c:1166 find_registrar_aor: AOR ‘’ not found for endpoint ‘[email protected]’ (192.168.1.201:5060)
[2023-10-17 08:11:42] WARNING[22407]: res_pjsip_registrar.c:1166 find_registrar_aor: AOR ‘’ not found for endpoint ‘[email protected]’ (192.168.1.201:5060)
freepbxCLI>
freepbx
CLI>
freepbx*CLI>

So kindly advice

Best Regards

It is very unusual for a PBX to expect inbound registration on a trunk, and also unusual to have a domain name as part of the username.

Given that the other PBX has a private IP address, I would guess that it is physically on your site. Do you know its make/model? Is the connection to FreePBX configured as a trunk, or as an extension (for which inbound registation would be normal)? If you configured it yourself, please tell us the settings you used. Otherwise, if you have admin access to the device, provide some screenshots or other info on how the connection to FreePBX is configured.

What kind of resources have and set on third party SIP PBX?
Trunk? Use and set without registration.

It’s also unusual to want both way authentication, especially with the same secret.

Change your secret. Gaussian blur, on a raster aligned known font leaves far too much information about the obscured text.

When asked for usernames it just wants the username part not the full URI. Putting the full URI in there makes it create an invalid URI scheme that can’t be used.

And you shouldnt have URI as the trunk name as it will do the same thing. The dial string ends up with multiple @ symbols which is a delimiter for the URI.

Good Afternoon Colleagues
Thanks for trying to help . The other third party PBX is 3CX and below its configuration:

3CX Configuration

So kindly advice how to correct FreePBX configuration to match 3CX configuration.

Thx in advance

Best Regards

Try these settings:

Trunk Name: 23011936
Secret: (your secret)
Authentication: Both
Registration: Receive
Context: (change to from-internal if 3CX will be sending outbound calls through other trunks on FreePBX)
Match Inbound Authentication: Auth Username

Leave everything else at defaults.
First step is registration. If the trunk doesn’t show registered at both ends, provide logs of an attempted registration from 3CX to FreePBX.
Next, test inbound and outbound calls. If either fails, paste a log of the failing call, including pjsip logger at pastebin.com and post the link here.

Good Afternoon Stewart
Thx for your replay . I have modified the configuration as you shared and let me share with you the result:

  • The trunk is registered from 3CX side.
  • The trunk is not registered from FreePBX side.
  • Call from softphone registered to 3CX can be done successfully to phone registered at FreePBX.
  • Call from softphone registered to FreePBX failed to phone registered at 3CX.

SO kindly advice,

Best Regards

I’m having trouble with interpreting the above; I can’t work out whether or not you meant to add “as seen from”. My literal reading of the above conflicts with the previous screenshot, in that it read to me as inbound registration relative to FreePBX.

You seem to be reluctant to provide logs. “failed” is a very broad term and the logs will show how they failed.

Good Afternoon Colleagues
It is working now . I will let you know if any further support required .

Thx Stewart for the configuration you shared.

Best Regards

Glad to hear that you got it working. Please share what changes you made since your previous post.

Good Morning Stewart1
Really no more than reboot both servers and the calls working between the two PBXs (3CX & FreePBX).

Best Regards

Wouldn’t it make more sense to connect the 2 PBXs via IAX2-Trunk?

1 Like

Only if they are both running Asterisk, and, even then, one has to consider the extra learning needed to maintain it.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.