Bridging 3CX with an Asterisk PBX

Introduction

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”.
 
BRIDGING 3CX WITH AN ASTERISK PBX
 

 

In the “Add Bridge” form fill in the following:
  1. 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.
  2. Name of Bridge: This can be anything, it’s just a way of identifying this specific Bridge connection within the 3CX Management Console.
  3. Type of 3CX Bridge: Set this value to “Master”.
  4. 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.
  5. 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”.
  6. 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:
 
BRIDGING 3CX WITH AN ASTERISK PBX
 
Trunk name : 3CX Outgoing – PEER Details: host=[3CX IP] port=[3CX SIP Port] username=[Bridge ID] fromuser=[Bridge ID] secret=[Bridge Password] sendrpid=yes qualify=yes type=peer
 
BRIDGING 3CX WITH AN ASTERISK PBX
 
Incoming – USER Details host=[3CX IP] port=[3CX SIP Port] type=peer trustrpid=yes context=from-trunk Register String [Bridge ID]:[Bridge Password]@[3CX IP]:[3CX SIP Port]/[Bridge ID] Where:
  • [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