As I write this in 2021, you would think that SIP interoperability would be a solved problem, but sadly that’s not the case. In this document we’ll be sharing the configuration we’ve used to build a SIP trunk between a Metaswitch and a 3CX PBX.
As an aside, we decided to experiment with a virtual 3CX instance running in Amazon Web Services for our own internal phone system – and it has been working well. Simple text-to-speech IVR, voicemail, soft-client, mobile client, etc.
Obviously Metaswitch Hosted PBX would be better, but we figured we should become familiar with other options in the industry!
3CX Configuration with Metaswitch
The majority of the information presented here is based on the work outlined on the 3CX website, but tweaked to get it working with a Metaswitch right away.
Follow the 3CX directions except those explained below. We recommend that you first read the instructions on the website to understand the process.
To begin, ensure you have all the relevant information.
- Primary phone number
- SIP username
- SIP password
- SIP domain (as configured in the Metaswitch CFS)
- SIP proxy (FQDN of the Perimeta)
On the Metaswitch CFS side, we configure this as a registering SIP binding (i.e. set Learns Contact Details to True).
We then add a “Generic SIP Trunk” in the 3CX, configured with the primary phone number.
Once you hit OK, you’ll enter a more detailed form (shown below). On the General tab you need to provide a name of your choice, then set the Registrar/Server/Gateway Hostname or IP to the SIP domain name, the Outbound Proxy to the FQDN of the Perimeta, and the number of simultaneous calls according to your agreement with your business customer.

Make sure that the number of simultaneous calls matches the Metaswitch Configured SIP binding configuration, and make sure that both Auto Discovery checkboxes are selected.
3CX Registration to the Metaswitch
The screenshot below shows the rest of the General tab, covering SIP authentication – specify the SIP user name (typically the 10 digit DN) and password we recorded earlier.

This primary phone number (which is likely also the SIP user ID) also appears in the routing configuration – where we recommend you initially route calls for the main trunk number to an extension (i.e. a phone) for testing purposes. You can later configure an IVR if you wish.
Moving over to the Options tab, we recommend unchecking the “Disallow video calls” option – i.e. to permit video calls on 3CX.
Further down in the Options tab, be sure to set the Transport Protocol to UDP (which is typically used for SIP) and the IP mode to IPv4 (unless you know otherwise).

Once you save all these settings, you should then be redirected to the SIP Trunk main page, where you can monitor if the connection registers. The connection should turn green and show a successful registration timestamp.
If not, double check your settings match on each end of the connection (PBX and Configured SIP binding on the Metaswitch, and the 3CX settings you just configured) and if you can’t see anything wrong you’ll need to do some troubleshooting in SAS or Wireshark to see what’s going on.
3CX Outbound calling configuration
One last step before you can place outbound calls from your 3CX extensions. In the left-hand menu, select Outbound Routing and configure the following. This should allow you to verify outbound calls. The configuration below assumes that your users always dial external numbers exactly as they should be sent to the Metaswitch CFS.

And… that’s it. Hope this is useful. If you want to be notified about other useful information for service providers, don’t forget to subscribe to our email newsletter.