3CX works with our SIP trunks. Our template fills in most of the trunk settings for you. This page covers loading it, and the settings 3CX needs if you set the trunk up by hand.
Before you start
- Create the SIP trunk in the portal.
- On the trunk’s page, choose Trunk Configuration and keep it open. You need the Registrar / SIP Proxy, the SIP User and the Password.
- Route your numbers to the trunk.
Load our template
Download the Check Networks 3CX template
(CheckNetworks.pv.xml). Keep the file name as it is when you upload it. It
sets the registrar, the codecs, how the called and calling numbers are read,
and the caller ID 3CX presents. The codecs are PCMA, PCMU, then G.722.
These steps are for 3CX V20 Update 2 or later:
- In the 3CX admin console, go to Advanced, then Templates, then Provider Templates, and choose Import Provider.
- Upload the template file and confirm. 3CX adds Check Networks as a provider and opens a new trunk built from it.
- Enter the trunk’s SIP User as both the Authentication ID and the SIP user, and its Password.
- Add your numbers under DIDs, in +E.164, such as
+61755500100, or import them all at once from a file the portal makes. See Import your numbers into 3CX. - Save. Then set up your inbound and outbound rules for the trunk as usual.
On 3CX Hosted, importing a template isn’t offered. Add a generic SIP trunk instead and enter the settings below by hand.
Settings 3CX needs
If you set the trunk up by hand, or check one built from the template, these are the settings that matter.
| 3CX setting | Value |
|---|---|
| Registrar / Server / Proxy | The Registrar / SIP Proxy from Trunk Configuration. Use the name, never an IP address. Leave the outbound proxy blank. |
| Authentication ID and SIP user | Both the trunk’s 6-digit SIP User. |
| Password | The trunk’s Password. |
| 3-way authentication | Off. It is not supported: the trunk authenticates the From user. |
| DID numbers | In +E.164, such as +61755500100. |
| Called number (CalledNum) | Take it from the To: User Part. The Request-URI carries your authentication ID, and the To header carries the dialled number. |
| Inbound call matching | “Match by rinstance” works: the rinstance 3CX puts in its Contact comes back on inbound calls. |
| SRTP | Enforced on a trunk that requires SRTP, otherwise Disabled. “Enabled”, which is opportunistic, is untested on our network. |
3CX expects the 407 challenge our registrar sends when it registers, so there
is nothing to change for that.
TLS
To encrypt signalling, choose TLS as the transport. Enter the registrar name exactly as Trunk Configuration shows it: the certificate is checked by name, with no wildcards. Then upload ISRG Root X1 to 3CX’s trusted root certificates.
Import your numbers into 3CX
The portal makes the file 3CX imports its DIDs from, so you don’t type each number in. Make it for the numbers you pick, or for the numbers routed to a trunk, which is quickest when you set a 3CX up again. Anyone who can order and route numbers can make it: an Owner or Admin for any of the account’s numbers, and a partner for their clients’ numbers only. Read-only and Billing users can’t.
- Choose the numbers:
- Go to Numbers, then My Numbers. Tick the numbers, or choose Select all matching, and choose 3CX Import File.
- Or open the trunk’s page and choose 3CX Import File in its header. The numbers routed to the trunk are listed: those whose calls ring it, whichever trunk they are billed on. A number billed on the trunk but routed somewhere else is not listed.
- For each number, enter its Destination: the extension, ring group or queue number it rings in your 3CX. To send them all to one place, enter it under Destination for All and choose Apply to All. Digits only.
- Check each Name. It becomes the DID rule’s name in 3CX. It starts as the number’s alias, or the number when it has none.
- Choose Download File. The file has one line per number in number order: the number in +E.164, the destination and the name, with no header row, as 3CX’s template has.
- In 3CX, import the file under 3CX’s DID import.
A destination left blank is left empty in the file. 3CX needs a destination on
every line before it imports it, so fill each one in, either in the portal or
in the file. A name that starts with =, +, - or @ (other than a plain
phone number) gets a ' in front of it in the file, so it can’t run as a
spreadsheet formula. One file takes up to 1,000 numbers.
Check it works
- In 3CX, the trunk shows as registered. In the portal, the trunk’s Registrations tab shows 3CX’s registration.
- Call one of your numbers from a mobile. It should ring the extension or queue your 3CX inbound rule sends it to.
- Make an outbound call from an extension, and check the caller ID the other end sees.
If something is wrong
| What happens | What to check |
|---|---|
| The trunk won’t register. | Check the registrar is the name, not an address. Check the authentication ID and SIP user are both the 6-digit SIP user, and that 3-way authentication is off. |
| Inbound calls reach 3CX but don’t match a rule. | Check CalledNum is taken from the To: User Part, and the DIDs are entered in +E.164. |
Calls fail with 488 Secure media (SRTP) required. |
The trunk requires SRTP. Set SRTP to Enforced and use TLS. |
The full technical detail is in SIP trunk requirements. For anything else, log a Technical ticket.