This is the API V2 documentation. To switch out of beta revert back to our API V1.

Open SidemenuDocs
Docs
Close Sidemenu
Choose:
Credentials
Credentials

How to configure a FreePBX PJSIP Version 13 Credentials Trunkhow-to-configure-a-freepbx-pjsip-version-13-credentials-trunk

How to configure a FreePBX Credentials Trunk

Introductionintroduction

FreePBXTelnyx Developers is a web-based open source GUI (graphical user interface) that controls and manages Asterisk (PBX), an open source communication server. FreePBX is licensed under the GNU General Public License (GPL), an open source license. FreePBX can be installed manually or as part of the pre-configured FreePBX Distro that includes the system OS, Asterisk, FreePBX GUI and assorted dependencies.

You'll need to have created an Credential based connectionPORTAL on your Telnyx Mission Control Portal account, assigned this connection to a DID and outbound profile in order to make and receive calls.


FreePBX PJSIP v13 Instructionsfreepbx-pjsip-v13-instructions

Downloaddownload

FreePBX v13 is available to download from hereTelnyx Developers.

Installationinstallation

You can view the installation guide hereTelnyx Developers.

Video Walkthroughvideo-walkthrough

Coming soon! This walkthrough will demonstrate setting up an IP based connection with FreePBX. We'll also show you how to assign this connection to a newly purchased DID which will allow you to receive inbound calls. Then we'll walk you through how to assign the connection to an outbound profile such that you can make outbound calls!


Configuring Your Telnyx Mission Control Portalconfiguring-your-telnyx-mission-control-portal

For step by step instructions on each of the requirements on the Telnyx Mission Control Portal, please follow this guide.

Once you've configured your Telnyx account, you can now proceed to setup FreePBX V13 following the guide below.


FreePBX Setup Guidefreepbx-setup-guide

You are now all set on the Mission Control Portal side and are ready to configure your Telnyx trunk within your FreePBX V13 system.

Installationinstallation

Once you load the ISO onto your server or virtual machine, you'll have a few options to select for installation. We'll be doing a full install via asterisk 13. FreePBX

  1. 1Confirm your appropriate network settingsx.

FreePBX

  1. 2Confirm your root password.

FreePBX

  1. 3Wait for all the necessary packages to be installed.

FreePBX

  1. 4More modules will be updated after successful internet tests.

FreePBX

  1. 5Enter root and the password you created from step 2.

FreePBX

  1. 6You'll now be provided with the URL you need to use in order to access the FreePBX web interface.
    FreePBX

Chan_pjsip TrunkConfigurationchan_pjsip-trunkconfiguration

  1. 1The default behavior of FreePBX version 13 is to use chan_pjsip for endpoints and trunks.
  2. 2Selection 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.

FreePBX

  1. 3To 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.

FreePBX

Step 1: Setupstep-1--setup

  1. 1On FreePBX, go to Connectivity -> Trunks page
  2. 2Click on + Add Trunk → select Add SIP (chan_pjsip) Trunk.

FreePBX

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. 3Trunk Name: Telnyx_userAuth
  2. 4Outbound CallerID: your_Telnyx_number
  3. 5CID Options: Allow Any CID

FreePBX

Dialed Number Manipulation Rules:

  1. 6This 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

FreePBX

PJSIP Settings:

  1. 7Select the "pjsip Settings" tab and edit the settings under the "General" sub-tab.
  • Username : Enter the user name which you have created in the connections tab on Telnyx Portal
  • Secret : The "Secret" is the password for your trunk found under the connection → "show password" link in your Telnyx portal
  • Authentication : Outbound
  • Registration : Send
  • Language Code : English
  • SIP Server : Sip.telnyx.com
  • SIP Server Port : 5060
  • Context : from-pstn
  • Transport : 0.0.0.0-udp

FreePBX

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

FreePBX

  1. 10Select the "Codecs" sub-tab under the "pjsip Settings" tab. Here you should select:
    • ulaw, alaw, gsm, g722, g729, Opus
  2. 11All other boxes should be unchecked. Because Telnyx supports the following codecs:
    • G.722
    • G.711U (PCMU)
    • G.711A (PCMA)
    • G.729
    • Opus (supported for IB and OB calls, for IB calls though it's only allowed when using TLS or TCP transport)
    • H.264

FreePBX

After doing the above, please click on submit and apply config.

Step 2: Outbound Routesstep-2--outbound-routes

  1. 1Now we need to configure “Outbound Routes”.
  2. 2Make your way to Connectivity -> Outbound Routes.
  3. 3Select "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."
    • Route Name : Outbound_Telnyx
    • Route CID : Number which you have purchased on the portal
    • Trunk Sequence for Matched Routes : Select the trunk which you have created

FreePBX

  1. 4Select 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 clicking "Submit" then "Apply Config".

FreePBX

Step 3: Inbound Routesstep-3--inbound-routes

  1. 1Make your way to Connectivity -> Inbound Routes.
  2. 2To direct calls from sip.telnyx.com to an extension you must create an inbound route.
  3. 3To start select "Inbound Routes" from the "Connectivity" menu on your FreePBX interface.
  4. 4The 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).

FreePBX

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

That's it, you've now completed the configuration of FreePBX PJSIP V13 Credentials Trunk and can now make and receive calls by using Telnyx as your SIP provider!


Additional Resourcesadditional-resources

Review our getting started guide to make sure your Telnyx Mission Control Portal account is setup correctly.

Checkout FreePBX's help sectionTelnyx Developers for extra support.


Can't find what you're looking for?can-t-find-what-you-re-looking-for-

Our knowledge base is currently undergoing a makeover which will include more up to date videos to match our ever growing platform.

Can't find what you're looking for? Click the Live Chat icon at your lower right hand corner and start a chat.

Was this page helpful?was-this-page-helpful