Our focus in this article is to achieve the connection between your FreeSWITCH server, and our Mission Control Portal. We will describe a sample configuration of the INBOUND and OUTBOUND trunk and the dialplan assuming that you already made the main FreeSWITCH 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.

NOTE: The video above shows creating a username/password connection with username='nameABC' and password='nameABCpassword'. Since the Telnyx platform allows you to create a user/pass combo of your choosing, I went ahead and created the new user/pass combo below which I use in the FreeSWITCH configuration video below.

Username: freeuser

Password: freepass

Your trunk is ready to go on our side! We can move forward with the configurations on your FreeSWITCH PBX. The configurations are shown step-by-step on the subtitles below


Extension 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 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>

Dialplan

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 - 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 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 -->
Did this answer your question?