Asterisk installation for CentOS 4.x

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
http://bugs.digium.com/view.php?id=6425


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


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
http://bugs.digium.com/view.php?id=6425


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


Created by: markq, Last modification: Fri 23 of Sep, 2011 (08:33 UTC) by getvoice
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+