Tag Archives: php

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 –

cd /tmp
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.