Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Asterisk Installation on Centos 6
Prep:

Disable Selinux:

echo "selinux=disabled" > /etc/selinux/config
yum install e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libselinux-devel libsepol-devel libxml2-devel libtiff-devel gmp php-pear php-pear-DB php-gd php-mysql php-pdo kernel-devel ncurses-devel audiofile-devel libogg-devel openssl-devel mysql-devel zlib-devel perl-DateManip sendmail-cf sox

Installing libpri
for ISDN

Installing Dahdi
For Hardware Use

wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
cd /usr/src/asterisk-1.4-CURRENT
useradd -c "Asterisk PBX" -d /var/lib/asterisk asterisk
mkdir /var/run/asterisk
mkdir /var/log/asterisk
chown -R asterisk:asterisk /var/run/asterisk
chown -R asterisk:asterisk /var/log/asterisk
chown -R asterisk:asterisk /var/lib/php/session/
vi +231 /etc/httpd/conf/httpd.conf

Change User apache and Group apache to User asterisk and Group asterisk.
Ctrl-X to save, ‘Y’ to confirm

vi +329 /etc/httpd/conf/httpd.conf

Change AllowOverride None to AllowOverride All
Ctrl-X to save, ‘Y’ to confirm

cd /usr/src/asterisk-1.4-CURRENT
./configure
make
make install
/etc/init.d/mysqld start
cd /usr/src/freepbx-2.8.1

mysqladmin create asterisk
mysqladmin create asteriskcdrdb
mysql asterisk < SQL/newinstall.sql
mysql asteriskcdrdb < SQL/cdr_mysql_table.sql

mysql

## using complex password may cost you dearly :p

GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'SOMEPASSWORD';
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'SOMEPASSWORD';
flush privileges;
q

mysqladmin -u root password 'SOMEPASSWORD'
wget http://downloads.digium.com/pub/asterisk/asterisk-1.4-current.tar.gz
make
make install

Now Asterisk is Installed.

Download Freepbx
wget http://mirror.freepbx.org/freepbx-2.8.1.tar.gz (or download Latest Version)

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

cd /usr/src/freepbx-2.8.1
./start_asterisk start
./install_amp --username=asteriskuser --password=SOMEPASSWORD
echo "/usr/local/sbin/amportal start" >> /etc/rc.local
chkconfig httpd on
chkconfig mysqld on

Open browser to http://ipaddressofpbx/admin
Click red bar in FreePBX

Problem: You donot have kernel source 2.6.32-71.29.1.el6.x86_64.rpm

Solution: You might have got different version even, though you have kernel-devel or kernel-header
Installing kernel-devel will do all requirement.
wget ftp://ftp.ntua.gr/pub/linux/scientificlinux/6.0/x86_64/updates/security/kernel-devel-2.6.32-71.29.1.el6.x86_64.rpm

Problem: One way Audio
Solution: Setting ¬ Advance Setting ¬ SIP nat (Yes)

Firewall:

# SIP on UDP port 5060. Other SIP servers may need TCP port 5060 as well

iptables -A INPUT -p udp -m udp --dport 5060 -j ACCEPT

# IAX2- the IAX protocol

 iptables -A INPUT -p udp -m udp --dport 4569 -j ACCEPT

# IAX - most have switched to IAX v2, or ought to

 iptables -A INPUT -p udp -m udp --dport 5036 -j ACCEPT

# RTP - the media stream
# (related to the port range in /etc/asterisk/rtp.conf)

iptables -A INPUT -p udp -m udp --dport 10000:20000 -j ACCEPT

# MGCP - if you use media gateway control protocol in your configuration

 iptables -A INPUT -p udp -m udp --dport 2727 -j ACCEPT

Problem: You Might face these anoying problem:
[root@voip freepbx]# ./start_asterisk start
STARTING ASTERISK
Asterisk ended with exit status 127
Asterisk died with code 127.
Automatically restarting Asterisk.
Asterisk ended with exit status 127
Asterisk died with code 127.
Automatically restarting Asterisk.

asterisk -vvvvvvvvvvvvvvvvgc

asterisk: error while loading shared libraries: libasteriskssl.so.1: cannot open shared object file: No such file or directory
SOLUTION:
ln -s /usr/lib/libasteriskssl.so.1 /usr/lib64/libasteriskssl.so.1