Slider 2TryLearn MoreSlash your Phone bills - Slider Image

Use SIP trunks, WebRTC & Apps

Slash your Phone Bill by 80%

Configuring a SIP Trunk/ VoIP Provider

On this topic

Introduction

Step 1: Check Requirements for Using a VoIP Provider / SIP Trunk

Step 2: Create an Account with a Supported VoIP Provider

Step 3: Conduct the Firewall Check

Step 4: Add the VoIP Provider Account in 3CX Phone System

Step 5: Create an Outbound Rule to Route Calls Over the SIP Trunk

Creating Outbound Rules

See Also

Introduction

To make outbound calls on the PSTN you need to configure at least one SIP Trunk / VoIP Provider or VoIP gateway.

VoIP / SIP Trunk providers “host” phone lines and replace the traditional telco lines. VoIP Providers can assign local numbers in one or more cities or countries and route these to your phone system. In most cases they also support number porting. Typically SIP Trunks are cheaper than traditional PSTN lines. However, be aware that each VoIP call requires bandwidth. 3CX supports both registration based VoIP Providers (trunk logs on with username and password) and IP-based trunks (PBX is linked to the provider based on your public IP).

Step 1: Requirements for Using a VoIP Provider / SIP Trunk

  • A firewall / router / NAT device that supports STATIC PORT MAPPINGS and allows you to switch off SIP ALG. Often routers perform port address translation, which causes problems such as one way audio, failing inbound calls and so on. It is also highly recommended that you have an FQDN that resolves to a static external IP. If your external IP changes intermittently, inbound calls are bound to fail. See the Firewall & router configuration for details on how to configure your firewall / router / NAT device.
  • Adequate Bandwidth. VoIP is real-time, placing a demand on your internet connection. As a rule of thumb, each call consumes approximately 30-120 kb per second, depending on the codec you use. In Bandwidth overhead over DSL connections you can find detailed information about bandwidth consumption, including bandwidth usage for particular codecs.

Step 2: Create an Account with a Supported VoIP Provider

You need to have an account with a VoIP Service Provider, preferably one that has been tested by 3CX. 3CX supports and includes pre-configured templates for most popular SIP-based VoIP service providers. We strongly recommend choosing from the list of 3CX Supported VoIP Providers.

Step 3: Conduct the Firewall Check

3CX prompts you to conduct a Firewall Check. Frequently, the internet-facing firewall sitting between the 3CX Phone System and the VoIP Provider is not correctly configured or able to route VoIP traffic. To check the firewall configuration, it is important to run the built-in Firewall Checker with these steps:

  1. Go to the “Dashboard” function in the 3CX Management Console.
  2. In the PBX Status section, click on the Firewall entry and click Run. 
  3. Ensure that the tests for the SIP port (default 5060), and the Audio port range (default 9000-9255) pass.
  4. If the Firewall Check fails, you need to check and troubleshoot your firewall.

Note: 3CX does not provide specific firewall configuration support. Configurations for popular firewalls can be found here.

Step 4: Add the VoIP Provider Account in 3CX Phone System

After you have created the VoIP Provider account, you need to configure the account in the 3CX Phone System using these steps:

  1. In the 3CX Management Console menu, select SIP Trunks > Add SIP Trunk.
  2. Select the country that the VoIP Provider operates in.
  3. Select your VoIP Provider from the provider drop down list. Important: If the provider is not listed, select the Generic option in the country drop down menu and then choose between Generic VoIP Provider,” or “Generic SIP Trunk,” (If using a generic provider we are not be able to guarantee that 3CX works with this VoIP Provider).
  4. Enter the main number assigned to this SIP Trunk. If you just have DIDs and no main number you can select one of the DIDs as the main number. Click OK to create the SIP Trunk and open a new dialog.
  5. Enter a name for this VoIP Provider account. The SIP server hostname or IP and optional Outbound Proxy will be pre-filled. Compare these with the details you have received from your VoIP Provider and verify that are correct.
  6. Specify the number of simultaneous calls your provider allows.
  7. In Authentication, specify whether authentication is based on IP or based on Account / Registration. If you selected a template, this will be automatically pre populated and you must leave as is. If IP-based, the password is greyed out, since authentication is linked to your IP. The outbound or inbound only are not applicable in most cases and can be ignored.
  8. Specify how calls to the main number should be routed. The routing configured here is for calls matching the main number.
  9. If you have DID numbers, you need to specify these in the DIDs tab. Click on the “DIDs” tab and add the DID numbers associated with this account. The DID is created and linked to the operator extension. You can change this later from the “Inbound Rules” function by adding an inbound rule for the DID and routing to the desired destination.
  10. In the “Caller ID” tab, add the caller ID you wish to have appear on outbound calls.
  11. Click OK to save the trunk settings.

Step 5: Create an Outbound Rule to Route Calls Over the SIP Trunk

Outbound rules dictate how 3CX routes outgoing calls. Calls can be routed via different trunks (gateways or SIP Trunks) based on who or which group is making the call, the number that is being dialled or the length of the number. You need to create at least one outbound rule to start making outbound calls on 3CX!

Creating Outbound Rules

Now you need to create an outbound call rule and decide what calls should be routed via this trunk:

  1. From the 3CX Management Console Outbound Rules function, select Add, and enter a name for the new rule.
  2. Specify the criteria that should be matched for this outbound rule to be triggered. In the “Apply this rule to these calls” section, specify any of the following options:
  • Calls to numbers starting with prefix – Apply this rule to all calls starting with the number you specify. For example, enter 9 to specify that all calls starting with a 9 are outbound calls and should trigger this rule. Callers should dial “9123456” to reach number “123456.”
  • Calls from extension(s) – Select this option to define a particular extension or extensions range for which this rule applies. Specify one or more extensions separated by commas, or specify a range using a “-,” for example 100-120.
  • Calls to numbers with a length of – Select this option to apply the rule to numbers with a particular digit length, for example 8 digits. This way you can capture calls to local area numbers or national numbers without requiring a prefix.
  • Calls from extension group – Rather than specifying individual extensions, you can select an extension group.
  1. Now specify how outbound calls should be routed. In the “Make outbound calls on section, select up to five routes for the call. Each defined gateway or provider is listed as a possible route. If the first route is not available or busy, 3CX Phone System automatically tries the next route.
  2. The alternative outbound routes need to be configured in order for calls to take these routes, when the first is unavailable. By default other routes “Block Calls.”
  3. You can transform the number that matches the outbound rule before the call is routed to the selected gateway or provider using the Strip Digits and Prepend fields for each route:
  • Strip Digits – allows you to remove one or more digits from the called number. Use this to remove the prefix before a call is dialled on the gateway or provider, if it is not required. In the example above, you would specify to remove one digit, in order to remove the prefix “9” before it is dialled.
  • Prepend – allows you to add one or more digits at the beginning of the number if this is required by the provider or gateway.
  1. If you need to reformat the Caller ID (Caller ID Rewrite), see Caller ID reformatting.
  2. Click “OK” to add the outbound rule.

See Also

Free for up to 1 year! Select preferred deployment:

On-Premise

for Linux on a $200 appliance or as a VM

Get the ISO

On-Premise

for Windows as a VM

Download the setup file

On the cloud

In your Google, Amazon, Azure account

Take the PBX Express