FreePBX 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 a Credentials based connection on your Telnyx Mission Control Portal account, assigned this connection to a DID and outbound profile in order to make and receive calls.
Additional documentation and resources:
FreePBX documentation (This is useful for any configuration instructions that don't involve Telnyx and are maintained solely by FreePBX)
Instructions to Configure a FreePBX PJSIP V13
In this activity you will:
Install FreePBX (You can also follow instructions provided by FreePBX)
Have created a credentials based connection on your Telnyx Mission Control Portal account, assigned this connection to a DID and outbound profile in order to make and receive calls.
Download and install FreePBX. You can also see our installation guide below.
RECOMMENDED: Enable TLS to encrypt your traffic
Setting up your Telnyx SIP portal account so you can make and receive calls:
Note: Video walkthrough for FreePBX/Telnyx SIP trunking configuration coming soon. Check back as we update our docs.
1. Install FreePBX
Once you've loaded the FreePBX 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. So go ahead and run the installer.
Select Full Install.
Confirm your network settings.
Confirm your root password.
Wait for all the necessary packages to be installed.
More modules will be updated after successful internet tests.
Enter root and the password you created from step 2.
You'll now be provided with the URL you need to use in order to access the FreePBX web interface.
You'll be brought to the initial setup and must enter in the username, password and admin email address in order to create your account.
Once you've created your account, you'll be brought to the dashboard. Select FreePBX Administration and enter your username and password.
Follow the process to activate your FreePBX V13.
Select your default locales.
You'll be presented with some firewall details and other suggestions. You are welcome to set this up based on your requirements.
2. Configure your SIP trunk
The default behavior of FreePBX version 13 is to use chan_pjsip for endpoints and trunks.
Make your way to Settings > Asterisk SIP Settings in order to confirm your network settings.
You'll want to ensure you populate the external and local network addresses under General SIP Settings and Chan SIP Settings.
Once you've completed this, click Submit and then Apply Config.
Now go to Applications -> Extensions > Add Extension > Add New Chan SIP Extension. The Outbound CID is the number you purchased from your Telnyx Mission Control Portal. The extensions secret may need to be populated under the Other tab.
Note that if you do not set an Outbound CID for your Extension, you must enable this on your trunk. See the Pre-requisites section.
Note: This device uses CHAN_SIP technology listening on Port 5160 (UDP - this is a NON STANDARD port).
Click Submit and Apply Config.
Navigate to Settings > Advanced Settings > Dialplan > Operational > SIP Channel Driver.
Navigate to Connectivity > Trunks and click on +Add Trunk to expand its dropdown.
Select Add SIP (chan_pjsip) from this menu.
Click on General Settings and provide the following details:
Click on the Dialed Number Manipulation Rules tab. You can leave this entire section in its default state, but you can also enter dial patterns here:
Click on the PJSIP Settings tab and on the General sub-tab, provide the following:
Username : Your Telnyx account username
Secret : The password for your Telnyx trunk found under the connection → "show password" link in your Telnyx portal
Authentication : Outbound
Registration : Send
Language Code : English (or the language you wish to conduct calls in)
SIP Server : Sip.telnyx.com
SIP Server Port : 5060 if you have not enabled TLS encryption. If you have, choose 5061.
Context : from-pstn
Transport : UDP or TCP if you have not enabled TLS encryption. If you have, choose TLS/TCP.
Open the PJSIP Settings > Advanced sub-tab and adjust the following:
Open the PJSIP Settings > Codecs sub-tab and adjust the following:
Click Submit, then Apply Config.
3. Configure outbound routes
Outbound routing is a set of rules that tells FreePBX which Telnyx trunk to use for any given outbound call. Having multiple trunks allows you to control cost by routing calls over the least costly trunk for a particular call. Outbound routes are used to specify what numbers are allowed to go out a particular route.
You will want to make sure you define routes for all types of calls. Not defining a route can leave your users frustrated when they need to make an important call.
Navigate to Connectivity -> Outbound Routes.
Create a new outbound route and provide the following on the Route Settings tab:
Route Name: Something distinct that makes sense for your route purpose.
Trunk Sequence for Matched Routes: Select the trunk you just created in section 2.
Route Name : Outbound_Telnyx
Route CID : Number you purchased on the Telnyx portal.
Trunk Sequence for Matched Routes : Select the trunk you just created in section 2.
Now select the Dial Patterns tab to the right of the Route Settings tab and enter dial patterns exactly as you see in the following image. This pattern allows you to dial 10 Digits (U.S. Calling), 11 Digits (North American Calling).
If you need dial patterns for a region outside North America, please contact Telnyx support.
Note that our current documentation portal shrinks screenshots, making some detail difficult to see. Right-click on the image above and select "Open image in new tab" from the context menu. This will open the image in a new tab and display it at its full size and resolution.
Click Submit, then Apply Config.
4. Configure inbound routes
When a call comes in from the outside, it'll need to be directed from sip.telnyx.com to the phone extension you ultimately want it to go, such as a user extension or an IVR extension.
In this section, we'll configure our own inbound routes.
Make your way to Connectivity -> Inbound Routes and open the General tab.
The following image 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).
Note: By default, when creating a SIP Connection in the Telnyx Mission Control Portal, the number formats for the ANI and DNIS will be set to E.164. This means Telnyx will send the dialled number in the SIP INVITE to your FreePBX system with 11 digits. As the DID number above is in 11 digit format, the call will be accepted and routed to the extension. However, you can control the number formats as you desire and can read more about it here.
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.
Review our getting started with guide to make sure your Telnyx Mission Control Portal account is set up correctly.
Additionally, you can check out: