FreeSWITCH Configuration
To configure your system, you will need the following 3 steps:
- Configure Wanpipe and mod_freetdm
- Configure FreeSWITCH and mod_freetdm
- Some Dialplan examples
- Sangoma ISDN Configuration Options
- Analog Configuration Options
- Configuration Appendix
Configure Wanpipe and Freeswitch
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
# FreeSwitch FreeTDM config file
-> /usr/local/freeswitch/conf/freetdm.conf
# FreeSwtich mod_freetdm config file
-> /usr/local/freeswtich/conf/autoload_configs/freetdm.conf.xml
Configure FreeSwitch
To make use of FreeTDM 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_freetdm line:
Change the following line
<!-- <load module="mod_freetdm"/> -->
to look like this:
<load module="mod_freetdm"/>
Some Dialplan Examples
Dial string is:
- To dial to a specific span:
"freetdm/<span_name>/a/<destination_number>" - To dial to a specific group:
"freetdm/<group_name>/a/<destination_number>"
Note: If you have a span and a group with the same name, the span will be used.
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="freetdm/wp1/a/1800388247"/> </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> |