找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1149|回复: 1

Least Cost Routing (LCR) with Asterisk and A2Billing

[复制链接]
发表于 2011-11-13 05:03:32 | 显示全部楼层 |阅读模式
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!

 楼主| 发表于 2011-11-13 05:04:42 | 显示全部楼层

Automatically create A2Billing rate card from callwithus rate file

Here is a php script designed to download the callwithus.com rate file and create a rate card in a2billing from it. It’s designed to work with the latest version of A2Billing – version 1.4.1
Here is a link to the script – http://sysadminman.net/misc/cwu-rates.html
If you copy and paste the script in to a file on your A2Billing server called /tmp/cwu-rates.php you can then run it by doing -
cd /tmp
php cwu-rates.php

Before running it you will need to set the correct dabase, user and password name for a2billing at the top of the script. Also, the default markup for your ‘sell rate’ is 50% but you can alter this by modifying $markup.
If  everything went well you should then find a new rate card created in A2Billing. You will need to set a trunk for the rate card and also assign it to a call plan before it can be used. Obviously check that the rates it has created look good too!
Also, I would suggest that before you run the script you take a backup of you A2Billing database – just in case things go wrong.
This script can be easily modified to work with other providers that provide a rate file that you can download.

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|BC Morning Website ( Best Deal Inc. 001 )

GMT-8, 2026-5-28 12:13 , Processed in 0.013312 second(s), 16 queries .

Supported by Weloment Group X3.5

© 2008-2026 Best Deal Online

快速回复 返回顶部 返回列表