Configuring a VoIP Gateway
Introduction
Traditional PSTN phone lines are still a great way to make calls and in some regions the only way. Either the internet does not permit it or traditional telecom providers deliver phone lines via a gateway on premise only. These lines then need to be plugged into a VoIP Gateway and connected to 3CX. You can read more about VoIP Gateways here - What is a VoIP Gateway
Which VoIP Gateway?
Whilst 3CX does not directly support VoIP Gateways, we do recommend the following manufacturers: Patton, Beronet and Grandstream.
These vendors test their products with 3CX and are familiar with it. For any technical support you have to speak directly with the vendor in question. The available technical support for the gateway should be an important point in the buying decision!
How it Works
The general logic of configuring a VoIP gateway is to configure the gateway as a SIP trunk into 3CX. It's not actually a SIP Trunk because the direction of registration is different. A SIP Trunk will always be configured to allow for 3CX to register to it. The VoIP gateway SIP trunk registers with 3CX. Some VoIP Gateways now allow IP based registration and could thus be configured as a regular SIP Trunk if you prefer. This is the main difference between a SIP trunk and a VoIP gateway and the reason that you need to select “Add Gateway” and not “Add SIP Trunk”.
Step 1: Connect the VoIP Gateway
- Connect the VoIP Gateway to the network.
- Now find the gateway’s network IP:
- For a Grandstream, use the “Grandstream IP Discovery Tool”.
- For a Patton, use the “SmartNode” Discovery Tool.
- For a Beronet, use the “bfdetect”
- Login via the device’s web interface
- Update the firmware to the latest version.
- Assign a static IP or create a reservation on your DNS server. Take note of this IP.
Step 2: Patton / Beronet - Import template
If you do not have a Patton or Beronet gateway you can skip this step.
The Inbuilt Generic Gateway Template has “Outbound Parameters” defined "FromUserPart" -> $CallerNum which is compatible with many gateways but not with Patton and Beronet. If you have this brand you need to import a specific template. To do this:
- Download this template for Patton or Beronet.
- Go to “Advanced” > “Templates” > “Provider Templates” > “Import”.
- Select the generic template you downloaded and press import to configure this gateway.
Step 3: Configure your Gateway Trunk on 3CX
- Specify a name for this gateway.
- In “Registrar/Server” enter the gateway’s IP.
- Enter the gateway’s “Main Trunk Number” and "Default Route".
- Enter the number of simultaneous calls for this gateway. This must not exceed the number of lines the gateway supports, e.g. a T1 gateway supports 23 lines.
- Go to the “DID numbers” tab and specify any DIDs linked to the PSTN connection you are connecting to the VoIP Gateway.
- Take note of the Authentication ID and password.
- Click “Save” to create this gateway.
Step 4: Create an Outbound Rule for this Gateway
- Enter a name for this outbound rule.
- Define the rule options for the calls to be routed via this gateway.
- Click “Save”.
Step 5 - Register your Gateway to 3CX
For Patton
- Navigate to Telephony -> SIP and add a “IF_SIP” interface profile and specify the Remote User Agent Host Name/ Port which is the IP address and SIP Port of 3CX.
- Go to Authentication Services and add the authentication profile named “AS_ALL_LINES” with the Authentication ID and Password taken from 3CX “Add Gateway” configuration.
- Go to Location Services and add “LS_10000” where “10000” is your Authentication ID taken from 3CX “Add Gateway” configuration.
- Go to Telephony > Call-Router and define the Routing Tables based upon your device settings. You may speak to Patton to provide you with a detailed guide on how to configure your Routing Tables.
For Grandstream
- Add account in General Settings and specify Name, SIP Server IP address and Outbound Proxy to be the IP Address of the PBX.
- Go to SIP Settings and configure its SIP Settings by enabling SIP Registration to “Yes” and press Save.
- Go to Accounts and enter the credentials obtained in step 3 and add Authentication ID and Password.
For Beronet
- Add account in SIP Configuration and specify Name, SIP registrar, domain and outbound proxy to be the IP Address of the PBX.
- Enter the credentials obtained in step 3 and add User, Authentication ID and Password and press the Activate button to apply settings
- Create a Diaplan to be able to receive calls from Beronet Gateway to 3CX Phone System. You may speak to Beronet to provide you with a detailed guide on how to configure your Dial Plans.
See Also
- See the Firewall & router configuration to configure your firewall / router / NAT device.
- How much dedicated bandwidth do I need for VoIP? See the Bandwidth overhead over DSL connections guide to find out.
- See the list of 3CX supported SIP Trunk Providers.
- Grandstream GXW4104 – 4 port FXO
Last Updated
This document was last updated 4 November 2024