Follow

SIP 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/sipus.xml

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

<include>
  <gateway name="sipus-outbound">
    <param name="username" value="****yourusername"/>
    <param name="password" value="****yourpassword"/>
    <param name="realm" value="sipus-outbound"/>
    <param name="proxy" value="gw.sip.us"/>
    <param name="register" value="false"/>
  </gateway>
  <gateway name="sipus-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.sip.us"/>
    <param name="register-proxy" value="gw.sip.us"/>
    <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 SIP.US 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_sipus.xml configuration file (using your favorite text editor)

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

b. Add the following to the 00_outbound_sipus.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/sipus-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 SIP.US. 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?
3 out of 3 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk