How do I install Zaptel on a machine running Debian?

First, make sure that you have all the needed software dependencies.  The following site should give you a good idea of what software packages you'll need to install.

http://www.voip-info.org/tiki-index.php?page=Asterisk+Linux+Debian

After installing the software dependencies, you need to download the kernel source.  Execute the following commands with create two folder linked to the kernel source.

cd /usr/src
ln -s [kernel-source-dir] linux
ln -s [kernel-source-dir] linux-2.4

OR (DEPENDING ON YOUR KERNEL VERSION)

ln -s [kernel-source-dir] linux-2.6

Make sure that where [kernel-source-dir] is, you use the full directory path for the kernel source.  Next try to compile Zaptel.  If compiling fails, issue the following command, and make sure that where [kernel-source-dir] is, you use the full directory path for your kernel source.

cd /usr/src
ln -s [kernel-source-dir] /lib/modules/`uname -r`/build

If Zaptel still doesn't compile, issue these commands, and then try to compile zaptel after.

apt-get install kernel-package
cd /usr/src
tar -jxvf kernel-source-[version].bz2
cd /usr/src/kernel-source-[version]
cp /boot/config-[kernel-version] .config
make-kpkg clean

(!!NOTE:  For --append-to-version use the output of uname -r
     Example:  uname -r 
               2.4.27-1-386
     The -1-386 is what you would pass to --append-to-version!!)

make-kpkg --config oldconfig --append-to-version [kernel-suffix] configure