5 Website Development Tips To Boost Your Business Growth Exponentially

Simple way of installing FreePBX  on asterisk 1.8.x  with Addons. 

 

 

 

How to install asterisk and freepbx from scratch,  useful if your using a virtual machine.

 (As of now  this is raw commands)

Install Requirements:

1. Install CentOS, enabling the following packages:
*DNS Server
*Web Server
*Mail Server
*MySQL Database
*Development Tools

OR

yum install nano gcc gcc-cpp gcc-c++ httpd mysql-devel mysql-server php php-mysql ncurses-devel libxml2-devel php-process php-5.3-zend-guard-loader sysadmin  incron tftp-server svn make 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

 

 

 

 

 

wget http://prdownloads.sourceforge.net/webadmin/webmin-1.630-1.noarch.rpm

rpm -U webmin-1.630-1.noarch.rpm

  echo “selinux=disabled” > /etc/selinux/config

cd /usr/src

wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz
tar zxvf lame-3.98.4.tar.gz
cd lame-3.98.4
./configure
make
make install
cd ..
 
_______________________________________________
 
Download and install sources:
 
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://mirror.freepbx.org/freepbx-2.8.1.tar.gz

 

tar xvfz asterisk-1.8-current.tar.gz

tar zxvf dahdi-linux-complete-current.tar.gz

tar zxvf freepbx-2.8.1.tar.gz

 

cd asterisk-1.8.23.0
./configure
contrib/scripts/get_mp3_source.sh

 

./configure
make menuconfig
select app_mysql, app_saycountpl, cdr_mysql, format_mp3, res_config_mysql
go to Extras Sound Packages
Select EXTRAS-SOUNDS-EN-GSM
Save & Exit

make
make install
 

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/
nano +231 /etc/httpd/conf/httpd.conf

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

nano +329 /etc/httpd/conf/httpd.conf
#Change AllowOverride None to AllowOverride All
#Ctrl-X to save, ‘Y’ to confirm

 

 /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
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’

cd /usr/src/freepbx-2.8.1
./start_asterisk start

pear install DB
./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

7. Fix ARI password:
note: in FreePBX 2.8 you do this in /etc/amportal.conf
nano -w /etc/amportal.conf
ARI_ADMIN_PASSWORD=SOMEPASSWORD
Ctrl-X to save, ‘Y’ to confirm

8. Configure Sendmail:
nano /etc/mail/sendmail.mc
define(`SMART_HOST’, `relay.DOMAIN.com)dnl
MASQUERADE_AS(`pbx.DOMAIN.com’)dnl
FEATURE(`masquerade_envelope’)dnl
Ctrl-X to save, ‘Y’ to confirm

make -C /etc/mail

9. Edit sip_nat.conf for proper NAT:
note: in FreePBX 2.8 you can download Asterisk SIP Settings module to do this
nano /etc/asterisk/sip_nat.conf

localnet=192.168.1.0/255.255.255.0
externhost=pbx.DOMAIN.com (Set your external hostname name here)
externrefresh=10
fromdomain=DOMAIN.com (Set your external domain name here)
nat=yes
qualify=yes
canreinvite=no
Ctrl-X to save, ‘Y’ to confirm

10. Add extra codecs to config:
note: in FreePBX 2.8 you can download Asterisk SIP Settings module to do this
nano /etc/asterisk/sip_custom.conf

allow=gsm
allow=h261
allow=h263
allow=h263p
videosupport=yes
Ctrl-X to save, ‘Y’ to confirm

note: in FreePBX 2.8 you can download Asterisk IAX Settings module to do this
nano /etc/asterisk/iax_custom.conf

allow=gsm
allow=h261
allow=h263
allow=h263p
videosupport=yes
Ctrl-X to save, ‘Y’ to confirm

asterisk -rx reload

11. Edit voicemail config:
nano /etc/amportal.conf
If the web interface on your PBX will be accessible on the internet:
AMPWEBADDRESS=pbx.DOMAIN.com (Set your external hostname name here)
If the web interface on your PBX will be accessible only on your internal network:
AMPWEBADDRESS=internal.hostname.DOMAIN.com (Set your internal hostname name here)
Ctrl-X to save, ‘Y’ to confirm

or if your users will NOT have access to the web interface:

nano /etc/asterisk/vm_email.inc
remove “Visit http://AMPWEBADDRESS/cgi-bin/vmail.cgi?action=login&mailbox=${VM_MAILBOX} to check your voicemail with a web browser.\n”
Ctrl-X to save, ‘Y’ to confirm

nano /etc/asterisk/vm_general.inc

serveremail=[email protected] ; Who the e-mail notification should appear to come from
fromstring=DOMAIN PBX ; Real name of email sender
Ctrl-X to save, ‘Y’ to confirm

12. Fix MOH directory:
ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3
asterisk -rx reload

14. Open browser to http://ipaddressofpbx
Done!

 {jcomments on}


Published on: Mar 03, 2021

Categories: Web Development

    No Comments yet! Be the first one to write.


    Leave a Reply

    Your email address will not be published. Required fields are marked *

    user IP : 18.219.236.62 | Server_IP: 192.168.111.165 | IP_Score: