Iscriviti   Guestbook   Immagini   Forum   Download   Mappa   1420 utenti on line 
Italiano
MENU
CONFIGURAZIONI
RISORSE
INFO
Login

DOWNLOAD
Device
Suggerimenti

 

Zaptel Installation

You have bought yourself a brand new interface card so that you can connect telephone lines and/or telephone handsets to your computer. It might be a Digium WildCard TDM400P (cache), for example. You have physically installed the card into your computer. Now what?

Before you can use your new interface card, you need device drivers. In Linux, device drivers come in the form of kernel modules. You will need to download the source code for the kernel modules, compile and install the modules. That is what this page is all about. 

Zaptel requires a Linux 2.4.x kernel. Support for 2.6.x is not complete. Support for older kernels won't happen.

Operating System Specific Notes

There may be extra notes about compiling zaptel that are specific to your operating system. Please check:
  • Asterisk Operating Systems

Support for Kernel 2.6

  • Mar 2004: Do "make linux26" in zaptel source directory instead of a simple "make".
  • Jan 2004: it appears that both ztdummy and zaprtc cannot be loaded on (2.6 kernels)?
  • Jan 2004: Mark has taken a stab at fixing zaptel to be compatible with the 2.6 kernel. Why don't you test it to see if it works? Then you can report your results back to the community.

Kernel Source

You are going to install a kernel module. In order to compile the zaptel package on your system, you need to have the kernel source version matching the kernel version that is already running on your system, and you may also need to ensure that the version of gcc used to compile the kernel is the same version as what you have installed. If you did not actually compile your kernel yourself, follow the steps in this section.

Check which kernel version you have installed. You can do that with the command
   cat /proc/version
You will get output like this:

Linux version 2.4.28 (root@localhost) (gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)) #1 Tue Jan 28 11:01:02 CST 2003

This shows you that you need to have the kernel source of 2.4.28 version in /usr/src. It also shows that gcc version 3.2 was used to compile the kernel.

Once you have downloaded and unpacked the kernel source code, executing the command:
   ls -ld /usr/src/linux*
should give you something like:
   lrwxrwxrwx  1 root root   12 Feb 10 2003 /usr/src/linux -> linux-2.4.28
   drwxr-xr-x 17 root root 4096 Jan 27 2003 /usr/src/linux-2.4.18

Make sure that you have the config file for the kernel you're running. It is usually in the /boot directory and named with the version number of your kernel:
   ls /boot/config*
   /boot/config-2.4.28

Copy this file to the location /usr/src/.config, like this:
   cp /boot/config-2.4.28 /usr/src/.config

Now make sure your config file is fully conformant with your kernel source. Do this:
   cd /usr/src/linux
   make menuconfig
When the menuconfig program starts up, it reads the .config file automatically. Simply tell the menuconfig program to quit, and have it save the .config file when you are asked.

Now you need to execute
   make dep
which may take a while.

Following this procedure creates the modversions.h kernel header file that you will need to compile zaptel.

Download

You need to use cvs to download the source code for the zaptel package. The following commands assume you are using a bash-style shell:

   cd /usr/src
   export CVSROOT=:pserver:anoncvs@cvs.digium.com:/usr/cvsroot
   cvs login           - the password is anoncvs.
   cvs zaptel     

Compile

First check /usr/src/zaptel/zconfig.h for any specific configuration changes that might be appropriate. Then:
   make clean
   make
   make install

If you get problems with 'depmod -a' announcing unresolved symbols, then
  • try running 'depmod -ae' to see the names of the symbols it can't resolve. Maybe the names can give a hint where to look next.
  • make sure you're using the latest versions of the various development tools (gcc etc)
  • make sure you've got the kernel source, kernel headers, and kernel image all at a matching version.

Install

If the kernel module compiled, try
   modprobe zaptel
which should quietly load the zaptel kernel module and not output any error messages.

Now check which additional module(s) you need to load for your specific interface card(s):
  • Wildcard T400P, Wildcard E400P: tor2
  • Wildcard TE405P, Wildcard TE410P: wct4xxp
  • Wildcard T100P, Wildcard E100P: wct1xxp
  • Wildcard X100P, Wildcard X101P: wcfxo
  • Wildcard TDM400P: wcfxs
  • Wildcard S100U: wcusb or wcfxsusb
  • Old Tormenta1 ISA Card: torisa
  • UHCI USB Zaptel Timing Only Interface: ztdummy

Try loading the kernel module that is required by your interface card. If, for example, you have a Wildcard TDM400P, then you need the wcfxs module, so try this:
   modprobe wcfxs
As before, if all is well, modprobe will quietly load the kernel module and output no errors.

Check your /var/log/messages file; you should find that the module has reported finding your interface card. For example:

 May 26 21:54:29 hubris kernel: Zapata Telephony Interface Registered on major 196
 May 26 21:54:32 hubris kernel: Freshmaker version: 63
 May 26 21:54:32 hubris kernel: Freshmaker passed register test
 May 26 21:54:32 hubris kernel: Module 0: Installed — AUTO FXO
 May 26 21:54:32 hubris kernel: Module 1: Installed — AUTO FXO
 May 26 21:54:32 hubris kernel: Module 2: Installed — AUTO FXS
 May 26 21:54:32 hubris kernel: Module 3: Installed — AUTO FXS
 May 26 21:54:32 hubris kernel: Found a Wildcard TDM: Wildcard TDM400P REV E/F (4 modules)

You will need the kernel modules to load when your Asterisk computer boots. You can try the commands:
   cd /usr/src/zaptel
   make config
These will install the files /etc/rc.d/init.d/zaptel and /etc/sysconfig/zaptel. However, different distributions use different startup methods. Examine and edit the files (the originals are in /usr/src/zaptel/zatptel.init and /usr/src/zaptel/zaptel.sysconfig) appropriate for your system.

When you did the 'make install' earlier, this created a configuration file /etc/zaptel.conf. So now you should proceed to:
  • Configure zaptel.conf


 

Valid CSS!