How to install data4voip

Written by admin on January 25, 2015. Posted in Asterisk, data4voip

Installation instructions for data4voip are so lean that to someone who is new to linux it will be a mountain to climb. This is probably why most people would prefer a2billing for wholesale than data4voip switch. Below is a simplified step by step how to install it. we also have an automated script for it. Visit our store to purchase it. The installation must be done on Centos 6. Please also note that the installed product is not the same exactly the same with the demo. Probably some features are available if you make them install for you. This defeats though the purpose why it is opensource.

1. Install Epel repos and update yum

# yum -y update
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm

2. Install php

# yum -y install httpd nano php
yum --enablerepo=centosplus install mod_php

3. Correct time zone

Edit the file "/etc/php.ini", find the line ";date.timezone =", uncomment it and add your timezone

# nano +946 /etc/php.ini

4. Install other dependencies

# yum -y install mysql-server
yum -y install php-mysql php-gd php-domxml-php4-php5 unixODBC mysql- connector-odbc asterisk-odbc mod_ssl

5. Start mysql and set mysql password you can keep it as root now and change later

# service mysqld restart
mysqladmin -u root password 'root'

6. Install data4voip web interface

# cd /usr/src
wget http://www.data4voip.com/billing/data4voip_billing.tar.gz
tar -xzf data4voip_billing.tar.gz -C /var/www/html/

chown -R apache:apache /var/www/html/

find /var/www/html/ -type d -exec chmod 755 {} \;

find /var/www/html/ -type f -exec chmod 644 {} \;

find /var/www/html/agi/ -type f -exec chmod 744 {} \;

find /var/www/html/cron/ -type f -exec chmod 744 {} \;
7. Create database

# mysql -u root -p
<mysql> CREATE DATABASE v_billing;

exit

8. Populate the database

# wget http://www.data4voip.com/billing/billing_database.sql
mysql -u root -p v_billing < billing_database.sql

cd /etc/
wget http://www.data4voip.com/billing/database.inc
chown -Rf apache:apache /etc/database.inc
chmod 400 /etc/database.inc

9. Install asterisk

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

yum install -y make wget openssl-devel ncurses-devel newt-devel libxml2-devel kernel-devel gcc gcc-c++ sqlite-devel libuuid-devel
cd /usr/src/

wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz

tar zxvf dahdi-linux-complete*
tar zxvf libpri*
tar zxvf asterisk*
cd /usr/src/dahdi-linux-complete*
make && make install && make config

cd /usr/src/asterisk*
./configure --libdir=/usr/lib64 && make menuselect && make && make install
make clean && make distclean
make samples
make config
service dahdi start
service asterisk start

10. Replace config files or change the parameters in these files to suit your details if you used different mysql password

#  cd /etc/
wget http://www.data4voip.com/billing/odbcinst.ini
wget http://www.data4voip.com/billing/odbc.ini
cd /etc/asterisk/
wget http://www.data4voip.com/billing/res_odbc.conf
wget http://www.data4voip.com/billing/manager.conf
wget http://www.data4voip.com/billing/extensions.conf
wget http://www.data4voip.com/billing/sip.conf
wget http://www.data4voip.com/billing/extconfig.conf