Part 7 – Create a call plan and rate card in A2Billing on Elastix

This is part 7 of a series of posts on setting up an Elastix extension with A2Billing. See here for details of the other parts – Using A2Billing to account for extension calls in Elastix

This is by far the most complex part of setting up A2Billing. Creating and maintaining a rate card can be very time consuming. By far the best way to create the rates is to upload them from a CSV as provided by your VOIP provider. There can be many thousands of rates and it’s impossible to manage them by hand. We are going to create just a single rate to UK landlines so that we can test calling.

First click on RATECARD and Create Call Plan. Give your call plan a name, I’ve used Example –

create example callplan

Next we need to create a rate card so Click on Create New RateCard. I’ve called mine ‘Example ratecard’. Change the TRUNK to the trunk that we created earlier –

create example rate

Now we need to go back to the call plan that we created earlier and add the rate card to it. This is the bit that people normally forget! Click on List Call Plan and then select EDIT. Scroll down and add the rate card you created to the call plan –

add ratecard to callpan

Now we need to create a rate on the rate card. I’m just going to create a rate for UK landline numbers starting with 1. The Dial Prefix is set to 441 (44 for UK and 1 for landline numbers). The DESTINSTION is just a text label for the destination. Set the buy rates (the amount you but the minutes for) and the sell rates (the amount you sell the minutes for). If your provider bills by the minute then set the durations and billing blocks to 60 (seconds) –

create rate for UK landlines

create rate in a2billing

Your rate should look like this once applied –

check rate has been created

That’s it for the a2billing GUI. Next we need to make some changes in Elastix – Part 8 – Create a custom trunk in Elastix for use with A2Billing

14 thoughts on “Part 7 – Create a call plan and rate card in A2Billing on Elastix

  1. Martin

    Hi, I just stumble upon your tutorial and I must say you done a great job because there are very few a2billing tutorials on the net.
    I have recently done fresh install of a2billing 1.8.5 on elastix 2.0.2 and I got a very daunting task to perform everyday. that is almost everyday I have to re-import rates into an existing ratecard over and over again because anytime I check the rates in any of the rate card i get a message showing that there are no rates created for this rate card. even though when I import I get the confirmation of the number of rates imported.

    First I tought a2billing is deleting date from cc_ratecard table so I revoked the delete privilege on this table and any other but still the same problem.

    please I will very much appreciate your suggestion on this overwhelming task.
    thanks
    Martin

  2. matt Post author

    Hi Martin,

    Thanks for the comments, I’m glad you found the post useful.

    I’ve never heard of rates disappearing. As soon as you import the rates successfully, and then do look at the rate card are they there ok?

    If they are and then disappear overnight there’s definitely something strange going on!

    Matt

  3. martin

    yea right! I see and able to use the rates after import but they disapear soon after. for now revoking delete prilivelage has been the only solution.
    thanks.

  4. matt Post author

    Definitely strange. I would suspect something running in cron but I can’t see any a2billing jobs that are likely.

    You said in your first comment that revoking the permissions didn’t help, did that fix it though?

    Did you run all of the database updates when updating from A2Billing 1.3.0 that comes with Elastix?

  5. Martin

    Hi Martin, I installed the latest version 1.9.3 and its been solid rock so far. every feature I have used so far is working perfectly.
    thanks

  6. Mohamed

    Please I can’t make billing internal call with this tutorial.
    I don’t know the problem is from version Elastix 2 or I make an error in configuration.Please help!!

  7. Mohamed

    Hello matt

    I want have make a trunk netween two servers elastix 1.6.I can make call between two extensions in different servers.I followed this tutorial to make billing but I failed.
    I should add [a2billing] to extensions and changing the context of my extensions???
    [a2billing]

    exten => _X.,1,Answer
    exten => _X.,n,Wait(1)
    exten => _X.,n,DeadAGI(a2billing.php,1) – HAD TO change from (|) to (,)
    exten => _X.,n,Hangup
    ?????
    Isn’t indicated in this tutorial.

  8. Sergio

    Oi amigo, nota 1000 pelo tutorial, me agudo muito estalei o elastix e o a2billing funcionou perfeitamente seguindo o seu tutorial.
    Porem recentemente estalei o elastix com a2billing, e importei as tarifas aceitou tudo ok, aparece a lista de tarifas normal, porem no simulador da essa mensagem No matching rate found !, e não consigo efetuar ligaçãos.
    Ce você poder me da uma luz, estou precisando muito, desde já agradeço

  9. matt Post author

    You should check that your call plan has a rate card entered.

    You should also check the dates on the call plan, rate cards and rates. Ensure none of them are outside the dates or say 0000-00-00

  10. jinto

    i have a problem with my elastix. help me please….

    i am created both elastix extention and A2Billing customer. my extention connecting with server and going call through it very well. but by A2Billing customer’s account not registering with server. help me….

    jinto

  11. Emmanuuel

    Sir,
    Why should we programme the buyrate min duration at 60 and sellrate minimum duration at the same 60?

  12. Matt Newcombe Post author

    It should be driven by your call provider. It would depend what time increments they are billing you in.

Comments are closed.