3CX SIP Trunk Setup

3CX SIP Trunk Setup

Tested Version - 16.0.3.676 on July 9, 2020

NOTE - DNS-SRV on 3CX versions 15.5.15502.6 and above correctly failover when the first DNS entry is unreachable, but the 3CX system will not recheck the first entry until the second DNS entry is unreachable or the trunk's registration is refreshed. This is a limitation within 3CX and we are monitoring future releases for any updates/changes to this functionality.  
Note - Caller ID must follow the NPANXX standard. The area code (NPA) must be a valid area code and the NXX must be a valid NXX. If the caller ID is not valid, then calls will not route properly and will need to be corrected before calls can be successfully made.
Note - Ensure all outbound parameters below are set correctly, failure to do so may cause outbound call failures. 

Prerequisites

  • Trunk Credentials
  • 3CX Software Version 15.5.0 or higher

Preparation and Port Forwarding

You want to make sure these are forwarded 1 to 1 (ie. 5060 forwards to port 5060). Once these are done, you will want to run the firewall tester to confirm that the PBX is able to access the ports it requires successfully.

Remote Access

If you would like to remote access (from the internet) to your PBX you will need to forward these two ports. They are optional.

  • 5000 TCP
  • 5001 TCP

RTP and SIP

  • 5060 TCP
  • 5060 UDP
  • 5090 TCP
  • 9000-9255 TCP
  • 9000-9255 UDP

Firewall Test

 Make sure you are on the Dashboard, located in the top left-hand corner of the screen.



  1. In the middle of the screen, under PBX Status you will click on Firewall. On the first run, it will show a red circle with an exclamation mark in the middle.
  2. Select “Run” and the test will start. All options must be green, otherwise, the SIP trunk will not register or work correctly.

  3. Once all the tests have successfully run and passed, the firewall icon will now turn to a green checkmark   

Add the SIP Trunk

  1. From the menu on the left-hand side menu, select SIP Trunks
  2. Click the “Add SIP Trunk” button
  3. A window will pop up asking for the provider, country, and the Main Trunk No (DID). Once completed, click OK.
    -Country – Select “Generic”
    -Provider – Select “Generic SIP Trunk”
    -Main Trunk No – enter in the 11 digit DID provided for the SIP Trunk that was created.
  4. Under Trunk Details, enter a name for the new SIP Trunk and enter the information requested:
    - Registrar/Server/Gateway Hostname or IP – transport-tcp.domain.tld (domain.tld = SIP Domain) domain.tld = sip domain
    - Outbound Proxy – use sip.siplogin.ca (set port to 0 for DNS-SRV failover to work correctly)

    If we don't use transport-tcp then it will try to register over TLS and will not receive a response. The PBX uses the following transport strictly in this order without the added override TLS then TCP then UDP. This will not work with transport-udp either. 


    Number of SIM Calls should be set to the maximum number of channels your trunk allows.
  5. Under Authentication, fill in the following:
    Type of Authentication – select “Register/Account based”
    Authentication ID – enter your SIP username
    Authentication Password – enter your SIP Password
    3 Way Authentication – Leave unchecked.
  6. Under Route Calls to, select where you want your inbound calls to route to, otherwise leave these at their default values until an extension has been setup.

  7. Under "Options" - Advanced:
    Ensure "Force Invites to be send to IP of Registrar" is enabled. 
    Set "Re-Register Timeout" to 60. 


  8. Under "Inbound Parameters", leave all options at the default value. 


  9. Next is to select the “Outbound Parameters” tab and set the following options:
    Request Line URI: User Part – Leave as Default Value"

    Request Line URI: Host Part – set to Custom Field and enter the SIP Domain name (domain.tld)

    To: User Part - set to "CalledNum" number that has been dialed

    From: Display Name - set to "CallerName" caller's name

    From: User Part - set to "CallerNum" caller's number.


    Example Outbound parameter setup for optimal settings


  10. Click OK at the top of the page to save all your trunk settings.

  11. from the main SIP Trunk page, where your new SIP Trunk is now listed. Click "refresh registration". If the registration is successful it will show as a green dot.

    If the dot is red or yellow, you will have to go back and review the information you entered to make sure it is correct and try again.

  12. Navigate to Settings -> Network -> Public IP 
    uncheck the option "Automatically Bind to IPv6 Adapters if present


    Restart the SIP Service to apply the settings. 

    • Related Articles

    • Synapse SIP Trunk Setup

      How to setup a Synapse SIP Trunk as well as the Inbound and Outbound routes.  Tested On: Synapse Deskset SB67010 - FW: 3.1.1 Synapse SIP Gateway SB67070 - FW: 3.1.2 Prerequisites: SIP Gateway SMB Telephony Deskset Up to date firmware for both SIP ...
    • Grandstream UCM Add a SIP Trunk

      UCM6102/UCM6104 - 1.0.16.20 firmware Note - Caller ID must follow the NPANXX standard. The area code (NPA) must be a valid area code and the NXX must be a valid NXX. If the caller ID is not valid, then calls will not route properly and will need to ...
    • Yeastar S-Series - Add a SIP Trunk

      Tested on Yeastar S20 - Firmware – 30.11.0.28 Note - Caller ID must follow the NPANXX standard. The area code (NPA) must be a valid area code and the NXX must be a valid NXX. If the caller ID is not valid, then calls will not route properly and will ...
    • Grandstream GXW4501 Setup

      Prerequisites SIP Trunk credentials Description This document describes how to link a legacy PBX (e.g. Nortel, Shoretel, Cisco, Avaya, etc...) to a Grandstream PRI Gateway, the gateway then connects to Unitedcloud via a SIP Trunk and can process ...
    • Grandstream HT81x Setup

      Prerequisites Access to the HT81x webgui Office Manager or higher user scope Manual device credentials found here SIP Trunk credentials will require a partner account or support to assist.  This KB will go over how to setup basic functionality of the ...