WELCOME [ Log In · Register ]        SITE [ Search · Page Index · Recent Changes ]    RSS

Wanpipe Freeswitch Config

To configure your system, you will need the following 3 steps:

  1. Configure Wanpipe and mod_openzap
  2. Configure FreeSwitch / mod_openzap
  3. Some Dialplan examples
  4. To start freeswitch
  5. Configuration Appendix

 


Configure Wanpipe and mod_openzap


The wancfg_fs utility will auto-detect and configure Sangoma hardware, wanpipe drivers as well as PRI, BRI or Analog protocols for FreeSwitch.

#> /usr/sbin/wancfg_fs

The wancfg_fs will create:
# wanpipe config file per physical hw port
-> /etc/wanpipe/wanpipe#.conf                              
# PRI configuration file for sangoma_prid daemon
-> /etc/wanpipe/smg_pri.conf           (PRID Advanced Config Options)                      
# BRI configuration file for sangoma_brid daemon
-> /etc/wanpipe/smg_bri.conf                                
# FreeSwitch openzap config file
-> /usr/local/freeswitch/conf/openzap.conf           
# FreeSwtich mod_openzap config file
-> /usr/local/freeswtich/conf/autoload_configs/openzap.conf.xml  


Configure FreeSwitch


To make use of OpenZap in FreeSwitch we need to enable it in modules.conf.xml located at  /usr/local/freeswitch/conf/autoload_configs/.

Edit /usr/local/freeswitch/conf/conf/autoload_configs/modules.conf.xml and un-comment mod_openzap line:

Change the following line

    <!-- <load module="mod_openzap"/> -->

to look like this:

    <load module="mod_openzap"/>


Some Dialplan Examples


Dial string is "openzap/<span_name>/a/<destination_number>@<group_number>"
For example: Following Dialplan calls Sangoma's Toll Free Number when 333 is dialed from SIP phone.

<extension name="outgoing">
        <condition field="destination_number" expression="^(333)$">
            <action application="bridge" data="openzap/smg_prid/a/1800388247@g1"/>
        </condition>
 </extension>

  <extension name="sipuas">
      <condition field="destination_number" expression="^1*">
          <action application="bridge" data="sofia/external/1111@localhost:5062"/>
      </condition>
    </extension>

 <extension name="playback">
      <condition field="destination_number" expression="^2*">
        <action application="answer"/>
        <action application="playback" data="tone_stream://path=${base_dir}/conf/tetris.ttml;loops=10"/>
      </condition>
    </extension>

Note: Group Number can be found inside /etc/wanpipe/smg_pri.conf for PRI or /etc/wanpipe/smg_bri.conf for BRI

 


 

To start freeswitch


Background Mode (Production)

#> /usr/local/freeswitch/bin/freeswitch -nc

run : ps fax to see if freeswitch is up.

Wait few seconds then run the freeswitch cli:

 #> /usr/local/freeswitch/bin/fs_cli

Console Mode

#> /usr/local/freeswitch/bin/freeswitch -nonat



Operation


Start wanpipe T1/E1 cards:

#>wanrouter start

Start PRI Stack Daemon:

#>smg_ctrl start

To stop PRI Stack Daemon:

#>smg_ctrl stop

Page created and maintained by Halo Kwadrat Sp. z o.o. Open Source Telephony