Automatically create A2Billing rate card from callwithus rate file
Here is a php script designed to download the callwithus.com rate file and create a rate card in a2billing from it. It’s designed to work with the latest version of A2Billing – version 1.4.1
Here is a link to the script – http://sysadminman.net/misc/cwu-rates.html
If you copy and paste the script in to a file on your A2Billing server called /tmp/cwu-rates.php you can then run it by doing -
php cwu-rates.php
Before running it you will need to set the correct dabase, user and password name for a2billing at the top of the script. Also, the default markup for your ‘sell rate’ is 50% but you can alter this by modifying $markup.
If everything went well you should then find a new rate card created in A2Billing. You will need to set a trunk for the rate card and also assign it to a call plan before it can be used. Obviously check that the rates it has created look good too!
Also, I would suggest that before you run the script you take a backup of you A2Billing database – just in case things go wrong.
This script can be easily modified to work with other providers that provide a rate file that you can download.
Related posts:
- Part 7 – Create a call plan and rate card in A2Billing on Elastix
- Getting started with A2Billing – Part 5 Importing a ratecard
- Slow rate browsing in A2Billing

Kerim Incedayi:
You are a life saver
9 October 2009, 7:06 am