##Google Analz## ##Microsoft## ##Googel## Swanand: Installing asteirsk1.8 freepbx2.9 Centos5.6 or Centos 6

Wednesday 16 October 2013

Installing asteirsk1.8 freepbx2.9 Centos5.6 or Centos 6

It is assumed that you already have server with centos installed. If you dont no how to install centos 
  follow the below link
  Centos 5.7 DVD download link Click here
  Centos 5.7 step by step installation guide Click Here


Installing Asterisk
• This Installation is done on the centos5.7
• The Basic softwares required to build IPPBX
   a. Centos 5.7
   b. Asterisk 1.8
   c. Dahdi 2.6
   d. libpri


Asterisk1.8 , Dahdi, Libpri from www.asterisk.org
Step 1
Installing Base Os for asterisk
• Installing centos 5.7
• Disable the firewall and selinux
• Update the server

Type yum –y update

  • Installing Asterisk/Freepbx required packages and dependencies

Copy and paste the below to install all the packages and dependicies

yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring nano tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-devel gtk2-devel subversion nano kernel-devel
Downloading the Asterik source codes
Go to asterisk.org/downloads and download the latest

• cd /usr/src
 wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.9.2.tar.gz
 wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.6.0+2.6.0.tar.gz
 wget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.12.tar.gz
Extract all the files
• tar –zxf asterisk-1.8.9.2.tar.gz
• tar-zxvf dahdi-linux-complete-2.6.0+2.6.0.tar.gz
• tar-zxvf libpri-1.4.12.tar.gz

Installing the extracted source codes
Installing and compiling Dahdi

• Cd /usr/src/dahdi
• Type make all
• Type make install
• Type make config
Installing and compiling libpri
• Cd /usr/src/libpri
• Type make clean
• Type make
• Type make install
Installing Asterisk
• cd /usr/src/asterisk-1.8
• Type make clean
• Type ./configure
• Type make menuselect
* select all the addons ,Select base and addon sounds and press save and exit
• Patch for mp3 to work in asteirsk
• /usr/src/asterisk-1.8.x.x/contrib/scripts/get_mp3_source.sh
• Type make
• Type make install
• Type make samples
Creating user for asterisk operation
• Type

useradd -c "Asterisk PBX" -d /var/lib/asterisk asterisk
• Setting ownership for the asterisl user for all the asterisk files
Type

chown -R asterisk /var/run/asterisk
chown -R asterisk /var/log/asterisk
chown -R asterisk /var/lib/asterisk/moh
chown -R asterisk /var/lib/php/session
Changing the apache user and group to asterisk user and group
sed -i "s/User apache/User asterisk/" /etc/httpd/conf/httpd.conf
sed -i "s/Group apache/Group asterisk/" /etc/httpd/conf/httpd.conf
Installing the Freepbx
(The gui frontend for Asteirks)

• cd /usr/src/
• wget http://mirror.freepbx.org/freepbx-2.9.0beta2.tar.gz
Untar the freepbx source package
• tar -zxf freepbx-2.9.0beta2.tar.gz
• cd /usr/src/freepbx
Installing the mpg123 for making the musiconhold to work for mp3 files
1. wget http://sourceforge.net/projects/mpg123/files/mpg123/1.13.2/mpg123-
1.13.2.tar.bz2/download
2. tar -zxf mpg12-1.13.2.tar.bz2
3 Cd /mpg123
4 ./configure
5 make
6 make install
Creating the mysql database for asterisk and freepbx
• Start the mysql

type service mysqld start
• Setting the mysql root password
type mysqladmin -u root password asterisk
• Creating database asteirsk and asteriskcdrdb
type mysqladmin –p create asterisk
type mysqladmin -p create asteriskcdrdb
• Creating the required tables in database created
cd /usr/src/freepbx
type mysql -p asterisk < SQL/newinstall.sql
type mysql -p asteriskcdrdb < SQL/cdr_mysql_table.sql
Mysql access privileges for asterisk user
• Type mysql –u root –p
mysqlpassword: “enter your mysql root password”
• Command to provide all access to the database asterisk for the user
asterisk
mysql> GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY
'amp109';
mysql > GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost
IDENTIFIED BY 'amp109';
mysql> flush privileges;
mysql> quit
Installing Freepbx
• Cd /usr/src/freepbx
Before installing make sure asterisk in running
Type /usr/sbin/safe_asterisk
• type ./install_amp
• Answer all the questions
Asterisk , freepbx installation completed
• Making the all the services to run on startup
• For Freepbx type echo /usr/local/sbin/amportal start >> /etc/rc.local
• For httpd chkconfig httpd on
• For mysql chkconfig mysqld on
Configuring and accessing the Asterisk
• The asterisk can be accessed and configured via freepbs gui
• Point your browser to “http://yourasteriskserverip/
• From the freepbx gui you can access the following asterisk configurtions
a. Creating sip/iax/zap/custom extensions
b. Creating SIP/IAX2/Dahdi trunks
c. Creating call routes
d. Autoprovisioning of IPPhones
e. Creating conference bridge rooms for the meetme applications

No comments:

Post a Comment

Featured post

Vicidial With WebRTC

Vicidial With WebRTC VICIDial is well known open source call center software. It has been in use by many small to large scaled con...