One question we hear from our clients regularly is this: How can I save money on telephone calls? With the advent of Voice over IP there is a dramatic new opportunity to aggressively shop the market for a better deal. The more minutes you use each month, the more vital and urgent it becomes to find the least expensive quality routes for your traffic.
But let us assume for now that you have already established relationships with a few quality, low-cost carriers. While one carrier is likely to become your primary route, handling most of your traffic, it is also likely that your primary carrier will not have the best rates to certain specific destinations. You could configure your telephone system to route certain area codes and prefixes to the alternate carriers, but that is a manual effort that requires regular updates. Why not automate?
The solution to this puzzle is Least Cost Routing or LCR. By storing the information in a database we can leverage the power of Adhearsion and Asterisk to make the best decision for each and every call that passes through your application.
Creating a simplistic LCR is pretty easy. The pricing information you get from your carriers will vary from company to company, but they should always contain at least two critical pieces of information: Telephone Number Prefix and Route Cost. The Telephone Prefix is the string of numbers that determine how to apply the route to the call. For example, Mojo Lingo’s phone number is +1.404.475.4840. The prefix in the carrier’s table might be +1.404, indicating a route to the Atlanta area. Carriers often publish routes that overlap. For example, the carrier may publish a blanket rate for the entire United States (+1) but have specific rates for certain cities (eg. +1.202 for Washington DC or +1.303 for Denver, CO). The route that applies is always the one that matches the most digits with the number that was dialed.
More sophisticated LCR can take into account additional criteria. Sometimes the cost of the call depends on the source of the call. Within Canada, for example, extra tariffs apply to calls placed from within Canada to destinations within Canada. Other carriers’ routes vary based on whether the call is intra-state (both endpoints are within the same state) or inter-state (across state lines). With complexities such as these, it becomes important to take into account the caller ID of the caller, which is usually the basis for determining the cost of the call.
Some companies sell premium routes with higher audio quality as well as less expensive routes with lower promised quality. LCR can take this additional information into account per-customer, making decisions based on the minimum quality promised to various customers. This may be especially important to calling card operators, where the quality of a calling card is one factor end-users use when determining whether to continue adding funds to their cards.
Finally a good LCR should be able to provide information on the preferred order of fallback routes. Someday you will experience trouble placing calls through your preferred carrier, whether due to network issues or carrier trouble. Your LCR can provide you the ability to automatically select the next least expensive route and complete the call without any interruption to your customers.
One last important point to consider: route costs change over time as your carriers negotiate their own interconnects. An important part of deploying a Least Cost Routing engine is the ability to update the route costs on a regular basis. Mojo Lingo recommends automating the entire process wherever possible, including download, parsing and updating the database as often as your carriers release new information.
In Part 2, we will take a look at an implementation of LCR with Adhearsion and Asterisk. This technical HowTo article will go into more detail on creating LCR using Adhearsion and Asterisk.