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

Last updated by .




Related posts:
  1. Automatically create A2Billing rate card from callwithus rate file
  2. Part 6 – Create a customer in a2billing on Elastix
  3. Automatically create A2Billing rate card from voip.ms rate file



SysAdminMan provides virtual PBX hosting based on Asterisk and Freeswitch.
Avaialble systems include FreePBX, PBX-in-a-Flash, Elastix, A2Billing and FusionPBX.
More details and prices can be found at sysadminman.net


9 Comments

  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:

    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:

    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. matt:

    You could turn on MySQL logging to log what’s going on. I’m not sure how granular that is though so it might generate huge logs depending what else was happening! (http://dev.mysql.com/doc/refman/5.1/en/query-log.html)

  6. 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

  7. 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!!

  8. matt:

    How far are you getting? What problems are you having?

  9. 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.

Leave a comment