View file | ||
---|---|---|
|
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Overview
Least Cost Routing (LCR) allows users to intelligently select the ITSP provider to route the traffic based on the cost for a certain destination number.
...
When all the elements above are ready, you need to create an LCR carrier for each rate list and then add few lines in your routing plan to look up the LCR table (using the "lcr" application) and perform the LCR routing.
Prepare the rate list CSV files
The contents of the CSV file are expected to be divided in 8 columns:
...
See below 2 CSV example files for "Carrier A" and "Carrier B"
carriera.csvcsv
...
...
carrierb.csv
...
...
SAMPLE CSV →
View file | ||
---|---|---|
|
Create LCR Carrier
Go to "Configuration" -> "Routing" -> "LCR Carriers", add a new LCR carrier and then choose from "SIP Trunk/Load Balancing List" the created SIP Trunk "Trunk_To_Carrier_A":
...
...
Click the "Save" button:
...
...
Click the "Upload" button in "Carrier Rates File" to upload rate list:
...
...
Repeat above steps for all the rate lists.
...
Using the LCR Database
Once the LCR internal database is created, you can start using LCR routing now from both the advanced and basic routing plan engines:
Basic Dial Plan
...
Advanced Dial Plan
|
|
|
|
|
e.g. when number "17771234567" is dialed and hit above routing plan, "17771234567" is passed to the lcr look up function. The lookup result is saved to channel variable "lcr_auto_route". Since the rate of "1777" from CarrierA is 0.0069 and 0.0079 for CarrierB, CarrierA will be tried first; if the carrier is not available (e.g the SIP trunk is down), then CarrierB will be tried.
...
When you change the dialed number to "17781234567", since CarrierB for "1778" is cheaper than CarrierA, then CarrierB will be tried first.
Using Load Balancing List
If you get 2 or more SIP Trunks from the same ITSP provider, you can setup a load balancing list using the same rate list.
...
In the Load Balancing SIP Trunk List "SIP_Trunk_List_C", there are 2 resources: SIP Trunk C1 and C2 and you can set their "weight" to decide which one will be used more often.
...
...
Create an LCR Carrier using the load balancing list as the destination:
...
Whenever this carrier is chosen the calls will be load balanced across all SIP trunks members of the load balancing list and according to the specified weight and availability of each one.
Update of rate list for a specific LCR carrier
Rates are always changing, when an update comes for one ITSP provider, please:
Prepare the updated rate list CSV file
Remove the out-of-date "Carrier Rates File", then all the rates related to this LCR carrier will be removed from internal database
Upload the new CSV file