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

Open SidemenuDocs
Docs
Close Sidemenu
Choose:
CredentialsIP
CredentialsIP

Configuring a FreeSWITCH PBX Trunkconfiguring-a-freeswitch-pbx-trunk

FreeSWITCHTelnyx Developers is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device. FreeSWITCH can interconnect with the outside world and scale to any size.

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

FreeSWITCH PBX Instructionsfreeswitch-pbx-instructions

  1. 1Download - FreeSWITCH is available to download from hereTelnyx Developers.
  2. 2Installation - You can view the installation guide hereTelnyx Developers.
  3. 3Configure Your Telnyx Mission Control Portal

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


FreeSWITCH PBX Setup Guidefreeswitch-pbx-setup-guide

Extension configuration for registering a SIP phoneextension-configuration-for-registering-a-sip-phone

You may register to one of the existing extensions; however it is recommended that you change the default password

File to edit: directory/default/1000.xml

<param name="password" value="abcd1234"/>
<!-- Replace abcd1234 with a strong password -->

SIP Trunksip-trunk

Create a file under directory: sip_profiles/external

ie. sip_profiles/external/telnyx.xml - telnyx.xml should contain the following:

<include>
  <gateway name="telnyx">
    <param name="realm" value="sip.telnyx.com"/>
    <param name="username" value="freesuser"/>
    <!-- Replace freesuser with your Telnyx Portal username -->
    <param name="password" value="freespass"/>
    <!-- Replace freepass with your Telnyx Portal password -->
    <param name="register" value="true"/>
  </gateway>
</include>

Dialplandialplan

File to edit: dialplan/default.xml - add the following to default.xml

<extension name="dial">
    <condition field="destination_number" expression="^(1{0,1}\d{10})$">
    <action application="set" data="effective_caller_id_number=13125489677"/>
    <!-- Replace 3125489677 with the DID you want as CID -->
    <action application="bridge" data="sofia/gateway/telnyx/$1"/>
    </condition>
</extension>

Inbound Trunk - DIDinbound-trunk---did

Create a file under directory: dialplan/public/

ie. dialplan/public/3125489677.xml - 3125489677.xml is the DID you purchased at Telnyx Mission Control Portal and should contain the following:

<include>
  <extension name="public_did">
    <condition field="destination_number" expression="^(13125489677)$">
    <!-- Replace 13125489677 with the DID you purchased at the Telnyx Portal -->
        <action application="set" data="domain_name=$${domain}"/>
        <action application="transfer" data="1000 XML default"/>
    </condition>
  </extension>
</include>

Network configurationnetwork-configuration

Note: In case FreeSWITCH fails to recognize your public IP you may "force" it to use a static Public IP as follows

File to edit: sip_profiles/external.xml

<param name="ext-rtp-ip" value="8.8.8.8"/>
<param name="ext-sip-ip" value="8.8.8.8"/>
<!-- Replace 8.8.8.8 with your public IP -->

Additional Resourcesadditional-resources

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 chat bubble at your lower right hand corner and start a chat!

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