Follow

Freeswitch Configuration

*** Please note that if there is a Firewall or NAT (Network Address Translator) between your Freeswitch Box and OnSIP, the following configuration instructions may not be applicable. ***

Configuring Freeswitch

Go to https://admin.onsip.com and login. Go to the PSTN Gateway section and note your VOIP username and password.

Changing Freeswitch's Default Password:

The default password for extensions created through Freeswitch is "1234" making it very insecure. PBXes that run with the default password are frequently hacked by criminals who make thousands of dollars in long distance calls, which OnSIP will not be responsible for. Changing the default password on your PBX helps protect you against this circumstance.

You can change the default password in $PREFIX/freeswitch/conf/vars.xml

 <X-PRE-PROCESS cmd="set" data="default_password=1234"/>

Change the "1234" so that is at least 7 characters containing letters, numbers and symbols.

Create Your Gateway Registration:

The first step is to set up an external connection to OnSIP so that you may register your Freeswitch device to our PSTN service.

In $PREFIX/freeswitch/conf/sip_profiles/external/ create a file called junctionnetworks.com.xml including this information:

  <include>
         <gateway name="junctionnetworks.com">
           <param name="username" value="USERNAME"/>
           <param name="realm" value="jnctn.net"/>
           <param name="password" value="VOIP PASSWORD"/>
           <param name="extension" value="YOURINBOUNDDID"/>
           <param name="proxy" value="sip.jnctn.net"/>
           <param name="expire-seconds" value="3600"/>
         </gateway>
      </include>

*** Please note that your VOIP password is not the same as the password you selected when you signed up for service and now use to access your account information via the OnSIP web site. You can find your OnSIP VOIP username and password by logging into the OnSIP web site at https://admin.onsip.com and going to the VOIP page. ***

This will allow you to register to our service and is the basic block from which all other Freeswitch activities spring.

Setting up a Basic Dailplan to Test Inbound and Outbound Calls:

This will give you the ability to test inbound and outbound calls to one device registered as extension 1001.

Go to $PREFIX/freeswitch/conf/dialplan and add this to public.xml to test inbound calling

   <extension name="junctionnetworks.com">   
   <!-- your provider or any name you'd like to call it -->
    <condition field="destination_number" expression="INBOUNDDID">  
    <!-- your DID for this gateway-->
    <action application="bridge" data="sofia/internal/1001 XML default"/>
    </condition>
   </extension>

Add this to public.xml to test outbound calling:

  
   <extension name="junctionnetworks.com>
    <condition field="destination_number" expression="^(1{0,1}\d{10})$">
      <action application="set"data="effective_caller_id_number=OUTBOUNDCALLERID"/>
      <action application="bridge" data="sofia/gateway/junctionnetworks.com/$1"/>
     </condition>
   </extension>

Running Freeswitch:

Start Freeswitch by $PREFIX/freeswitch/bin/freeswitch

You can hit f5 from the command line to see your registration. It should look similar to this:

                     Name          Type                                       Data      State
=================================================================================================
                 external       profile             sip:mod_sofia@192.168.0.3:5080      RUNNING (0)
external::junctionnetworks.com  gateway           sip:freeswitch_lab@sip.jnctn.net      REGED
              192.168.0.4         alias                                   internal      ALIASED
=================================================================================================
1 profile 1 alias

You can double check that you are registered by going to http://admin.onsip.com and looking at the Configuration page of your account.

Here you can see that our lab Freeswitch PBX is registered to our Junction Networks gateway.

There are many resources for assistance with Freeswitch. The best place to start is at the official wiki page.

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

Comments

Powered by Zendesk