Having just installed Asterisk/Zaptel on CentOS-4.0, I think there are a few errors in the procedure outlined on this page. I updated Asterisk Zaptel Installation with my notes from that install — Note that CentOS 4.0 uses the Linux 2.6 kernel, so make sure to read the Linux 2.6 specific notes on that page.
Background
CentOS 4.0 uses udev and requires a few added lines to a config file to have zaptel work.
Please be aware that this doc is created without full knowledge of the process. Please correct where applicable.
Asteriskdocs.org was used as a resource.
Procedure
Install CentOS 4.0
Most would agree that installing a GUI would consume too many resources. It is highly recommended that you don’t install X.
You will only need to install these packages
- Editors
- Development tools
After install you will want to run ‘yum update’ as root at the command line. You will have to import the CentOS key first from the local media or by running ‘rpm –import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
- rpm –import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
- yum update
Set link for compiler
As root:
- ln -s /lib/modules/`uname -r`/build /usr/src/linux-2.6
(I don’t know if a link to ‘linux’ is needed)
- ln -s /lib/modules/`uname -r`/build /usr/src/linux
udev
This section can be replaced by a single make command with a switch, “make install-udev”
Add also to the end of /etc/udev/rules.d/50-udev.rules the following lines
- Section for zaptel device
KERNEL=”zapctl”, NAME=”zap/ctl”
KERNEL=”zaptimer”, NAME=”zap/timer”
KERNEL=”zapchannel”, NAME=”zap/channel”
KERNEL=”zappseudo”, NAME=”zap/pseudo”
KERNEL=”zap[0-9]*”, NAME=”zap/%n”
Install Hardware
We will be using TDM400P, but the installation is the same. Make sure to plug in the four-pin 12-volt power connecter to the card (I forgot to do that).
Download software
We will be downloading the HEAD from CVS.
- cd /usr/src
- export CVSROOT=:pserver:[email protected]:/usr/cvsroot
- cvs login
Password is anoncvs
- cvs checkout zaptel asterisk
The current RHEL4-Update3 (CentOS) kernel has a minor typo in the source that prevents the Zaptel driver from compiling. This is a recognized bug by Red Hat and is slated to be fixed in the next major update ࢀ“ RHEL 4 Update 4.
A simple tweak to Zaptel’s Makefile will dodge this typo. When RHEL 4 U4 is released, recompiling with the fixed kernel will NOT require undoing this patch.
Add the following line to the blank line on line 38 of Zaptel’s Makefile (line number reference is for Zaptel 1.2.5):
- CFLAGS+=$(shell if uname -r | grep -q 2.6.9-34.EL; then echo “-Drw_lock_t=\”rwlock_t\””; fi)
Thanks to Russ Price for providing this fix.
References:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=180568
- cd zaptel
- make clean; make; make install
If you want zaptel drivers to be loaded at boot, run ‘make config’:
- make config
- cd ../asterisk
- make clean; make; make install
If you want asterisk to be loaded at boot, run ‘make config’:
- make config
You make also use sample files by running ‘make samples’:
- make samples