OpenZap Dahdi
If you use a PCI telephony card, you must first install Asterisk's Dahdi (ex-Zaptel) module, followed by FreeSWITCH's OpenZap which relies on Dahdi.
Click here to expand Table of Contents
- 1 Dahdi
- 1.1 Setup
- 1.2 Configuration
- 1.3 Tools in /usr/sbin/
- 2 OpenZap
Dahdi
Setup
- yum install kernel-devel kernel-headers
- cd /usr/src
- ln -s linux-headers-1.2.3 linux
- lspci -vv (Check that the hardware is detected)
- adduser asterisk; mkdir /etc/asterisk (to avoid errors during compile/install)
- Download and unzip the latest Dahdi driver + tools from Asterisk
- make
- make install
- make config
- If you need to set options, eg. set the wctdm driver to work in France, vi /etc/modprobe.d/dahdi.conf:
options wctdm opermode=FRANCE - If you need to set eg. tones for France, vi /etc/dahdi/genconf_parameters:
"lc_country fr" - vi /etc/modprobe.d/dahdi.blacklist.conf:
- Comment out modules you do NOT want to blacklist
- Add "blacklist netjet"
- Reboot to get rid of the NetJet module that is loaded instead of the Wctdm module, and run "lsmod" to check that netjet/ISDN are gone
- Either run "dahdi_genconf modules", or edit /etc/dahdi/system.conf manually
- /etc/init.d/dahdi start, and check /var/log/messages
- For FreeSWITCH to be able to access the Dahdi devices, edit /etc/udev/rules.d/dahdi.rules, followed by "/etc/init.d/dahdi restart"
Configuration
/etc/dahdi/
- genconf_parameters: Parameters that affect the dahdi_genconf configuration generator, eg. "lc_country fr" so that dahdi_genconf uses France for tone generation
- init.conf: Settings for Dahdi initialization scripts. Replaces /etc/sysconfig/zaptel, /etc/defaults/zaptel
- modules:
- system.conf: Generated by dahdi_genconf, and read by dahdi_cfg
/etc/modprobe.d/dahdi.blacklist.conf
Used to disable loading modules causing trouble for Dahdi, eg. netjet
/etc/modprobe.d/dahdi.conf
This file sets module options.
Tools in /usr/sbin/
- To check hardware installed: dahdi_hardware
- To check hardware installed: dahdi_scan
- dahdi_genconf: Reads /etc/dahdi/genconf_parameters to generate /etc/dahdi/system.conf and/etc/asterisk/dahdi_channels.conf
- After editing /etc/dahdi/system.conf, run "dahdi_cfg -vv"
- To check timer: dahdi_test
- dahdi_speed
- dahdi_tool: Equivalent of zttool
OpenZap
- cd /usr/src/freeswitch
- Edit modules.conf: Uncomment "../../libs/openzap/mod_openzap"
- Follow the instructions on how to compile FreeSWITCH
- vi /usr/local/freeswitch/conf/openzap.conf
[span zt FXO]
name => OpenZAP
fxo-channel => 1 - vi /usr/local/freeswitch/conf/autoload_configs/openzap.conf.xml
<analog_spans>
<span name="FXO"> - Run the FreeSWITCH console fs_cli, type "load mod_openzap", followed by "oz list"
- To have OpenZap be loaded automatically when FreeSWITCH starts, edit /usr/local/freeswitch/conf/autoload_configs/modules.conf.xml, and uncomment <load module="mod_openzap"/>
- As OpenZap ignores the tones information from Dahdi and uses its own information, check that the tones information for your country are available in /usr/local/freeswitch/conf/tones.conf (Tones.conf_Example)