Welcome to FreeSoftwareServers Confluence Wiki


OS CentOS 7 Updated = Base OS
asterisk-11-current = voip
jansson v2.7
iksemel-1.4 = google voice dep
freepbx-12.0-latest = AdminGUI
xinetd = tftpboot hard sip phones
lame 3.99.5 = mp3 encoder
sox = wav/ogg encoder

Disabeling SELinux during installation is required

sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config && reboot 

Update System & disable FirewallD 

yum -y update
yum -y groupinstall core base "Development Tools"
systemctl stop firewalld
systemctl disable firewalld 

Install Pre-Reqs :

yum install -y kernel-devel kernel-headers e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libselinux-devel libsepol-devel libtiff-devel gmp php-pear php php-gd php-mysql php-pdo php-mbstring mysql-connector-odbc unixODBC unixODBC-devel audiofile-devel libogg-devel openssl-devel zlib-devel perl-DateManip sox git wget net-tools psmisc gcc gcc-c++ make gnutls-devel libxml2-devel subversion doxygen texinfo curl-devel net-snmp-devel neon-devel uuid-devel libuuid-devel sqlite-devel sqlite speex-devel gsm-devel libtool libtool-ltdl libtool-ltdl-devel php-xml lynx mariadb-server mariadb php-process php-xml tftp-server httpd sendmail sendmail-cf newt-devel gtk2-devel crontabs cronie cronie-anacron bzip2 xinetd

Download Source Files :
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
wget -O jansson.tar.gz https://github.com/akheron/jansson/archive/v2.7.tar.gz
wget https://iksemel.googlecode.com/files/iksemel-1.4.tar.gz
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-12.0-latest.tgz
wget http://download2.fop2.com/fop2-2.31.00-centos-x86_64.tgz
wget http://liquidtelecom.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz 

Enable MySQL :

systemctl enable mariadb.service
systemctl start mariadb

Enable Apache + Configure for AsteriskUser :

adduser asterisk -M -c "Asterisk User"
systemctl enable httpd.service
systemctl start httpd.service
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.ini
sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/httpd/conf/httpd.conf
sed -i 's/AllowOverride None/AllowOverride All/' /etc/httpd/conf/httpd.conf
service httpd restart 

Install PEAR :

pear install db-1.7.14
pear install Console_Getopt


All ./configure & make (install) commands should be attended & run one by one.

Install LAME :

cd /usr/src
tar xvfz lame*
cd lame*
make install


Install Google Voice Dependancies :

cd /usr/src
tar xf iksemel-*.tar.gz
cd iksemel-*
make install

Install jansson :

cd /usr/src
tar vxfz jansson.tar.gz
cd jansson-*
autoreconf -i
./configure --libdir=/usr/lib64
make install 

Install Asterisk :

cd /usr/src
tar xvfz asterisk*.tar.gz
cd asterisk-*
contrib/scripts/install_prereq install
./configure --libdir=/usr/lib64
make menuselect
---> Add-ons (See README-addons.txt)  
             --- Extended ---
             XXX chan_mobile
             [*] Chan_ooh323
             [*] Format_mp3
             [*] Res_config_mysql
             --- Deprecated ---
             [*] App_mysql
             [*] App_saycountpl
             [*] Cdr_mysql

  ---> Core Sound Packages
            [*] CORE-SOUNDS-EN-GSM
  ---> Extras Sound Packages
            [*] EXTRA-SOUNDS-EN-GSM 
make install
make config
sed -i 's/ASTARGS=""/ASTARGS="-U asterisk"/g'  /usr/sbin/safe_asterisk
chown -R asterisk. /var/run/asterisk
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
chown -R asterisk. /usr/lib64/asterisk
chown -R asterisk. /var/www/

Prepare FreePBX SQL Database :

export ASTERISK_DB_PW=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 - | cut -c2-18`
mysqladmin -u root create asterisk
mysqladmin -u root create asteriskcdrdb
cd /usr/src/
tar zxvf freepbx*
cd /usr/src/freepbx
mysql asterisk < SQL/newinstall.sql
mysql asteriskcdrdb < SQL/cdr_mysql_table.sql
mysql -u root -e "GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"
mysql -u root -e "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"
mysql -u root -e "flush privileges;"

Install FreePBX :

cd /usr/src/
tar zxvf freepbx*.t
cd /usr/src/freepbx
./start_asterisk start
./install_amp --installdb --username=asteriskuser --password=${ASTERISK_DB_PW}

If an error appears:

Enter the path to use for your AMP web root:
 [/ Var / www / html]

PHP Warning: mkdir (): File exists in /usr/src/freepbx/libfreepbx.install.php on line 199
[FATAL] Can not create / var / www / html!

Just run the installation again:

./install_amp --installdb --username=asteriskuser --password=${ASTERISK_DB_PW}

Reload/Refresh via amportal

amportal a ma reload 
amportal a ma refreshsignatures 
amportal chown
ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3
amportal restart

Note: If you plan to use hardware SIP phones you will probably want to enable the tftp server.

nano /etc/xinetd.d/tftp

nano /etc/xinetd.d/tftp

#server_args = -s /var/lib/tftpboot
server_args = -s /tftpboot

mkdir /tftpboot
chmod 777 /tftpboot
service xinetd restart

Backup Tars! :

cd /usr/src
mkdir tars
mv *.tar.gz tars/
mv *.tgz tars/
mv *.gz tars/
tar czvf VoIP_Tars tars/ -R



  • No labels