
How to update Asterisk2billing from 1.0.7 to 1.2.3 in Trixbox v1.1.1
This document details the process for upgrading Asterisk2billing from version 1.0.7 (default installed version) to version 1.2.3 in Trixbox version 1.1.1. This document assumes that you do NOT want to keep any of the information that may already be entered into Asterisk2billing. These instructions will wipe out any existing Asterisk2billing information in the database, so be careful!
SureTeq is now an FtOCC authorized Trixbox support vendor. We can provide remote support and troubleshooting, or we can design, implement and support your company's complete VoIP PBX solution. Hourly rates and support contracts are available. For pricing information and contact details, please email us.
-
SureTeq now has a blog/RSS feed! Subscribe to our blog for tips, tricks,
news, and general information about all things Asterisk/Trixbox.
Click here for the SureTeq blog!
Not your version? Click here to see the index of all SureTeq documentation! - Previous versions and other product documentation.
Download latest A2B tar file
Go to http://www.asterisk2billing.org and scroll to the bottom. There will be a link for downloading the latest version. I typically prefer to use wget, but I wasn't able to figure out the direct link to the file as the web page uses php to grab it. So I downloaded it to my local computer (which has an FTP server) and then FTP'd the file to /usr/src of my Linux box.
Once the file has been downloaded, open your Linux CLI and do the following:
cd /usr/src
mkdir a2billing2 (assuming that you already have an a2billing in existence)
mv Asterisk2Billing_release_Chameleon_v1_2_3.tar.gz a2billing2 (substitute filename with latest version's filename)
tar zxvf Asterisk2Billing_release_Chameleon_v1_2_3.tar.gz a2billing2
ls -la
You should now see a 'trunk' directory...it has been successfully extracted, and it is now time to start the upgrade.
Kill old database and create new one
From the Linux CLI, type the following to kill the database:
mys
cd /usr/src/a2billing2/trunk/DataBase/mysql/Mysql-3.x_4.x
mysql –p
(default password is passw0rd)
drop Database mya2billing;
quit;
Your old database has now been deleted...time to create the new one. Stay in the same directory and do the following:
mysql -u root -ppassw0rd < a2billing-MYSQL-createdb-user.sql
mysql -u root -ppassw0rd mya2billing < a2billing-mysql-schema-MYSQL.3.X-4.X_v1.2.3.sql
Done! Your a2b v1.2.3 database has been created!
Install HTTP UI
The following commands will make a copy of your old UI (you can simply delete the old files if you've got brass ones...but I'm more careful than that) and copy the new UI in its place.
Administration console:
cd /var/www/html
mv a2billing a2billing_old
mkdir a2billing
chown –R asterisk:asterisk a2billing
cd a2billing
cp -r /usr/src/a2billing2/trunk/A2Billing_UI/. .
Customer console:
cd /var/www/html
mv a2customer a2customer_old
mkdir a2customer
chown –R asterisk:asterisk a2customer
cd a2customer
cp –r /usr/src/a2billing2/trunk/A2BCustomer_UI/. .
Install AGI
The AGI files are how a2b speaks to Asterisk/Trixbox. They consist of the libs_a2billing directory and the a2billing.php file.
cd /var/lib/asterisk/agi-bin
mv a2billing.php a2billing_old.php
cp /usr/src/a2billing2/trunk/A2Billing_AGI/a2billing.php .
mv libs_a2billing libs_a2billing_old
cp -r /usr/src/a2billing2/trunk/A2Billing_AGI/libs_a2billing .
chown asterisk:asterisk a2billing.php
chown –R asterisk:asterisk libs_a2billing
Install a2billing.conf file
cd /etc/asterisk
mv a2billing.conf a2billing_old.conf
cp /usr/src/a2billing2/trunk/a2billing.conf .
chown asterisk:asterisk a2billing.conf
Change database type from postgres to mysql
nano /etc/asterisk/a2billing.conf
In [database] section, change:
dbtype=postgres
;dbtype=mysql
To:
;dbtype=postgres
dbtype=mysql
Log into A2B
Open http://<asterisk IP>/a2billing in a browser.
Default username and password are: admin / mypassword
All done! I would recommend changing your admin password immediately for security.
Go to Administrator --> Show Administrator. Click 'Edit' to the left of the admin login and change the password field to the new password. Do the same for the root user.
That's it!
For a good step-by-step document on setting up a2billing from here, see http://www.talkpbx.com/a2binstructions.htm.