Upgrade 3CX to v18 and get it hosted free!

DAHDI

Author image

DAHDI is the new name for ‘Zaptel‘ as of May 19th 2008. Short for “Digium Asterisk Hardware Device Interface”.

The post at http://blogs.digium.com/2008/05/19/zaptel-project-being-renamed-to-dahdi/ details the reason for the change. Asterisk 1.4 releases later than 1.4.21, and all releases of Asterisk 1.6, will automatically use DAHDI in preference to Zaptel, even if Zaptel is still installed on the system.

Git Repositories

  • git clone git://git.asterisk.org/dahdi/linux dahdi-linux
  • git clone git://git.asterisk.org/dahdi/tools dahdi-tools

Conversion from Zaptel

Digium resources regarding zaptel to dahdi migration

Configuration Files

  • /etc/dahdi/system.conf: Unlike zaptel.conf, you have to explicitly set the echo canceller for each channel. Also, there are a number of other configuration files under /etc/dahdi. Sample system.conf
  • /etc/asterisk/chan_dahdi.conf
  • /etc/dahdi/init.conf: Replaces /etc/default/zaptel (on Debians) and /etc/sysconfig/zaptel (on most other systems) – this is a shell script snippet that is sourced by the dahdi init.d script. All values there are optional (no need to explicitly define TELEPHONY=no). The variable MODULES, however, is no longer read from it. IT is read from:
  • /etc/dahdi/modules: A list of modules to load. Replaces the variable MODULES from the above configuration file.
  • /etc/dahdi/genconf_parameters: Fine-tuning parameters for dahdi_genconf (replaces zapconf and also deprecates genzaptelconf).

Architecture

The package is composed of two sub-packages:

Kernel

Include kernel modules and minila helper files (firmwares)

Tools

The userspace tools to control DAHDI spans/channels:

  • dahdi_cfg: The DAHDI Configurator, which parses system.conf
  • dahdi_genconf: Generates /etc/dahdi/system.conf, so it’s better that you don’t hand edit system.conf. Uses /etc/dahdi/genconf_parameters to define it’s actions.
  • dahdi_hardware: Displays listing of DAHDI hardware detected
  • dahdi_monitor: Monitors signal level on analog channel allows you to record audio from it. Usage: dahdi_monitor <channel num> -v -m -o -p -l limit -f FILE -s FILE -r FILE1 -t FILE2 -F FILE -S FILE -R FILE1 -T FILE2 (Example:- dahdi_monitor 1 -vv) Extremely useful, but otherwise not mentioned, that the raw format output is 8Khz 16bit signed. Use sox to convert to a wav. sox -r 8000 -s -w rx.raw rx.wav
  • dahdi_scan: Generates a list of things DAHDI channels, with some details
  • dahdi_test: Measures accuracy of the FXO/FXS board software digital signal processing
  • dahdi_tool: A nice tool to see what your boards are doing.

See also

Sample Installation

After compiling and installing of dahdi and asterisk, you have to perform some further steps to use your hardware.
This example will show you a few steps on how to get asterisk and two Digium cards enabled:

1.) Detect your hardware

  # (this will generate /etc/dahdi/system.conf and  /etc/asterisk/dahdi-channels.conf)
 asterisk:~# dahdi_genconf

2.) Read systm.conf file and configure the kernel

 
 asterisk:~# dahdi_cfg -v

3.) Restart dahdi to unload and reload all modules and drivers

  asterisk:~#  /etc/init.d/dahdi restart

4.) Point file chan_dahdi.conf to /etc/asterisk/dahdi-channels.conf

  # open chan_dahdi.conf and include it under the section [channels]
  #
  # NOTE: You can edit and configure /etc/asterisk/dahdi-channels.conf at any time 
  # to set up your specific options there.
  ...
  [channels]
  ...
  #include /etc/asterisk/dahdi-channels.conf
  ...

5.) Restart asterisk

  asterisk:~#  /etc/init.d/asterisk restart

5.a) Verify your current system status. You should get some output like this:

  asterisk*CLI> dahdi show status
  Description                              Alarms     IRQ        bpviol     CRC4      
  Wildcard TDM410P Board 1                 OK         0          0          0         
  Wildcard TDM800P Board 2                 OK         0          0          0    

5.b) Verify your configured channels

  asterisk*CLI> dahdi show channels
    Chan Extension  Context         Language   MOH Interpret       
  pseudo            default                    default             
       1            from-pstn       de         default             
       2            from-pstn       de         default             
       3            from-pstn       de         default             
       4            from-pstn       de         default             
       5            from-pstn       de         default             
       6            from-pstn       de         default             
       7            from-pstn       de         default             
       8            from-pstn       de         default             
       9            from-pstn       de         default             
      10            from-pstn       de         default             
      11            from-pstn       de         default             
      12            from-pstn       de         default             
  asterisk*CLI> 
 

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.