09 February 2012

A2Billing Initial Set-up

This guide takes you through the initial stages of setting up A2Billing for production.

System Settings | Global Settings.

Set the base currency, manager settings timezones, and all the other settings which are appropriate to your installation. Note that if you change the currency, you also have to update the currencies under Billing | Currency List

Trunks

Create the trunks to the service provider in Asterisk, and confirm they work by configuring an extension in Asterisk and dialling out via the new trunk. Then tell A2Billing that the trunks exist and they can be used in the Providers | Trunks section.

Call-plans & Rate Tables

Create a call-plan and rate tables under rates. The relationship is that one customer has one call plan, which may have multiple rate tables (usually one per trunk) which in turn has multiple rates. Edit the call-plan and add the rate tables pertaining to that call-plan.

Rates

Create your rates and upload them into your rate tables, Note that the longest match of dial-code to dialed-digits is chosen first, and that a call cannot be made unless a rate exists for the destination.

Asterisk Dial-Plan

A VoIP dial-plan may look like...
[a2billing]
exten => _X.,1,NoOp(A2Billing Start)
exten => _X.,n,DeadAgi(a2billing.php,1)
exten => _X.,1,Hangup()
...whereas a calling card dial-plan may look like this: -
[a2billing-callingcard]
exten => _X.,1,NoOp(A2Billing Start)
exten => _X.,n,Answer()
exten => _X.,n,Wait(2)
exten => _X.,n,DeadAgi(a2billing.php,1)
exten => _X.,1,Hangup()
Note that with VoIP, the call is not usually answered, whereas with a calling card, it is, so you can play audio to the customer. A2Billing VoIP accounts will use the a2billing context by default, whereas you will have to configure your calling card access number to pass into the a2billing-callingcard context.

Agi-Conf

The “1” after “a2billing.php” in the above dial-plan examples refer to which agi-conf to use. The agi-conf under System Settings controls the call in progress and how the call is to behave, e.g. whether to read out the balance, prompt for the number to call, ask for PIN etc. The agi-conf is well commented, so set its parameters according to the way that you want to handle the call.

Create Customer and Test

Once you have defined your product using call-plans and rates, then you can create a new customer, and at the same time this, by default, creates new VoIP settings. You can now register a VoIP phone or test calling cards once you have added credit to the customer's account.

No comments:

Post a Comment