Least Cost Routing (LCR) with Asterisk and A2Billing

A2Billing is a great piece of call billing software for Asterisk. It can be integrated with FreePBX and used in lots of different ways.

I run my own Asterisk system with FreePBX and use a2billing to do least cost routing. It’s possible to import rate tables from many different voip providers and then let a2billing route the call based on the cheapest route.

One of the things you need to be aware of is that a2billing will route based on the ‘best matching’ rate. So, lets say you are trying to call +17061234567 and you have rate cards for 2 providers. If provider_a has a rate for +17061 at $0.02/min and provider_b has a rate for +1706 at $0.01/min, a2billing will choose the more expensive provider_a as the rate is a better match. This could require some manipulation of the rate tables to get things to work how you want.

As I said a2billing can also integrate with FreePBX so that you can pass all outgoing calls from FreePBX to A2Billing to allow it to do the routing. You also get the benefit of better CDR reports.

So, if you’re looking for something to do least cost routing for Asterisk then it might be worth checking out a2billing!

6 thoughts on “Least Cost Routing (LCR) with Asterisk and A2Billing

  1. DefLeppard

    Hello, thanks for your this post. I was wondering why LCR was not working for me.

    I have 2 providers, one with 3 digit prefixes and the other with 6 digit prefixes (all USA). I wanted to make LCR work with this setup but every time I dial out the call always goes from the 6 digit prefix provider even though the other one may have lower rates.

    It seems from your post I won’t be able to achieve it. Is there an alternative way to achieve this?

  2. lalaji

    hi, link isnt working, could you please verify link is OK? Many Thanks!

    ops…

    Trac detected an internal error: The environment options “TRAC_ENV” or “TRAC_ENV_PARENT_DIR” or the mod_python options “TracEnv” or “TracEnvParentDir” are missing. Trac requires one of these options to locate the Trac environment(s).

    Traceback (most recent call last):
    File “/var/www/cgi-bin/trac.cgi”, line 20, in ?
    cgi_frontend.run()
    File “/usr/lib/python2.4/site-packages/trac/web/cgi_frontend.py”, line 68, in run
    gateway.run(dispatch_request)
    File “/usr/lib/python2.4/site-packages/trac/web/wsgi.py”, line 87, in run
    response = application(self.environ, self._start_response)
    File “/usr/lib/python2.4/site-packages/trac/web/main.py”, line 382, in dispatch_request
    raise EnvironmentError(‘The environment options “TRAC_ENV” or ‘
    EnvironmentError: The environment options “TRAC_ENV” or “TRAC_ENV_PARENT_DIR” or the mod_python options “TracEnv” or “TracEnvParentDir” are missing. Trac requires one of these options to locate the Trac environment(s).

  3. abigail

    Hi matts, i hope you be fine, how it work fine Lcr, This when say ,could require some manipulation of the rate tables to get things,
    i can use the same rate for 3 provider.

  4. matt Post author

    Yes, you can use rates from 3 different providers and A2Billing will route the call via the least expensive.

Comments are closed.