mkdir /usr/local/src/a2billing
step 2)
cd /usr/local/src/a2billing
step 3)
yum -y install perl-DBD-Pg subversion
step 4)
svn co --username guest --password guest http://svn.a2billing.net/svn/asterisk2billing/trunk/ /usr/local/src/a2billing
step 5)
cp a2billing.conf /etc/a2billing.conf
ln /etc/a2billing.conf /etc/asterisk/a2billing.conf
step 6)
mysql -u root -p < DataBase/mysql-5.x/a2billing-createdb-user.sql
pass=passw0rd (ziro)
*Database name is: mya2billing
*Database user is: a2billinguser
*User password is: a2billing
step 7)
mysql -u root -p mya2billing < DataBase/mysql-5.x/a2billing-schema-v1.4.0.sql
step
mysql -u root -p mya2billing < DataBase/mysql-5.x/UPDATE-a2billing-v1.4.0-to-v1.4.1.sql
mysql -u root -p mya2billing < DataBase/mysql-5.x/UPDATE-a2billing-v1.4.1-to-v1.4.2.sql
mysql -u root -p mya2billing < DataBase/mysql-5.x/UPDATE-a2billing-v1.4.2-to-v1.4.3.sql
step 9)
vi /etc/a2billing.conf
[database]
hostname = localhost
; port for postgres is 5432 by default
port = 3306
user = a2billinguser
password = a2billing
dbname = mya2billing
; dbtype setting can either be mysql or postgres
dbtype = mysql
step 10)
chmod 775 /etc/asterisk
step 11)
touch /etc/asterisk/additional_a2billing_iax.conf
step 12)
touch /etc/asterisk/additional_a2billing_sip.conf
step 13)
echo \#include additional_a2billing_sip.conf >> /etc/asterisk/sip_custom.conf
step 14)
echo \#include additional_a2billing_iax.conf >> /etc/asterisk/iax_custom.conf
step 15)
chown -Rf asterisk:asterisk /etc/asterisk/additional_a2billing_iax.conf
step 16)
chown -Rf asterisk:asterisk /etc/asterisk/additional_a2billing_sip.conf
step 17)
ln -s /usr/local/src/a2billing/AGI/a2billing.php /var/lib/asterisk/agi-bin/a2billing.php
step 18)
chown asterisk:asterisk /var/lib/asterisk/agi-bin/a2billing.php
step 19)
chmod +x /var/lib/asterisk/agi-bin/a2billing.php
step 20)
cd /usr/local/src/a2billing/addons/sounds
step 21)
./install_a2b_sounds.sh
step 22)
chown -R asterisk:asterisk /var/lib/asterisk/
step 23)
vi /etc/asterisk/manager_custom.conf
[myasterisk]
secret = mycode
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user
step 24)
mkdir /var/www/html/a2billing
step 25)
ln -s /usr/local/src/a2billing/common /var/www/html/a2billing/common
step 26)
ln -s /usr/local/src/a2billing/admin /var/www/html/a2billing/admin
step 27)
ln -s /usr/local/src/a2billing/agent /var/www/html/a2billing/agent
step 28)
ln -s /usr/local/src/a2billing/customer /var/www/html/a2billing/customer
step 29)
chown -R asterisk:asterisk /var/www/html/a2billing/
step 30)
chown -R asterisk:asterisk /usr/local/src/a2billing/common
step 31)
chown -R asterisk:asterisk /usr/local/src/a2billing/admin
step 32)
chown -R asterisk:asterisk /usr/local/src/a2billing/customer
step 33)
chown -R asterisk:asterisk /usr/local/src/a2billing/agent
step 34)
vi /etc/crontab
echo "
# Automatically added for A2Billing
0 * * * * php /usr/local/src/a2billing/Cronjobs/a2billing_alarm.php
0 12 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_archive_data_cront.php
0 10 21 * * php /usr/local/src/a2billing/Cronjobs/a2billing_autorefill.php
#Batch process at 00:20 each day
20 0 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_batch_process.php
#Bill DID usage at 00:00 each day
0 0 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_bill_diduse.php
#Remind users of low balance every day at 06:00
0 6 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_check_account.php
#Generate Invoices at 7am everyday
0 7 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_invoice2_cront.php
0 7 * * * php /usr/local/src/a2billing/Cronjobs/a2billing_invoice_cront.php
#Check if balance below preset value, and email user if so.
1 * * * * php /usr/local/src/a2billing/Cronjobs/a2billing_notify_account.php
#Charge subscriptions at 06:05 on the 1st of each month
0 6 1 * * php /usr/local/src/a2billing/Cronjobs/a2billing_subscription_fee.php
#Update currencies at 01:00 each day
0 1 * * * php /usr/local/src/a2billing/Cronjobs/currencies_update_yahoo.php
" >> /var/spool/cron/asterisk
step 35)
touch /var/log/asterisk/a2billing-daemon-callback.log
step 36)
touch /var/log/a2billing/a2billing-daemon-callback.log
step 37)
touch /var/log/a2billing/cront_a2b_alarm.log
step 38)
touch /var/log/a2billing/cront_a2b_autorefill.log
step 39)
touch /var/log/a2billing/cront_a2b_batch_process.log
step 40)
touch /var/log/a2billing/cront_a2b_bill_diduse.log
step 41)
touch /var/log/a2billing/cront_a2b_subscription_fee.log
step 42)
touch /var/log/a2billing/cront_a2b_currency_update.log
step 43)
touch /var/log/a2billing/cront_a2b_invoice.log
step 44)
touch /var/log/a2billing/cront_a2b_check_account.log
step 45)
touch /var/log/a2billing/a2billing_paypal.log
step 46)
touch /var/log/a2billing/a2billing_epayment.log
step 47)
touch /var/log/a2billing/api_ecommerce_request.log
step 48)
touch /var/log/a2billing/api_callback_request.log
step 49)
touch /var/log/a2billing/a2billing_agi.log
step 50)
cp /usr/local/src/a2billing/addons/Doc/extensions_a2billing.conf /etc/asterisk/extensions_a2billing.conf
step 51)
echo \#include extensions_a2billing.conf >> /etc/asterisk/extensions_custom.conf
step 52) remove PHP info
vi /var/www/html/a2billing/common/lib/admin.defines.php
define ("PHP_QUICK_PROFILER", false);
vi /var/www/html/a2billing/common/lib/agent.defines.php
define ("PHP_QUICK_PROFILER", false);
vi /var/www/html/a2billing/common/lib/customer.defines.php
define ("PHP_QUICK_PROFILER", false);
step 52)
http://
user: root
pass: changepassword