Thursday, August 16, 2012

Asterisk + FreePBX Installations (CentOS)

yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring nano ntp 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

Ensure Hard Drive SMART monitoring is enabled (if using SATA hardware RAID then disable)
chkconfig smartd on

Configure the network time server for managing the time displayed on the server and the phones.
nano +21 /etc/ntp.conf

restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
server 0.rhel.pool.ntp.org
server 1.rhel.pool.ntp.org
server 2.rhel.pool.ntp.org

Leave everything else at defaults.  Any other lines that start with “restrict” should be commented out “#”

Configure time server to start at boot
/sbin/chkconfig --level 345 ntpd on

cd /usr/src
wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
tar zxvf lame-3.97.tar.gz
cd lame-3.97
./configure
make
make install

cd /usr/src

wget http://mirror.freepbx.org/freepbx-2.8.0.tar.gz
tar zxvf freepbx-2.8.0.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.2.13.tar.gz
tar zxvf asterisk-1.6.2.13.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.2.2.tar.gz
tar zxvf asterisk-addons-1.6.2.2.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.4.0+2.4.0.tar.gz
tar zxvf dahdi-linux-complete-2.4.0+2.4.0.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.11.5.tar.gz
tar zxvf libpri-1.4.11.5.tar.gz

mkdir /var/lib/asterisk
mkdir /var/lib/asterisk/sounds
cd /var/lib/asterisk/sounds
wget http://downloads.digium.com/pub/telephony/sounds/asterisk-extra-sounds-en-gsm-current.tar.gz
tar zxvf asterisk-extra-sounds-en-gsm-current.tar.gz

cd /usr/src/dahdi-linux-complete-2.4.0+2.4.0
make clean && make all && make install && make config
cd /usr/src/libpri-1.4.11.5
make clean && make && make install
cd /usr/src/asterisk-1.6.2.13
make clean && ./configure && make menuselect
make && make install
mkdir /var/run/asterisk


cd /usr/src
wget http://sourceforge.net/projects/mpg123/files/mpg123/1.12.5/mpg123-1.12.5.tar.bz2/download
tar -xjvf mpg123-1.12.5.tar.bz2
./configure
make
make install
ln -s /usr/local/bin/mpg123 /usr/bin/mpg123


cd /usr/src/freepbx-2.8.0

useradd -c "Asterisk PBX" -d /var/lib/asterisk asterisk
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

chkconfig httpd on
chkconfig mysqld on

service mysqld start
cd /usr/src/freepbx-2.8.0mysqladmin create asteriskmysqladmin create asteriskcdrdbmysql asterisk < SQL/newinstall.sqlmysql asteriskcdrdb < SQL/cdr_mysql_table.sql

#set mysql password
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY '<password';
G
RANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY '<password>';flush privileges;
cd /usr/src/asterisk-addons-1.6.2.2make clean && ./configure && make menuselectmake && make install
/usr/sbin/safe_asteriskcd /usr/src/freepbx-2.8.0./install_amp

echo /usr/local/sbin/amportal start >> /etc/rc.local

#
Edit /etc/asterisk/cdr_mysql.conf and add 'loguniqueid=yes' to the global section
nano /etc/asterisk/cdr_mysql.conf
loguniqueid=yes



#To change the password for administrator "recordings" GUI (access to extension voicemail, call monitoring, #recording etc.)
nano -w /var/www/html/recordings/includes/main.conf.php
$ARI_ADMIN_PASSWORD ="password"


nano +582 /etc/php.ini#change the “max filesize” from 2M to 20M to allow larger music on hold files





source ref : http://www.powerpbx.org/content/my-hardware-centos-v5x-asterisk-v16x-freepbx-v24x

Showing: 1-1 of 1  
Comments

07 Mar, 2011   |   chungyl
Sample of chan_dahdi.conf

==========================


[channels]
language=en


; XTDM20B Port #1,2 plugged into PSTN
;AMPLABEL:Channel %c - Button %n
usecallerid=yes
hidecallerid=no
callwaiting=yes
threewaycalling=yes
tran sfer=yes
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0
bus ydetect=yes
callprogress=no

;FXO Modules
group=0
signalling=fxs_ks
context=from-dahdi
channel=1-2


;FXS Modules
group=1
echocancel=yes
signalling=fxo_ks
context=from-internal
chan nel=3-4

#include chan_dahdi_additional.conf

No comments:

Post a Comment