Our focus in this article is to achieve the connection between your Free PBX server, and our Mission Control Portal. We will describe a sample configuration of the INBOUND and OUTBOUND trunk and the dialplan considering that you already made the main Free PBX installation and telecommunication-applications deployment.

Once you have configured the following steps, you can take advantage of leveraging our Mission Control Portal to maximize your business operations.

First, you need to create a FreePBX Trunk for your Telnyx portal : 

Video Link : https://fast.wistia.net/embed/iframe/i1uvfjho4b

This video will show you on how to create connection, Outbound profile and assigning number. 

Chan_pjsip TrunkConfiguration: 

FreePBX PJSIP configuration using User/PassTrunk : 

The default behavior of FreePBX version 12 is to use chan_pjsip forendpoints and trunks. 

Selection of either chan_pjsip or can_sip from within your distribution can be found in the Admin Web tool under Settings -> Advanced Settings ->Dialplan and Operational -> SIP Channel Driver. 

To configure FreePBX to work with Telnyx SIP Trunking service, you should make configuration changes in 3 areas:

  • Connectivity --> Trunks
  • Connectivity --> Outbound Routes
  • Connectivity --> Inbound Routes

Each of these is configured using the Admin Web tool provided by FreePBX.

Step 1: 

On FreePBX, the Connectivity -> Trunks page
Click on + Add Trunk → select Add SIP (chan_pjsip) Trunk

When adding the new trunk, many settings are available, and most have defaults already configured.
To configure a Telnyx SIP Trunking account, make modifications to the following options:

--> General Settings :

  1. Trunk Name: Telnyx_userAuth
  2. Outbound CallerID: your_Telnyx_number
  3. CID Options: Allow Any CID

--> Dialed Number Manipulation Rules :  (This entire section can be left at defaults) or
You can enter the Dial patterns Wizards.
→ Prepend = <Leave Empty>, Prefix = <Leave Empty>, Match Pattern = NXXNXXXXXX
→ Prepend = 1, Prefix = <Leave Empty>, Match Pattern = 1NXXNXXXXXX

--> PJSIP Settings :
Select the "pjsip Settings" tab and edit the settings under the "General" sub-tab. 

  1. Username : <Enter the user name which you have created in the connections tab on Telnyx Portal>
  2. Secret : <The "Secret" is the password for your trunk found under the connection → "show password" link in your Telnyx portal>
  3. Authentication : Outbound
  4. Registration : Send
  5. Language Code : English
  6. SIP Server : Sip.telnyx.com
  7. SIP Server Port : 5060
  8. Context : from-pstn
  9. Transport :

Select the "Advanced" sub-tab under the "pjsip Settings" tab. Look at the image below. You must edit the "From Domain" field to say “sip.telnyx.com”

Select the "Codecs" sub-tab under the "pjsip Settings" tab. Here you should select ulaw, alaw, gsm, g722, g729, Opus. All other boxes should be unchecked.

Because Telnyx supports the following codecs:
G.711U (PCMU)
G.711A (PCMA)
Opus (supported for IB and OB calls, for IB calls though it's only allowed when using TLS or TCP transport)

After doing the above please click on submit button at the bottom. Now configurations which you have made has been submitted. 

Step 2 : 

Outbound Routes :
Now we need to configure “Outbound Routes”.  
FreePBX → Connectivity -> Outbound Routes

Select "Connectivity" then "Outbound Routes." To create a new "Outbound Route," you must first enter a distinctive "Route Name." Then select the trunk you just created as the top route in "Trunk Sequence for Matched Routes."

1. Route Name : Outbound_Telnyx
2. Route CID : <Number which you have purchased on the portal>
3. Trunk Sequence for Matched Routes : <Select the trunk which you have created>

Select the "Dial Patterns" tab. Enter dial patterns exactly like the image below. They will allow for you to dial 10 Digits (U.S. Calling), 11 Digits (North American Calling). After entering this info, and hitting "Submit" then "Apply Config". 

Step 3:
Inbound Routes :
Connectivity -> Inbound Routes
To direct calls from sip.telnyx.com to an extension you must create an inbound route.
To start select "Inbound Routes" from the "Connectivity" menu on your FreePBX interface.
The image below demonstrates an inbound route that will send ANY call to a certain extension. To direct a specific number to a specific extension you would create a route and set the "DID Number" field to your 11 digit DID with sip.telnyx.com (for instance : 12172031700).

In the Above screen shot, 1010 is my test extension created on the FreePBX. 

After entering this info, and hitting "Submit" then "Apply Config". 

After following this article, your PBX should be successfully registered, and you can make outbound and inbound calls. If you have any issues, please contact Telnyx support using Chat or ticket.
Our Support Team will try to help you on sip trunk configuration. 

Did this answer your question?