- Step 1: 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 a VoIP Provider Account in 3CX
- Step 5: Create Outbound Rule to Route Calls Over the Trunk
- See Also
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. Even though SIP Trunks are usually cheaper than traditional PSTN lines, keep in mind that each VoIP call requires bandwidth. 3CX supports both registration based VoIP Providers, i.e. via username and password, and IP-based trunks, i.e. PBX public IP is linked to the provider.
Step 1: Requirements for Using a VoIP Provider / SIP Trunk
- A firewall / router / NAT device that supports static port mappings and disabling SIP ALG. Devices performing port address translation, cause problems such as one way audio, failing inbound calls, etc. A static external IP is required, as inbound calls fail if your external IP changes intermittently. See the Firewall & router configuration guide for more info.
- Adequate Bandwidth. The real-time nature of VoIP places a demand on your internet connection, consuming approximately 30-120 kbps depending on the codec used. See Bandwidth overhead over DSL connections for more info on bandwidth consumption and codec bandwidth efficiency.
Step 2: Create an Account with a Supported VoIP Provider
You need an account with a VoIP service provider, preferably one from the list of 3CX Supported VoIP Providers to get pre-configured templates and updates from 3CX.
Step 3: Conduct the Firewall Check
3CX includes a Firewall Check to verify that your firewall, sitting between 3CX Phone System and the VoIP Provider, is correctly configured to route VoIP traffic. To check the firewall configuration from the 3CX Management Console:
- Go to “Dashboard” > “Firewall” and click “Run”.
- Verify that the tests for the SIP port (default 5060), and the Audio port range (default 9000-9255) succeed, otherwise you need to check and troubleshoot your firewall.
Note: 3CX does not provide specific firewall configuration support. See the configuration guides for popular firewalls.
Step 4: Add a VoIP Provider Account in 3CX
After getting a VoIP Provider account, you need to configure the account in 3CX:
- From the 3CX Management Console, select “SIP Trunks” > “Add SIP Trunk”.
- Select the country that the VoIP provider operates in.
- Locate and select your VoIP provider from the dropdown list, otherwise select the “Generic” option in the “Select Country” dropdown menu and then choose “Generic VoIP Provider” or “Generic SIP Trunk”. Generic providers or trunks are not guaranteed to work with 3CX.
- Enter the SIP trunk main number or one of the DIDs as the main number. Click “OK” to create and proceed to configure the SIP Trunk.
- Enter a name for this VoIP provider account. Crosscheck the pre-filled “Registrar/Server/Gateway Hostname or IP” and optional “Outbound Proxy” with your VoIP provider info. You can use the “Auto Discovery” option to automatically detect the appropriate ports to use.
- Specify the “Number of Simultaneous Calls” your provider allows.
- If you selected a VoIP provider template, leave the “Type of Authentication” field to the default, otherwise select:
- “Register/Account based” – enter SIP authentication ID and password.
- “IP based” – authentication is linked to your IP, ID and password may not be required.
- “Inbound only” and “Outbound only” – not applicable in most cases.
- Specify the routing for calls matching the main trunk number.
- Add DIDs – Click on the “DIDs” tab and use “Add Single DID” to add each DID number associated with this account. DID numbers created are linked to the operator extension. You can add an inbound rule for the DID in “Inbound Rules” and route to an alternate destination.
- In the “Caller ID” tab, add the caller ID to display on outbound calls.
- In the “Options” tab you can set:
- “Call options” – used to allow inbound and/or outbound calls and disable video calls.
- “Transport Protocol” – if your SIP trunk provider supports TLS (Transport Layer Security), set it to “TLS” and upload a security certificate (.pem) provided by your provider to secure communications on this trunk.
- “Alternative Proxy” – if supported by your VoIP provider, enable this option and set a secondary proxy host to simplify SIP trunk and DID management, i.e. avoid maintaining two SIP trunks for failover reasons.
- Click “OK” to save the trunk settings.
Step 5: Create Outbound Rule to Route Calls Over the Trunk
Outbound rules dictate how 3CX routes outgoing calls, i.e. via different SIP trunks or gateways, based on which user or group is calling, the dialled number or the number length. You need to create at least one outbound rule to start calling with 3CX.
To create an outbound call rule in the Management Console and route calls via this trunk:
- Go to “Outbound Rules”, select “Add,” and enter a name for the new rule.
- Specify any matching criteria to trigger this outbound rule in the “Apply this rule to these calls” section:
- Calls to numbers starting with prefix – Apply this rule to all calls starting with the number you specify, e.g. entering the prefix “9” indicates that outbound calls to numbers starting with “9” trigger this rule.
- Calls from extension(s) – define the extension(s) or extension range calling to trigger this rule. Specify extensions separated by commas and ranges using “-”, e.g. 100,102-120.
- Calls to numbers with a length of – trigger this rule when calling numbers with the specified digit length, e.g. 8 digits, to differentiate calls between local and national numbers, without requiring a prefix.
- Calls from extension group – select the calling extension group(s) that trigger this rule.
- “Make outbound calls on” – select from the defined gateway(s) or provider(s) to set up to five alternate routes for the call. If the first route is not available or busy, 3CX automatically tries the next route, until the call can be made or the default “Block Calls” route is reached.
- To transform the number that matches the outbound rule, before the call is routed to the selected gateway or provider, use these for each route:
- Strip Digits – remove one or more digits from the called number, e.g. strip one digit to remove the prefix “9”, before the number is dialled.
- Prepend – add one or more digits at the beginning of the number, if this is required by the provider or gateway.
- Click “OK” to add the outbound rule.