Cheap VPS & Xen Server

Residential Proxy Network - Hourly & Monthly Packages

Debian “Etch” + Asterisk + Zaptel + Libpri + mISDN + Asterisk Addons + Asterisk-GUI

This Howto explains how to install Asterisk on a fresh Debian “Etch” system.

After downloading a netinstall image of Debian 4.0r1 and configuring localization, language, partitions and so on, in the final steps, Debian should now be asking you what packages you want to install.

Choose base system only.

After you’ve finished the installation and rebooted, log in with root and run:

aptitude update
aptitude upgrade


aptitude install ssh ntp screen

From here, the next steps were done from an ssh session with the putty client.


Compiling New Custom Kernel *** Optional ***

aptitude install kernel-package libncurses5-dev fakeroot wget bzip2 build-essential

cd /usr/src
tar xjf linux-2.6.*
ln -s /usr/src/linux- /usr/src/linux
cd /usr/src/linux

Copy the current kernel configuration to /usr/src/linux:

make clean && make mrproper
cp /boot/config-`uname -r` ./.config
make menuconfig

In the configuration menu, we select “Load alternate configuration…” and choose the config file that we have copied in the /usr/src/linux directory. /usr/src/linux/.config

We are going to modify some parameters in the kernel configuration:

In the subsection “Processor type and features” we check:

“Enable IRQ balancing” is disabled
“Timer frequency” change the value 250 Hz by 1000 Hz.
“High Resolution Timer Option” and “HPET Timer Support” as built-in.
For users with NVidia SATA drives unchek “Paravirtualization Support”.

Under “Device Drivers” —> Character Devices —> Enchanced Real Time Clock Support. You’ll see that it is built as a module.

And under “Library Routines” subsection, “CONFIG_CRC_CCITT” must be enabled.


When we have made this changes we save the configuration and exit.

Building the new .deb kernel and headers packages :

make-kpkg clean
fakeroot make-kpkg –initrd –append-to-version=-custom kernel_image kernel_headers

After the compilation there will be two .deb packages under directory /usr/src/.

Install the new packages.

cd /usr/src
dpkg -i linux-image-
dpkg -i linux-headers-


Test if new kernel is running.

uname -a

The output must be something similar to “Linux asterisk“.

*** Finish *** Optional *** Compiling Custom Kernel

Go for dependencies…

aptitude install build-essential libcurl3-dev libvorbis-dev libspeex-dev unixodbc unixodbc-dev libiksemel-dev flex xsltproc
aptitude install linux-headers-`uname -r` g++ libncurses5-dev libnewt-dev libusb-dev subversion git-core git-svn

Downloading and untarring…

cd /usr/src
tar xvzf asterisk-1.4-current.tar.gz && tar xvzf zaptel-1.4-current.tar.gz && tar xvzf libpri-1.4-current.tar.gz && tar xvzf mISDN.tar.gz && tar xvzf mISDNuser.tar.gz && tar xvzf asterisk-addons-1.4-current.tar.gz


Installing Zaptel

cd /usr/src/zaptel-1.4*
./install_prereq test
./install_prereq install
make install
make config
modprobe ztdummy


Installing Libpri

cd /usr/src/libpri-1.4*
make && make install


Installing mISDN

Note: Don’t compile the current version (1.1.7) with the last kernel ( The ( was tested and works.

cd /usr/src
git-clone git://
git-clone git://
cd /usr/src/mISDN
make install
cd /usr/src/mISDNuser/
make && make install


mISDN scan
mISDN config

This creates the file /etc/mISDN.conf which you should review and/or edit.

vi /etc/mISDN.conf

If everything looks good, we’re going to start mISDN.

mISDN start

Check that everything is right,


Create the system startup links for mISDN:

/usr/sbin/update-rc.d mISDN defaults 15 30

Installing Asterisk

cd /usr/src/asterisk-1.4*

The next step is not mandatory. To install core and extra sounds in different languages:

make menuselect

Select the core-sounds you would like to play and extra sounds. Exit with “x” to save.

make install
make samples
make config
asterisk -vvvc
stop now
echo “ztdummy” >> /etc/modules

Note: If you make a mistake and/or the compilation fails, you need to run:

make clean




make install


Reboot and test if the system startup is correct.


asterisk -r


Install Asterisk-Addons

cd /usr/src/asterisk-addons*
./configure && make && make install
make samples

Install Asterisk-GUI

If you already have asterisk config files (no new install), back them up…

cp -r /etc/asterisk /etc/asterisk.bak

Download and install Asterisk-GUI:

cd /usr/src
svn checkout asterisk-gui
cd /usr/src/asterisk-gui
./configure && make && make install
make samples

Some tweaks to the configuration files…

cat << EOF >/etc/asterisk/http.conf

cat << EOF >/etc/asterisk/manager.conf
displaysystemname = yes
enabled = yes
webenabled = yes
port = 5038
;httptimeout = 60
bindaddr =

secret = admin
read = system,call,log,verbose,command,agent,config
write = system,call,log,verbose,command,agent,config

Checking configuration…

make checkconfig
asterisk -r

Try, configure and enjoy your new system… log in with admin/admin to configure your setup…