The Zaptel people (www.zaptel.com
) got kind of annoyed with the fact that they were getting bombarded with searches for the zaptel driver system for Asterisk (not to mention they own the trademark on zaptel). So, they kindly requested that Digium change their package. See: Digium's blog entry for more on why.
Digium did, and the result is the new Digium Asterisk Hardware Device Interface.
This raises several questions for people trying to make the switch. The documentation for DAHDI is a little esoteric. There is not a document out there that takes you through the process of upgrading to the new version in a down-and-dirty, "I need to get this done, now" kind of manner.
So I have created one: The top 5 quandaries and their answers on moving from Zaptel to DAHDI.
1. Where do I get the new packages?
Hopefully, you have read my other article entitle How to Install Asterisk on Ubuntu 9.04 / 9.10 from Scratch
. There are several things in it that you will have had to have done in order to get DAHDI to work. For the sake of completeness, and to keep you from having to open multiple tabs in your browser, here are the bare-bones requirements for DAHDI:
#Setup the system
apt-get install subversion
apt-get install make
apt-get install linux-source kernel-package
apt-get install linux-kernel-headers
apt-get install linux-headers
apt-get install linux-headers-2.6.28-11-server #<-- or whatever matches your version.
#Install other needed stuff
aptitude install libconfig-tiny-perl libcupsimage2 libcups2 libmime-lite-perl
libemail-date-format-perl libfile-sync-perl libfreetype6 libspandsp1
libtiff-tools libtiff4 libjpeg62 libmime-types-perl libpaper-utils psutils
libpaper1 ncurses ncurses-dev libncurses-dev libncurses-gst ncurses-term libnewt
libnewt-dev libnewt-pic libxml2 libxml2-dev libspandsp-dev libspandsp1
# Get DAHDI Kernel
svn co http://svn.digium.com/svn/dahdi/linux/trunk dahdi-kernel
# Get DAHDI Tools
svn co http://svn.digium.com/svn/dahdi/tools/trunk dahdi-tools
Then it's easy, just change to the /usr/src/dahdi-kernel directory, and run make, make install. After that, you'll need to change to the /usr/src/dahdi-tools directory, and run make, make install again to install the tools.
2. What happened to zaptel.conf and zapata.conf?
They have been replaced. They have been reincarnated into easy-to-use versions of themselves.
zaptel.conf was used to tell the system and the drivers what to do. zapata.conf was used to tell Asterisk how to talk to the driver. They have both been combined into a single file: /etc/dahdi/system.conf.
Syntactically, configuration of this file is roughly the same as the zaptel.conf and zapata.conf files. Defining spans, channels and the like are nearly identical.
The upside of the new DAHDI system is that there is not a lot of hand coding required to configure DAHDI, which is a drastic improvement over the old zaptel system. dahdi-tools can be used to configure just about everything.
3. Where did the zaptel tools go?
Zaptel tools have been upgraded as well. Here are the new equivalents to the old tools:
ztcfg -> dahdi_cfg
ztmonitor -> dahdi_monitor
ztscan -> dahdi_scan
ztspeed -> dahdi_speed
zttest -> dahdi_test
zttool -> dahdi_tool
zapconf -> dahdi_genconf (deprecates genzaptelconf)
4. Great. So how do I configure this blasted thing?
In three easy steps:
1. Use dahdi_genconf to generate /etc/dahdi/system.conf, and then add / remove anything that is incorrect. This does a pretty good job of detecting your hardware, but always re-confirm before proceeding to avoid headaches.
2. Use dahdi_cfg -v to read the system.conf file, and configure the kernel.
3. Restart dadhi to unload and reload all the modules and drivers (/etc/init.d/dahdi restart).
4. Restart Asterisk
5. How do I tell if it is running?
In the Asterisk CLI, type dahdi show status. You should get some output like this:
voip*CLI> dahdi show status
Description Alarms IRQ bpviol CRC4 Fra Codi O
Wildcard TDM400P REV I Board 5 OK 0 0 0 CAS Unk Y
You can also run dahdi show channels to see the available channels:
voip*CLI> dahdi show channels
Chan Extension Context Language MOH Interpret Blocked State
pseudo default default In Service
6. Bonus Round
I have an error with my MeetMe Application
Frequently, the movement to DAHDI from Zaptel breaks the Meetme Application. You might get a warning like:
WARNING: app_meetme.c:463 build_conf: Unable to open pseudo device
The Meetme application, as of Asterisk v1.6.x still uses DAHDI not only for timing, but for the entire mixing application and process. See Russel Bryant's Blog Post on Why
. So, in order to get your conferencing to work, you have to install DAHDI and get the pseudo (dummy) channel / device working. Follow the steps above, and you should have no problem getting it to work: even if you don't have telephony hardware installed!
Sources and more Reading:
Russel Bryant's Blog
DAHDI Up-to-date Readme
voip-info.org's DAHDI page