Installing DooxSwitch

From DooxSwitch wiki
Jump to: navigation, search

SERVER REQUIREMENTS


SERVER REQUIREMENTS:

Harddisk Space

20GB+

RAM

6GB+

Operating System

CentOS 6.6 (64 bit)

PHP

PHP5.3

Apache

Apache v2+

MySQL

MySQL v5+

ionCube

ionCube v4+


more info or requirements

Hardware requirements

Update the system

update the system

yum -y update

install dev tools

yum install -y make wget svn openssl-devel ncurses-devel  newt-devel libxml2-devel kernel-devel-`uname -r` gcc gcc-c++ sqlite-devel perl

disable selinunx

sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config

make reboot

reboot

Install LAMP

install LAMP with php version 5.3

yum -y install mysql-server httpd php-mysql php-pear-DB php-pear gcc autoconf make vsftpd gpg php-gd php-xml php-pecl-apc-devel.x86_64 php-mbstring.x86_64 php-common.x86_64 php-cli.x86_64

install LAMP with php version 5.5 [ CentOS/RHEL 6.x: ]

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
yum -y install mysql-server httpd php55w php55w-mysql  php55w-pear gcc autoconf make vsftpd gpg php55w-gd php55w-xml php55w-pecl-memcache GeoIP php55w-pecl-geoip php55w-mbstring.x86_64 php55w-common.x86_64 php55w-cli.x86_64

After install is successful you have to modify the httpd.conf file and change the ServerName to your server IP or Hostname

nano /etc/httpd/conf/httpd.conf 

find

#1 Change to your Server Name
#ServerName www.example.com:80

change to

#1 Change to your Server Name
ServerName x.x.x.x:80


find

#2 Change AllowOverride
AllowOverride None

change to

AllowOverride ALL


you have to modify the php.ini file


#1 Change Memory Limit
memory_limit = 4096M (minimum)

#2 Change Max Execution Time
max_execution_time = 300
#3 Upload Maximum File Size
upload_max_filesize = 80M

#4 Post Maximum File Size
post_max_size = 80M
#5 Set your correct Date and Time Zone
date.timezone = Country/City


check config for httpd and mysql



/etc/init.d/httpd start
chkconfig httpd on
/etc/init.d/mysqld start
chkconfig mysqld on

Setup password for MySQL

sudo /usr/bin/mysql_secure_installation

Install Asterisk 1.8 and Dahdi

install dev tools

yum -y install libxml2-devel libxml2 unixODBC unixODBC-devel mysql-server mysql-devel nano ncurses-devel patch gcc gcc-c++ kernel-devel libtiff-devel libtermcap-devel bison flex curl-devel  libtool-ltdl-devel gmime-devel wge


Download Asterisk and Dahdi

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.9.0.tar.gz
tar xvzf asterisk-1.8.9.0.tar.gz
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-2.6.0.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-2.6.0.tar.gz
tar xvzf dahdi-linux-2.6.0.tar.gz
tar xvzf dahdi-tools-2.6.0.tar.gz

Install Dahdi

cd /usr/src/dahdi-linux-2.6.0                                                      
make                                                                               
make install                                                                       

Install Dahdi tools

cd /usr/src/dahdi-tools-2.6.0                                                      
./configure                                                                        
make all
make install
make config
chkconfig dahdi on

Install Asterisk

cd /usr/src/asterisk-1.8.9.0
./bootstrap.sh
./configure 
contrib/scripts/get_ilbc_source.sh
contrib/scripts/get_mp3_source.sh
make menuselect.makeopts
menuselect/menuselect --enable format_mp3 --enable res_config_mysql --enable app_mysql --enable cdr_mysql --enable app_meetme --enable chan_iax2  
make && make install
make progdocs
make samples
make config

Check config

chkconfig asterisk on


Install codecs

cd /usr/src

wget http://download.dooxswitch.com/install/codec_g729.so
wget http://download.dooxswitch.com/install/codec_g723.so
mv codec_g729.so /usr/lib/asterisk/modules/codec_g729.so
mv codec_g723.so /usr/lib/asterisk/modules/codec_g723.so


Grab the latest config files

wget http://download.dooxswitch.com/install/config.tar

untar and copy to  /etc/asterisk

edit 3 files and modify your DB settings

cdr_mysql.conf
res_mysql.conf
res_config_mysql.conf


Change IP in this file

sip.conf


Start asterisk

asterisk -vvv -c


Install DooxSwitch

visit my.dooxswitch.com/clientarea.php and grab the latest build from the download area


copy to our root dir  /var/www/html/

create two directories

mkdir /var/www/html/protected/runtime
mkdir /var/www/html/assets

Change file permission

chmod 777 /var/www/html/protected/runtime
chmod 777 /var/www/html/assets
chmod 777 -R /var/www/html/protected/config/
chmod 777 -R /var/www/html/sounds/
chmod 777 -R /var/www/html/uploads/
chmod 777 /var/www/html/console.php
chmod 777 /var/www/html/protected/modules/billing/config/settings.php


if not all directories are created


mkdir /var/www/html/protected/config/
mkdir /var/www/html/sounds/
mkdir /var/www/html/uploads/

install crontab

crontab -e

press i and paste these crontab commands

*/1 * * * *             /usr/bin/php /var/www/html/cron.php runeveryminute > /var/cron_debug_log.log 2>&1
0 0 1 * *             /usr/bin/php /var/www/html/cron.php invoices > /var/cron_debug_log.log 2>&1
*/1 * * * *		/usr/bin/php /var/www/html/cron.php updatecash > /var/cron_debug_log.log 2>&1
*/1 * * * *             /usr/bin/php /var/www/html/cron.php runeverymorning > /var/cron_debug_log.log 2>&1
*/1 * * * *             /usr/bin/php /var/www/html/cron.php asterisk > /var/cron_debug_log.log 2>&1
*/5 * * * *             /usr/sbin/asterisk -rx "sip reload"


Next point your browser to your IP Address or Domain and follow the installation steps


DooxSwitch Reseller API manual

DooxSwitch Mobile API manual

install text-to-speech google

G723/G729 Codec installation

Setting up https secure connection

Asterisk High availablity

GeoIP Iptables

MySQL Replication

Kamailio Loadbalancing

DNS SRV