Skip to main content

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

Dahdi

Setup

  1. yum install kernel-devel kernel-headers
  2. cd /usr/src
  3. ln -s linux-headers-1.2.3 linux
  4. lspci -vv (Check that the hardware is detected)
  5. adduser asterisk; mkdir /etc/asterisk (to avoid errors during compile/install)
  6. Download and unzip the latest Dahdi driver + tools from Asterisk
  7. make
  8. make install
  9. make config
  10. 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
  11. If you need to set eg. tones for France, vi /etc/dahdi/genconf_parameters:
    "lc_country fr"
  12. vi /etc/modprobe.d/dahdi.blacklist.conf:
  13. Comment out modules you do NOT want to blacklist
  14. Add "blacklist netjet"
  15. 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
  16. Either run "dahdi_genconf modules", or edit /etc/dahdi/system.conf manually
  17. /etc/init.d/dahdi start, and check /var/log/messages
  18. 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

  1. cd /usr/src/freeswitch
  2. Edit modules.conf: Uncomment "../../libs/openzap/mod_openzap"
  3. Follow the instructions on how to compile FreeSWITCH
  4. vi /usr/local/freeswitch/conf/openzap.conf
    [span zt FXO]
    name => OpenZAP
    fxo-channel => 1
  5. vi /usr/local/freeswitch/conf/autoload_configs/openzap.conf.xml
    <analog_spans>
    <span name="FXO">
  6. Run the FreeSWITCH console fs_cli, type "load mod_openzap", followed by "oz list"
  7. 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"/>
  8. 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)