Monday, November 29, 2010

unrevealing all about a2billing...

Well It's being almost near to end of 2010...

sigh...........................

Thought to discuss an important topic regarding prepaid voip applications.
Well ... When I said 'prepaid' everyone will get the name in their mind 'a2billing' in an instant, if you have already struggle to setup an a2billing platform.

I thought to share the things that I got from my experience about a2billing and point out the important points in setting up an a2billing system.

a2billing platform is mostly used as a very famous open source calling card platform in voip.


I'm not going to explain how the basic a2biling installation will be done as it's too easy , just untar a compress file and move it to an apache website.


Well the most important things are how we going to configure the a2billing platform which will allow us to put it in an production environment.


Below are the most important entities in a2billing,

1.) rate card
2.) tariff plan
3.) customers ( actual calling card)

a) First thing we need to do after installing a2billing is to create a rate card entry via web interface.

under Rate Card -> create new Rate Card

b)After that we can get all the dialing prefixes from a telco operator who has the all country codes and prefixes.

c) Then we can generate a csv file to import rates to a2billing system.
Rate Card -> Import Rate Card

Here you can associate your newly created rate card to the rates that you are going to import.

.csv files should contain fields as below,

dialprefix;destination;rateinitial

after this you can have,

dialprefix;destination;rateinitial;buyrate;buyrateinitblock;initblock and if need other required fields as necessary.

d) Now we have ratecard,rates define. So next thing is to create a callplan (tariffplan)
Rate Card -> Create Call Plan

Once the Call Plan is created you can add the rate card that you have created for this Call Plan


e) Finally now We have created Rate Card,Rates,Call Plan. So It's time to generate some customers (calling cards)

Customers -> Generate Customers

Provide the Call Plan that you have created for this card set. So all cards generated will be in the same Call Plan.


Ahh haaa.. :)

Now a2biling engine is completely configured.

we have RateCard , Rates, Call Plan and Cards (Customers)

I'll tell what are the associated tables in database for each of above entities.

RateCard --> cc_tariffplan
Rates --> cc_ratecard
Call Plans -> cc_tariffgroup
Cards(Customers) -> cc_card

And cc_call will contain all cdr informations.

Well............ Well........ Well.... So that's the simplest setting up of a2billing platform.

Next Important thing is that the progressive rates that We could configure in a2billing to have much more complex rating plans that can be achieved easily ;)

Ohhhhhh. F**k It wasn't easy for me to figure out this part of a2billing without having doing some brain intensive thinking :D :D lol ...........

Ok The tricky part of a2billing is that you can setup progressive rate schemes. That means say you want to charge x/min rate for first 5 minutes and then for next 10 minutes you'd like to charge y/min rate and finally a z/min rate for the rest of the call.

EEeeeeeeeeeeeeeekkkkkkkkkkk.................

I think you didn't get it at the first I think. Lets take an example.


a2billing has four step progressive rating engine

stepa , stepb , stepc , and default rate.

each step has following rate attributes.

stepchargea -- like a flagfall when entering this cycle
chargea -- rate to be apply during this cycle
timechargea -- duration of this cycle
billingblocka -- billing increment

Ex:- Lets say We want to charge 0.2 per minute for first 5 minutes and then after 5 minutes we have a flagfall of 0.1 and then for next 10 minutes we have 0.4/min rate
and finally we charge 0.5 for the rest of the call.

So cycles for this call will be

0---------5 ------ 15 ----------- end of call

so we have

stepchargea -- 0
chargea -- 0.2
timechargea -- 300 ( 60x5)
billingblocka -- 60 ( per minute billing)

step b start after step a finishes that means on 6th minute of the call

stepchargeb -- 0.1
chargeb -- 0.4
timechargeb -- 600 ( 60x10)
billingblockc -- 60 ( per minute billing)

rateinitial -- 0.5
initblock -- 60
billingblock -- 60



So It goes like first 5 minutes stepa then from 6th to 15th minute stepb then for the rest rateinitial charge.



So thats all about progressive rates in a2billing.

And one final thing is that in the newest version we can authenticate caller based on callerid allowing us to provide prepaid service ( no PINs need to enter for authentication)


Also we can configure an a2billing system as a callback system . Allowing callers being callback to enter the PIN and proceed with making calls in this mode.

Hmmm..............


Hope this would be helpful to anyone who interested and struggling to figure out the mysteries of a2billing system.

It ain't no big deal once you figure out HOWTO ;)

See ya folks in Christmas next time .

Jingle bell jingle bell ..................................

lol :D

1 comment:

  1. Thanks a lot, it is very handy to know all this about A2Billing.

    Please keep it up.

    Thanks

    ReplyDelete