Asterisk CentOS-4.0 Zaptel

For packages see ATrpms


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' (see http://www.centos.org/modules/smartfaq/faq.php?faqid=30

  1. rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
  1. yum update

Set link for compiler


As root:
  1. ln -s /lib/modules/`uname -r`/build /usr/src/linux-2.6
(I don't know if a link to 'linux' is needed)
  1. 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
  1. 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.

  1. cd /usr/src
  2. export CVSROOT=:pserver:anoncvs@cvs.digium.com:/usr/cvsroot
  3. cvs login
Password is anoncvs
  1. cvs checkout zaptel asterisk

Compile Zaptel

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):
  1. 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:
http://forums.digium.com/viewtopic.php?p=17781
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=180568

  1. cd zaptel
  2. make clean; make; make install
If you want zaptel drivers to be loaded at boot, run 'make config':
  1. make config

Compile Asterisk

  1. cd ../asterisk
  2. make clean; make; make install
If you want asterisk to be loaded at boot, run 'make config':
  1. make config
You make also use sample files by running 'make samples':
  1. make samples
For packages see ATrpms


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' (see http://www.centos.org/modules/smartfaq/faq.php?faqid=30

  1. rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
  1. yum update

Set link for compiler


As root:
  1. ln -s /lib/modules/`uname -r`/build /usr/src/linux-2.6
(I don't know if a link to 'linux' is needed)
  1. 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
  1. 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.

  1. cd /usr/src
  2. export CVSROOT=:pserver:anoncvs@cvs.digium.com:/usr/cvsroot
  3. cvs login
Password is anoncvs
  1. cvs checkout zaptel asterisk

Compile Zaptel

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):
  1. 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:
http://forums.digium.com/viewtopic.php?p=17781
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=180568

  1. cd zaptel
  2. make clean; make; make install
If you want zaptel drivers to be loaded at boot, run 'make config':
  1. make config

Compile Asterisk

  1. cd ../asterisk
  2. make clean; make; make install
If you want asterisk to be loaded at boot, run 'make config':
  1. make config
You make also use sample files by running 'make samples':
  1. make samples
Created by: tuxinator_linux, Last modification: Fri 23 of Jun, 2006 (03:26 UTC) by Unknown
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+