DISABLE the FIREWALL and SELINUX!
Use the “Custom” selection for the packages
Uncheck all boxes except the following packages:
Web Server
Mail Server
MySQL Database
Development Tools
FTP server
netconfig
(only if you need to set static IP)
yum -y update
yum install gcc libxml2-devel libtiff-devel mysql-server php-gd php-mysql kernel-devel bison ncurses-devel audiofile-devel subversion libogg-devel openssl-devel ntp
rpm -ivh apt.sw.be/redhat/el4/en/i386/RPM … f.i386.rpm
wget easynews.dl.sourceforge.net/sour … noarch.rpm
rpm -Uvh webmin-1.300-1.noarch.rpm
cd /usr/src
wget superb-east.dl.sourceforge.net/s … les.tar.gz
gunzip freepbx-2.2.0rc1-withmodules.tar.gz
tar -xvf freepbx-2.1.3.tar
mv freepbx-2.1.3 freepbx
wget ftp.digium.com/pub/asterisk/rele … .13.tar.gz
tar -zxvf asterisk-1.2.13.tar.gz
mv asterisk-1.2.13 asterisk
wget ftp.digium.com/pub/zaptel/releas … .11.tar.gz
tar -zxvf zaptel-1.2.11.tar.gz
mv zaptel-1.2.11 zaptel
wget ftp.digium.com/pub/libpri/releas … 2.4.tar.gz
tar -zxvf libpri-1.2.4.tar.gz
mv libpri-1.2.4 libpri
wget ftp.digium.com/pub/asterisk/rele … 2.5.tar.gz
tar -zxvf asterisk-addons-1.2.5.tar.gz
mv asterisk-addons-1.2.5 asterisk-addons
wget ftp.digium.com/pub/asterisk/rele … 2.1.tar.gz
tar -zxvf asterisk-sounds-1.2.1.tar.gz
mv asterisk-sounds-1.2.1 asterisk-sounds
wget soft-switch.org/downloads/sp … e25.tar.gz
tar zxf spandsp-0.0.2pre25.tar.gz
mv spandsp-0.0.2 spandsp
cd spandsp
./configure --prefix=/usr && make && make install
cd /usr/src/asterisk/apps
wget soft-switch.org/downloads/sp … pp_txfax.c
wget soft-switch.org/downloads/sp … pp_rxfax.c
wget aussievoip.com/makefile.patch
patch < makefile.patch ( edit Makefile and remove references to nvfaxdetect )
rm *.tar.gz
cd /usr/src/zaptel
mv ztdummy.c ztdummy.c.orig
sed “s/if 0/if 1/” < ztdummy.c.orig > ztdummy.c
make linux26
make install
make config
cd /etc/sysconfig
nano zaptel
(comment out all modules EXCEPT “ztdummy”)
modprobe zaptel
modprobe ztdummy (wct2xxp)
echo “modprobe ztdummy” >> /etc/rc.d/rc.local
/etc/init.d/zaptel start
(zaptel should start. if it doesn’t, start over)
cd /usr/src/libpri
make install
cd /usr/src/asterisk
mkdir /var/run/asterisk
make mpg123
make install
make config
useradd -c “Asterisk PBX” -d /var/lib/asterisk asterisk
chown asterisk /var/lib/php/session/
sed -i “s/User apache/User asterisk/” /etc/httpd/conf/httpd.conf
sed -i “s/Group apache/Group asterisk/” /etc/httpd/conf/httpd.conf
/etc/init.d/mysqld start
cd /usr/src/freepbx
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 ‘amp109’;
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY ‘amp109’;
\q
mysqladmin -u root password ‘myfreepbx’
(insert your password!)
cd /usr/src/asterisk-addons
cp Makefile Makefile.orig
sed -i ‘s/SOURCE/SOURCE -DMYSQL_LOGUNIQUEID/’ Makefile
make && make install
cd /usr/src/asterisk-sounds
make install
cd /usr/src/freepbx
./install_amp
(everything default except enter the IP address of your asterisk server when prompted with [xxx.xxx.xxx] and you
can change “passw0rd” if you want)
mkdir /var/lib/asterisk/sounds/custom
chmod 775 /var/lib/asterisk/sounds/custom
echo /usr/sbin/amportal start >> /etc/rc.local
chkconfig httpd on
chkconfig mysqld on
chkconfig vsftpd on
cd /etc/asterisk
mv zapata.conf.template zapata.conf
nano zapata.conf
***make zapata.conf look like the following by adding semi-colons to everything below “XTDM20B”:
[channels]
language=en
; include zap extensions defined in AMP
#include zapata_additional.conf
; XTDM20B Port #1,2 plugged into PSTN
;AMPLABEL:Channel %c - Button %n
;context=from-pstn
;signalling=fxs_ks
;faxdetect=incoming
;usecallerid=yes
;echocancel=yes
;echocancelwhenbridged=no
;echotraining=800
;group=0
;channel=1-2
adduser ftpuser
passwd ftpuser
*enter password twice “somepassword”
chmod 755 /var/ftp
- from webmin set ftpuser’s home directory to /var/ftp
- from webmin enable time sync to pool.ntp.org
reboot
sample zaptel.conf for t1
span=1,1,0,esf,b8zs
e&m=1-8
loadzone=us
defaultzone=us
here is a sample zapata.conf
dont forget to enable fax detection within zapata.conf
[trunkgroups]
[channels]
language=en
switchtype=5ess
signalling=em_w
group=0
context=from-pstn
;added all below
callerid=asreceived
callwaiting=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echotraining=400
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no
relaxdtmf=no
faxdetect=incoming
#include zapata_additional.conf
;end of additions
channel => 1-8
add the following to /etc/rc.d/rc.local
/sbin/iptables -A OUTPUT -t mangle -p udp -m udp --dport 4569 -j DSCP --set-dscp-class ef
/sbin/iptables -A OUTPUT -t mangle -p udp -m udp --dport 5004 -j DSCP --set-dscp-class ef
/sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp-class ef
/sbin/iptables -A OUTPUT -t mangle -p udp -m udp --dport 5060:5080 -j DSCP --set-dscp-class ef
reboot
*change default mysql user:
mysql -p
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY ‘fpbx’;
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY ‘fpbx’;
then go to /etc/asterisk and modify manager.conf:
[admin]
secret = secret
-=-=-=-
check user asterisk is running as
should only has safe_asterisk running as root , all others asterisk … ps -ef | grep asterisk
-=-=-
modify /usr/sbin/safe_asterisk with correct notification information
-=-=-
check /etc/php.ini if you will be uploading mp3’s for MOH
he used :
upload_max_filesize = 16M (was 2M)
post_max_size = 8M (I think that is what it was)
memory_limit = 16M (was 8M)
-=-=-=-=-=-=-=-
for dictation be sure sox is installed !
yum install sox