In this document we are going to demonstrate how to create a bridge between a 3CX (V14) and an Asterisk PBX. We will assume both systems are in the same local LAN.
Setting up 3CX
From the 3CX Management Console go to “Bridges” and “Add Bridge”.
In the “Add Bridge” form fill in the following:
- Virtual extension number: Leave the default value or enter a new 5-digit value of your own. Make a note of this value as it will be used later on in this guide and is going to be referred to as “Bridge ID”. Also note that this value cannot be changed after creating the bridge.
- Name of Bridge: This can be anything, it’s just a way of identifying this specific Bridge connection within the 3CX Management Console.
- Type of 3CX Bridge: Set this value to “Master”.
- Outbound rule prefix to reach remote 3CX PBX: If a prefix is going to be necessary for calls originating from 3CX to the Asterisk PBX, then in this field enter the prefix that is going to be used. This field can also be blank if no prefix is going to be used.
- Authentication Password: By default an 8-digit alphanumerical value is generated but can be changed. Make a note of this value as it will be used later on in this guide and is going to be referred to as “Bridge Password”.
- Assigned Codecs: In this list enter the Audio Codecs you want to be used for the calls being made over the bridge, as well as the priority order. By default GSM-FR is the only codec but you can change this and/or add additional ones as required. Keep in mind that the codecs you select here must be supported from the Asterisk PBX as well.
All other Options like ‘Allow tunneled connection’, ‘Publish information’, ‘Receive information’, ‘Supports Re-Invite’, ‘Support ‘Replaces’’, ‘PBX Delivers Audio’ shall be left in the default state.
You will now be prompted to create an Outbound Rule where you will set which calls will be forwarded over this Bridge.
Setting up the Asterisk PBX
On the Asterisk PBX, create a Trunk with the following settings:
Trunk name : 3CX
Outgoing - PEER Details:
port=[3CX SIP Port]
Incoming - USER Details
port=[3CX SIP Port]
[Bridge ID]:[Bridge Password]@[3CX IP]:[3CX SIP Port]/[Bridge ID]
- [Bridge ID]: Is the Virtual Extension Number you have set in the 3CX Bridge settings as explained in section “Setting up 3CX”.
- [Bridge Password]: Is the Password you have set in the 3CX Bridge settings as explained in section “Setting up 3CX”.
- [3CX IP]: Is the IP Address/FQDN of 3CX Phone System to which the Asterisk PBX is going to be connecting to.
- [3CX SIP Port]: Is the SIP Port 3CX is using. On single-instance 3CX installations, the SIP port being used can be found in the Management Console → Settings → Network → “General” tab, in the “SIP Port” field (Default is 5060).
On the Asterisk system you will also have to set up Inbound and Outbound Routes to define which calls should be sent over the bridge connection and how incoming calls should be routed, however this is out of the scope of this guide.
Checking the Configuration
After configuring both 3CX and Asterisk as explained throughout this document, the Bridge should be active and in the 3CX Management Console the Bridge Connection should show up as “Registered” in System Status → Ports/Trunks.
Expected Sample Captures:
- 101 is the dialed number
- 10003 is the Virtual Extension Number
- “John Smith” and 100 are the Callers Display Name and Caller ID
- 10.172.1.25:5061 is the IP and SIP Port of the Asterisk PBX
- 192.168.9.206:5060 is the IP and SIP Port of the 3CX Phone System