login | register
Tue 02 of Dec, 2008 [03:53 UTC]

voip-info.org

Asterisk CentOS-4.0 Zaptel

Created by: tuxinator_linux,Last modification on Fri 23 of Jun, 2006 [03:26 UTC] by matsk
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
# export CVSROOT=:pserver:anoncvs@cvs.digium.com:/usr/cvsroot
# 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
# 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
# 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

Comments

Comments Filter
222

333Re: Kernel Panic

by bennyzhou, Friday 15 of September, 2006 [07:01:25 UTC]
Yes. Same here. Tried newer kernel and zaptel 1.2.9.1. Still the same problem.

I also tried to upgrade udev. But system failed to start.
222

333Kernel Panic

by smarthouseguy, Friday 01 of September, 2006 [23:46:17 UTC]
Has anyone found a work around for the kernel panic caused by zaptel during reboot???

using CentOS 4.4 kernel 2.6.9-42.0.2.EL
222

333CentOS 4.3 need newt-devel for zttool

by cvaldess, Wednesday 02 of August, 2006 [18:16:18 UTC]

yum -y install newt-devel

I use zaptel 1.2.7
222

333CentOS 4.2 not work

by cristian, Monday 28 of November, 2005 [17:56:24 UTC]
I try in CentOS 4.2 and always result:
You do not appear to have the sources for the 2.6.9-22.ELsmp kernel installed.
make: *** linux26 Error 1

I use zaptel 1.2
222

333Re: Works OK, but only untill first restart

by joashherbrink, Monday 20 of June, 2005 [08:47:46 UTC]
Marcin,

did you get youre te110P to work?

i am messing around with it for a few days now, got it to work, but after a reboot, nothing anymore (:confused:)

any help would be appreciated.

joash
222

333/etc/init.d/zaptel uses insmod, not modprobe

by ewb000, Thursday 24 of March, 2005 [18:36:19 UTC]
I solved my ZT_SPANCONFIG failed: No such device or address (6) problem when I discovered that /etc/init.d/zaptel (installed by make config) uses insmod, not modprobe to load the driver(s). Worse, it sends the output from insmod to /dev/null so you can't see that insmod can't find the driver file. The problem is simply that the driver(s) don't get loaded at all. I replaced insmod by modprobe in this script.
222

333Works OK, but only untill first restart

by mwalter, Monday 07 of March, 2005 [15:10:38 UTC]
Hi,
I've checked your procedure with TE110P. Compilation OK, modprobe OK, asterisk started OK first time. But after restart .. sorry, doesn't work anymore (:evil:) In system log I have:

Mar 7 15:16:50 centos kernel: Zapata Telephony Interface Registered on major 196
Mar 7 15:16:50 centos kernel: Registered Tormenta2 PCI
Mar 7 15:16:50 centos kernel: kobject_register failed for t1xxp (-17)
Mar 7 15:16:50 centos kernel: kobject_register+0x31/0x39
Mar 7 15:16:50 centos kernel: bus_add_driver+0x36/0x97
Mar 7 15:16:50 centos kernel: driver_register+0x51/0x58
Mar 7 15:16:50 centos kernel: pci_register_driver+0x85/0xa1
Mar 7 15:16:50 centos kernel: t1xxp_init+0xa/0x21 wcte11xp
Mar 7 15:16:50 centos kernel: sys_init_module+0x1f1/0x2d9
Mar 7 15:16:50 centos kernel: syscall_call+0x7/0xb
Mar 7 15:16:51 centos kernel: usbcore: registered new driver wcusb
Mar 7 15:16:51 centos kernel: Wildcard USB FXS Interface driver registered

When I try zaptel service reload, ztcfg or modprobe wcte11xp, I have:

root@centos ~# service zaptel reload
Reloading ztcfg: ZT_SPANCONFIG failed on span 1: No such device or address (6) FAILED

root@centos ~# ztcfg
ZT_SPANCONFIG failed on span 1: No such device or address (6)

root@centos ~# modprobe wcte11xp
FATAL: Error inserting wcte11xp (/lib/modules/2.6.9-5.0.3.EL/misc/wcte11xp.ko): No such device


I had exactly the same problem on Fedora Core 3 after udev update, and I didn't manage to find reasonable sollution. Any help will be gladly accepted (:mrgreen:)

Best Regards

Marcin