Upgrade from Zaptel to DAHDI
Zaptel has been discontinued and has been replaced by DAHDI (the Digium Asterisk Hardware Device Interface). See the following announcements:
Please use the following directions to upgrade to any version of DAHDI from Zaptel.
Dependencies
This guide assumes that all necessary packages required for building from source are installed.
All commands need to be run with root privileges.
To use DAHDI, you must use Asterisk 1.4.22 or later, or Asterisk 1.6.0 or later:
An example for RedHat based systems (Fedora Core, CentOS) would be:
yum install gcc gcc-c++ make kernel-devel newt-devel subversion
An example for Debian based systems (Debian, Ubuntu) would be:
apt-get update
apt-get install gcc g++ make linux-headers-$(uname -r) libnewt-dev subversion
Upgrade Zaptel first
Please note that when upgrading from Zaptel, you need to upgrade to Zaptel-1.4.12.1 before upgrading to DAHDI. This will help remove any old versions of modules from your system before upgrading.
cd /usr/src/
wget http://downloads.asterisk.org/pub/telephony/zaptel/zaptel-1.4.12.1.tar.gz
tar -zxvf zaptel-1.4.12.1.tar.gz
cd zaptel-1.4.12.1
./configure
make
make install
make config
Now, to continue upgrading to your chosen version of DAHDI (the latest current release is recommended), simply follow the directions in the Quick Start guide steps 1-6 only; DO NOT execute the command in step 7 ("make samples").
You need to upgrade to Asterisk 1.4.22 or later in order to use DAHDI. Asterisk will have to be recompiled to switch from Zaptel to DAHDI.
http://docs.digium.com/misc/ADL_quickstart.pdf
Once DAHDI is installed, it would be a good idea to make sure that some of the Zaptel userspace tools aren't still present on the system. Most Zaptel userspace tools are installed to /sbin/, while the DAHDI userspace tools are installed to /usr/sbin/. To make sure that all the Zaptel userspace tools are removed you can run the following command:
cd /sbin/ && rm zttool zttest ztspeed ztscan ztmonitor ztdiag ztcfg fxotune
Now when upgrading from Zaptel, you need to modify your configuration files to enable your hardware in DAHDI. Most notably:
/etc/zaptel.conf is now /etc/dahdi/system.conf
The only real change here is new option 'echocanceller'. This option allows you to configure software echocancellation on a channel by channel basis. If the echocanceller line is not specified here, then software echocancellation cannot function.
To configure the default echo cancellers, use the format: echocanceller=<echocanceller name>,<channel(s)>
So to use MG2 on the first eight channels: echocanceller=mg2,1-8
/etc/sysconfig/zaptel or /etc/default/zaptel are now replaced by /etc/dahdi/init.conf
/etc/asterisk/zapata.conf is now /etc/asterisk/chan_dahdi.conf
If necessary, you should be able to simply rename an existing zapata.conf file to chan_dahdi.conf and get the system up and running again with DAHDI.
All zaptel userspace tools have also been replaced with a DAHDI counterpart. All DAHDI tools are prefixed with 'dahdi_' now (with the exception of the HPEC tool). For example:
zttool is now dahdi_tool
ztcfg is now dahdi_cfg
ztmonitor is now dahdi_monitor
genzaptelconf is now dahdi_genconf
zaphpec_enable is now dahdihpec_enable
If you would like to not modify your Dial-plan while still running Asterisk 1.4, then you can set 'dahdichanname=no' in the '[options]' section of your 'etc/asterisk/asterisk.conf' file. This will tell Asterisk to continue looking in zapata.conf for Asterisk channel configuration and to continue referring to hardware channels as 'Zap' channels. You will still need to configure '/etc/dahdi/system.conf' however.
It is recommended to use 'dahdi_genconf' to configure your hardware once dahdi has been installed and loaded. This will automatically configure the system.conf file and will write a file '/etc/asterisk/dahdi-channels.conf' which can be used to configure Asterisk for the channels or as a starting point for modifying configuration to suit your situation. In the simplest use case, add the following line to /etc/asterisk/chan_dahdi.conf or /etc/asterisk/zapata.conf:
#include dahdi-channels.conf
After the configuration files are checked then you can simply restart your machine to pick up the changes, or stop asterisk, stop the Zaptel driver, start the DAHDI driver and then start Asterisk.