Alf bio photo


Miren! una tormenta de cucharitas



Here you have the first part of my experience on installing Asterisk PBX with an Intel X100P clone FXO to allow my extensions to make (and receive) phone calls to the telco line.


Though Digium (the Asterisk developer) recommends a Pentium 3 based PC as the minimum requirements to run a home PBX, I did it using a really old AMD K6-2 500 with 128Mb DIMM and a 4200rpm 3.5Gb hard disk, and it seems to do the job just fine considering the ultra-low traffic I’m having (only 4 extensions and they’re not using it all the time). If you’re planning to use it as a full PBX with dozens of extensions, be more generous on hardware.

If you’re just starting on Asterisk and you’re wondering about if your old modem would work to connect your PBX to the telco, let me explain you some basic things before move on.

To connect your PBX to the telco line you’ll need an FXO card. As Asterisk is a free and open-source project, one of Digium’s ways to get funds is selling propietary cards to do this job, but when the project started they were using some standard 56K modem/fax and they are still supported, but not every modem will work.

As stated here, to use a modem as a FXO you’ll need one of these chipsets:

  • Intel 537PG and 537PU
  • Ambient MD3200
  • Motorola 62802

I’m using one with the Ambient MD3200 chipset, and works pretty good. These modems will provide you with a single port to connect it to a single line, but if you need more lines you could add more cheap modems, or just buy a real FXO multiline analog card or even an E1/T1 card which supports digital telephony channels, but these boards are out of the scope of this tutorial.

Choosing the right installation

You have two options to install Asterisk on your hardware: install everything separately by hand, or just download AsteriskNOW. AsteriskNOW is a Linux distribution which installs by default an Asterisk PBX along with its GUI. I’ve installed Asterisk by hand, as AsteriskNOW refused to install on my K6-2 because my “CPU too old for this kernel”.

I’ve tried this installation procedure on both Debian 4 rc3 and Ubuntu 8.04 desktop, and worked the same on both.

First of all, install the Linux of your choice. If you got old hardware as I do, then I’ll recommend you Debian 4 NetInstall, because it will install just the software you want and will not fill your system memory with unused daemons. If your hardware is new (say an Intel Core2Duo or such) then go for Ubuntu, as it got more hardware support than Debian.

Once you’ve your server up and running, open a console and do lspci (if you don’t have it installed, do aptitude install pciutils as root), and you will see something like:

00:0a.0 Communication controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface

If everything is OK, then move on to the next step.

Installing Asterisk

This guide was taken from Chad’s Blog, and is a great step-by-step guide to install Asterisk from source. If you do copy+paste of the following code lines inside a terminal window you’ll have almost a zero-effort installation.

First of all, you need to be root. Do sudo su, insert your password, and then install the compiler packages:

apt-get install linux-headers-$(uname -r) build-essential automake autoconf bison flex libtool libncurses5-dev libssl-dev subversion

Now it’s time to download Asterisk, Zaptel (X100P driver) and Asterisk’s libraries LibPri:

tar xfvz zaptel-1.4.12.tar.gz -C /usr/src/
tar xfvz asterisk- -C /usr/src/
tar xfvz libpri-1.4.7.tar.gz -C /usr/src/

Start the compilation scripts of the three packages:

cd /usr/src/zaptel-1.4.12
make install
make config
cd ../libpri-1.4.7
make install
cd ../asterisk-
make install
make samples

And finally it’s time to install Asterisk GUI. This GUI will make your Asterisk configuration a piece of cake, and you’ll need it to follow the part 2 of this tutorial:

cd /usr/src/
svn co asterisk-gui
cd asterisk-gui
make install

Basic configuration

Once you have everything compiled and installed, you can do make checkconfig at the prompt. You’ll see some warnings, because you need to make a couple changes in the configuration files to start Asterisk.

Always as root, go to /etc/asterisk and make sure these lines exists and are uncommented:

In http.conf:

enabled = yes
enablestatic = yes
bindaddr =

In manager.conf:

enabled = yes
webenabled = yes
bindaddr =

Also in manager.conf you should create an admin account to access the GUI:

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

Finally, add the following to your /etc/rc.local file to load Zaptel driver and Asterisk at startup:

modprobe zaptel
modprobe ztdummy
asterisk –g

Now it’s time to run Asterisk for the first time. Reboot your server to make sure everything is loaded and working. If there were no FXO port detected, do:

ztscan > /etc/asterisk/ztscan.conf

And reboot again.