How to Install Asterisk 1.2 in CentOS 4 and CentOS 5

Minimum Requirements

To install Asterisk server in your computer, please consider the minimum hardware and software requirements. These are the minimum requirements.

Operating system:

  • Linux and BSD (All Linux, BSD and also MAC are supported)
  • CPU = Pentium 500MHz or greater
  • RAM = 128 MB or greater
  • HD = 10 GB
  • NIC = Ethernet 10Base-T or greater

Getting Started

If you install Asterisk please be advised that all existing data on the computer’s hard drive will be erased. First install the CentOS 4 or CentOS 5 Linux in your server and configure the internet connection, no need for other programs or bunch of software updates to be installed, you need to update only the following packages.

  • gcc
  • kernel
  • kernel-devel
  • bison
  • openssl-devel
  • libtermcap-devel and ncurses-devel for CentOS 5
Kernel-smp-devel (instead of kernel-devel) is necessary if you are using a dual core processor.

Run this command in the console:
For CentOS 4:

yum install gcc kernel kernel-devel bison openssl-devel

For CentOS 5:

yum install gcc kernel kernel-devel bison openssl-devel libtermcap-devel ncurses-devel

After installating the updates, you need to reboot to boot to your new kernel, just type the command below.


Then download the asterisk- and zaptel-1.2.23.tar.gz packages from and untar all the files directly to /usr/src directory.

tar -zxvf zaptel-1.2.23.tar.gz -C /usr/src/
tar -zxvf asterisk- -C /usr/src/

Installing Zaptel

cd /usr/src/zaptel-1.2.23
make clean
make install

Installing Asterisk 1.2

cd /usr/src/asterisk-

If you want to use Music On Hold for your PBX, run this command:

make mpg123

Then continue installing using the following commands.

make clean
make install
make samples

Running Asterisk server for the first time

To start asterisk run the command:

asterisk –g

To run the asterisk console command:

asterisk -ncrvvvvvvv

Installing Open Source G729 codec

You can download the open source g729 codec based on the type of your processor here:

cd /usr/lib/asterisk/modules/
chmod 755

Loading ztdummy driver

Configure ztdummy and asterisk to start automatically
To load the ztdummy driver run this following commands:

modprobe zaptel
modprobe ztdummy

Run vi /etc/rc.local and add the following lines to automatically start ztdummy driver and asterisk.

modprobe zaptel                                                                                                                                           
modprobe ztdummy        
asterisk –g

Then hit Esc key and type



Reboot your system and that’s it!!! You have now a working asterisk PBX system…
Thanks to Mark Quitoriano for a very good howto and tutorial.