Follow

SIPTRUNK.COM Trunk Configuration - FreeSwitch

The following represents a very basic set-up in Freeswitch by modifying/adding to default configuration files.

The first step in this process is to create an external registration. In Freeswitch this will create a registration that is aliased as "gateway" which will be used in our dialplan.

1. Create and edit the sipus.xml configuration file (using your favorite text editor):

    a. sudo vim /usr/local/freeswitch/conf/sip_profiles/external/siptrunk.xml

    b. Add the following to the sipus.xml configuration  file where: ****yourusername is your SIPTRUNK.com trunk name, ****yourpassword is your SIPTRUNK.com trunk password

<include>
  <gateway name="siptrunk-outbound">
    <param name="username" value="****yourusername"/>
    <param name="password" value="****yourpassword"/>
    <param name="realm" value="sipus-outbound"/>
    <param name="proxy" value="gw.siptrunk.com"/>
    <param name="register" value="false"/>
  </gateway>
  <gateway name="siptrunk-inbound">
    <param name="username" value="****yourusername"/>
    <param name="password" value="****yourpassword"/>
    <param name="realm" value="sipus-inbound"/>
    <param name="extension" value="1000"/>
    <param name="proxy" value="gw.siptrunk.com"/>
    <param name="register-proxy" value="gw.siptrunk.com"/>
    <param name="expire-seconds" value="90"/>
  </gateway>
</include>

Now it's time to create an outbound dialplan. The dialplan that will be shown here is just a wildcard dialplan, which means that it will send whatever you dial. We recommend using pattern matching (_1NXXNXXXXXX) to ensure you are sending SIPTRUNK.com the correct digits for dialing. For North American dialing we need 11 digits (1+(Area Code)+(7 Digit Number).

2. Create and edit the 00_outbound_siptrunk.xml configuration file (using your favorite text editor)

a. sudo vim /usr/local/freeswitch/conf/dialplan/default/00_outbound_siptrunk.xml

b. Add the following to the 00_outbound_siptrunk.xml file:

<extension name="outbound_pstn">
<condition field="destination_number" expression="^(.*)$">
<action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
<action application="bridge" data="sofia/gateway/siptrunk-outbound/$1"/>
</condition>
</extension>

You should be ready to start freeswitch and make some test calls! We recommend setting up a softphone and registering it to the user and extension "1000" with the default password "1234". Once the phone is successfully registered, you should be able to make calls through SIPTRUNK.com. If you have trouble, feel free to open a support ticket using the link at the top right of your account screen.

GOOD LUCK!

Was this article helpful?
0 out of 1 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk