Upgrade 3CX to v18 and get it hosted free!

Asterisk installation for CentOS 4.x

Author image

THIS IS A VERY OLD AND OUTDATED GUIDE AND ASSUMES THE INSTALLATION OF ASTERISK VERSION 1.2

Base Install of Asterisk on a CentOS/RHEL box:

Before you begin, you’ll probably want to bring all your packages up to date. To do so, run ‘yum -y update’. If any kernel files were updated as part of this process, you will need to reboot the machine (shutdown -r now). Repeat the process until no more updates are available.

Download the pre-requisite of asterisk:

gcc
kernel-devel
bison
openssl-devel
doxygen #para makagawa ka ng program documentations/manual pages para sa asterisk

Note: Kernel-smp-devel (instead of kernel-devel) is necessary if you are using a dual core processor.

either through apt-get:

apt-get update
apt-get install gcc kernel-devel bison openssl-devel

or yum:

yum -y update
yum install gcc kernel-devel bison openssl-devel

then download the latest asterisk version at asterisk.org to /usr/src:

cd /usr/src

wget http://ftp.digium.com/pub/zaptel/releases/zaptel-<version>.tar.gz
wget http://ftp.digium.com/pub/asterisk/releases/asterisk-<version>.tar.gz

#if you are going to use PRI cards(eg. TE110P, TE406P) you need to down this:

wget http://ftp.digium.com/pub/libpri/releases/libpri-<version>.tar.gz

then untar all the files

tar -zxf zaptel-<version>.tar.gz
tar -zxf asterisk-<version>.tar.gz
tar -zxf libpri-<version>.tar.gz

### INSTALLING ZAPTEL ###

cd /usr/src/zaptel

make clean
make
make install

#If you want “service zaptel restart” command to work do this
make config

### INSTALL LIBPRI ###
# If you are using E1 cards you need to install LIBPRI

cd /usr/src/libpri

make clean
make
make install

### INSTALLING ASTERISK ###

cd /usr/src/asterisk

make mpg123 # kung gusto mong gumamit ng MoH
make clean
make
make install

#If you want sample files to be created in /etc/asterisk
make samples

#If you want program docs/manual pages for asterisk
make progdocs

#If you want “service asterisk restart” command to work do this
make config

  • note:

if you are using kernel 2.6.9-34.EL you need to edit spinlock.h or your zaptel will not compile.

vi /usr/src/kernels/2.6.9-34.EL-x86_64/include/linux/spinlock.h

then search for this line:
#define DEFINE_RWLOCK(x) rw_lock_t x = RW_LOCK_UNLOCKED

change it to:
#define DEFINE_RWLOCK(x) rwlock_t x = RW_LOCK_UNLOCKED

see the url for more info

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=180568
https://issues.asterisk.org/jira/browse/ZAP-92

now you’re finish installing asterisk.

See also

See Also

Update

example for the following versions: asterisk 1.8.6 with dahdi

tar -zxvf libpri-1.4.12.tar.gz
tar -zxvf dahdi-linux-complete-2.5.0.1+2.5.0.1.tar.gz
tar -zxvf asterisk-1.8.6.0.tar.gz

cd libpri-1.4.12
make -j3
make install
cd ..
cd dahdi-linux-complete-2.5.0.1+2.5.0.1
make -j3 all
make install
make config
cd ..
cd asterisk-1.8.6.0

./configure
make menuselect
make -j3
make install
make samples
make config
cd ..

(FILENAME: /etc/dahdi/system.conf)
span=1,1,0,ccs,hbd3,crc4
bchan=1-15,17-31
dchan=16
fxoks=32
fxsks=35
echocanceller=mg2,1-15,17-31
loadzone = nl
defaultzone=nl

(FILENAME: /etc/asterisk/chan_dahdi.conf)
context=from_outside
switchtype=euroisdn

group=1
context=from_outside
signalling=pri_cpe
transfer=yes
channel =>1-15,17-31

group=1
context=from_outside
signalling=pri_cpe
transfer=yes
channel =>1-15,17-31

group=2
context=users
signalling=fxo_ks
caller=”what ever” <101>
mailbox=”101″
callwaiting=yes
threewaycalling=yes
transfer=yes
channel =>32

group=3
context=from_outside
signalling=fxs_ks
callerid=asreceived
callwaiting=no
channel =>35


Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.