Howto Upgrade A2Billing from 1.3.0 to 1.3.3

Discussion in 'General' started by k2kmb, Oct 1, 2008.

  1. k2kmb

    Joined:
    Oct 1, 2008
    Messages:
    10
    Likes Received:
    0
    Hopefully this will help any others out there looking to upgrade A2Billing from the included version (1.3.0) to the latest and greatest (1.3.3).
    I cant take all the credit for this, as the majority of it comes from the A2Billing web site. The instructions there are to upgrade from 1.3.2 to
    1.3.3 but the upgrade process works fine for 1.3.0. The code had to be massaged in order to support the Elastix environment and directory structure
    and the comments were cleaned up a bit. Now onto the code as they say.....

    [*]First, change your directory to /usr/src/
    Code:
    cd /usr/src
    [*]Then create a directory for A2billing_133
    Code:
    mkdir A2billing_133
    [*]Next change to the new directory
    Code:
    cd A2billing_133
    [*]Next download the tar file for version 1.3.3
    Code:
    wget http://www.asterisk2billing.org/downloads/A2Billing_1.3.3.tar.gz
    [*]Unpack the tar file
    Code:
    tar -zxvf A2Billing_1.3.3.tar.gz
    [*]Create a backup folder and move the old admin and customer interfaces to the backup directory
    Code:
    mkdir /home/backup
    [*]Now backup the old billing and customer interfaces to the backup directory
    Code:
    mv -f /var/www/html/a2billing/ /home/backup
    Code:
    mv -f /var/www/html/a2customer/ /home/backup
    [*]Now copy the new Admin and Customer interfaces
    Code:
    cp -rf /usr/src/A2billing_133/A2Billing_UI /var/www/html/a2billing
    Code:
    cp -rf /usr/src/A2billing_133/A2BCustomer_UI /var/www/html/a2customer
    [*]Now move the AGI files into your backup folder
    Code:
    mv /var/lib/asterisk/agi-bin/a2billing.php /home/backup
    Code:
    mv -rf /var/lib/asterisk/agi-bin/libs_a2billing /home/backup
    [*]Now copy the new AGI files
    Code:
    cp /usr/src/A2billing_133/A2Billing_AGI/a2billing.php /var/lib/asterisk/agi-bin
    Code:
    cp -rf /usr/src/A2billing_133/A2Billing_AGI/libs_a2billing /var/lib/asterisk/agi-bin
    [*]The file updates are now completed.
    [*]Now chmod the smarty template folder.
    Code:
    chmod -R 777 /var/www/html/a2billing/templates_c 
    Code:
    chmod -R 777 /var/www/html/a2customer/templates_c
    [*]Now we have to update the database.
    [*]I strongly advise you to make a Database backup before going through these steps!
    [*]Log into mysql
    Code:
    mysql -uroot -peLaStIx.2oo7 (These are the default passwords. If you changed your install then update accordingly)
    [*]Run the database update script
    Code:
    mysql> use mya2billing  (change database to what we want to run the script against)
    Code:
    mysql>\. /usr/src/A2billing_133/DataBase/mysql/Mysql-5.x/UPDATE-a2billing-v1.3.2-to-v1.3.3-mysql.sql
    Code:
    mysql> exit
    And thats it. With any luck when you reload the A2Billing from within Elastix you will now be running version 1.3.3
    Make sure you go thru any existing config you have and make sure all your trunk, customer, etc. definitions still
    exist and are working properly. I hope this will help any others out there that have wondered how to go about doing this.
    I should also have a writeup on replacing (NOT upgrading) SugarCRM 4.5 with SugarCRM 5.1 in the near future. Enjoy!
     
  2. rafael

    Joined:
    May 14, 2007
    Messages:
    1,454
    Likes Received:
    1
    Thanks very much, this is going to be a good reference for the developers so we can have an updated version of a2billing :).

    I would increase your karma in 1 ;)

    Saludos,

    Rafael
     

Share This Page