Skip to main content

How do I configure Free PBX to work with my UniTel SIP Trunks?

View our Guide on Getting Started with FreePBX

Updated over 5 months ago

Step 1 – Review Prerequisites:

  1. Active UniTel SIP Services

  2. FreePBX version 12 or newer. Settings taken for FreePBX 12.0.76.2


Step 2 – Collect Trunk authentication settings
Each trunk includes unique credentials for digest authentication.

  1. Navigate to Settings > Trunks

  2. Click the info button [Trunk Info] next to view the Trunks credentials. You will observe the Username, Passcode, and Domain. This information will be used in the PEER Details and REGISTER string

Step 3a - Add Trunk chan_pjsip
*Note: if you are creating chan_sip and NOT chan_pjsip trunks, skip ahead to Step 3b

  1. Login to your FreePBX Admin page

  2. In menu "Connectivity" click "Trunks".

    • click "Add Trunk"

    • click Add SIP (chan_pjsip)

    FreePBX Add Trunk Menu


  3. General Tab settings

    • Trunk Name: "UniTel SIP " (or other descriptive name)

    • Hide Caller ID: "No"

    • Outbound CallerID: {11-digit DID} - Enter your UniTel DID Number in e.164 format i.e. 16305551234

    • CID Options: "Allow Any CID"

    • Maximum Channels: "30" - by default your Unitel Service is limited to 30 confurrent calls for your entire account. Adjust this value to limit calls per trunk.

      FreePBX Trunk pjsip General Tab settings
  4. Dial Number Manipulation Tab settings:

    • Ensure Outbound calls are sent to our network for termination with the leading 1. We require calls be received in e.164 format of 1NXXNXXXXXX . i.e. 16305551234 and NOT 6305551234

  5. Pjsip Settings tab settings:

    • > General Tab

    • Username = {username} collected from Step-2

    • Secret = {passcode} collected from Step-2

    • Authentication = "Outbound" Inbound call failures will result if this value is not set correctly

    • Registration = "Send"

    • SIP Server = sip.unitelgroup.com

    • Context = from-pstn-toheader Inbound call failure can result if this is not set correctly



    Add SIP Trunk pjsip
  6. > Advanced Tab:

    • From Domain = "sip.unitelgroup.com"


    pjsip settings advanced tab



  7. Click Submit Button.

  8. ** Don't forget to click button [Apply Config] in top Navigation

    FreePBX Trunk Apply Config Button


Step 3b – Add Trunk (chan_sip)
*Note: if you previously created your trunk as chan_pjsip above, skip to Step 4

Follow the below instructions to create a chan_sip Trunk

  1. In the General Settings section enter the following information:

    • Trunk Name: “UniTel SIP” (or other descriptive name)

    • Outbound CallerID: {11-digit DID} - Enter your UniTel DID Number in e.164 format i.e. 16305551234

    • CID Options: "Allow Any CID"

    • Dial Number Manipulation: Ensure Outbound calls are sent in the e.164 format of 1NXXNXXXXXX

    • Maximum Channels: "30" - by default your Unitel Service is limited to 30 confurrent calls for your entire account. Adjust this value to limit calls per trunk.

  2. In the "sip Settings" > Outgoing Settings section enter the following information:

    • Trunk Name: "Unitel SIP Trunk" (or other descriptive name)

    • Peer Details:

      • username= {username} collected from Step-2
        type=peer
        secret= {passcode} collected from Step-2
        rfc2833compensate=yes
        qualify=yes
        nat=yes
        insecure=port,invite
        host=sip.unitelgroup.com
        dtmfmode=rfc2833
        context=from-pstn-toheader
        canreinvite=no

  3. In "Incoming Settings" , clear all values from the "USER Context" and "USER Details" sections. Complete the Register String (see below)

  4. In the Registration section, populate the Register String as follows:
    chan_sip trunk Register String Format: {trunk_id}:{service_passcode}@sip.unitelgroup.com/{trunk_id}
    i.e. s100001:[email protected]/s100001

  5. Click Submit

  6. Click [Apply Config] button in top nav

Step 4 - Configure Inbound Route

  1. Navigate to Connectivity > Inbound Routes

  2. Click button [+ Add Incoming Route]

  3. Description: {Descriptive Name} i.e. 15556661234

  4. DID Number: {11-digit UniTel number} | i.e. 15556661234

  5. Caller ID Number: {leave empty}

  6. Set Destination: {Set to your desired destination. i.e. Extension, Ring Groups, etc...

Step 5 - Configure Outbound Routes

  1. Navigate to Connectivity > Outbound Routes

  2. Route Name = UniTel SIP Route

  3. Route CID = {11-digit-phone-number} - ** See Notes in Troubleshooting section

  4. Create Dial Pattern as desired (Toll Free, US, Long distance, etc.)

  5. In section Trunk Sequence for Matched Routes, add previously created trunk "UniTel SIP"




FreePBX Troubleshooting

Troubleshooting Trunk Registration

  1. chan_sip trunk Register String Format: {trunk_id}:{service_passcode}@sip.unitelgroup.com/{trunk_id}
    i.e. s100001:[email protected]/s100001

Troubleshooting Inbound calls

  1. Troubleshooting numbers configured with number mode "Assign To Trunk"

    1. Whitelist IP Addresses listed in our Getting Started Guide > Whitelist section

    2. Confirm Trunk status is Online/Registered. From the Manage Trunks screen, click [Trunk Info] and check "Registration Status" should show "Registered". If "Not Registered" refer to section Troubleshooting Trunks

    3. Check Trunk Settings: confirm Trunk Authentication = "Outbound". UniTel Trunks configured in your PBX should accept all inbound calls received from UniTel Network. Improper values will result in inbound calls to be rejected by your PBX.

    4. Check Trunk Settings: confirm context was entered with value "from-pstn-toheader" as detailed in above steps. Improper value will result in FreePBX improperly reading sip header Caller ID causing call rejection.

    5. Check Inbound Route settings: If route is using DID Number matching, confirm you have entered the 11-digit number format. i.e. 16305551234 not 6305551234.


Troubleshooting Outbound calls

  1. Call termination for Destinations located in the United States must be sent to our network in 11-digit number format (e.164 format). i.e. 16305551234 not 6305551234

  2. Calls terminating outside the United States require calls to be passed with the prefix 011.

  3. If you observe an announcement "This call is not covered by your Tariff Plan", reattempt the call ensuring it was dialed properly. If the issue persists contact us reporting the date/time and number dialed.

  4. Check the status of your UniTel Trunk confirming it is registered/online. From the Manage Trunks screen, click [Trunk Info] and confirm "Registration Status" shows "Registered". If "Not Registered" refer to section Troubleshooting Trunks

  5. Ensure any internal dial codes are not being passed in your calls to UniTel Trunks.

  6. Outbound calls must send Caller ID of an existing UniTel DID (Local or Toll Free). Configuration of a DID number not serviced on your UniTel account will result in outbound calls being rejected. Contact us if you have need to pass Outbound Caller ID as a number not serviced on your Unitel account.

FreePBX References:

Did this answer your question?