Least Cost Routing explained
Back to Articles
Tutorial VoIP SIP Reference LCR Call Routing

Least Cost Routing explained

April 18, 2018 3 min
Aivis Olsteins

Aivis Olsteins

Longest Prefix Match

Typically call routing in Telecoms, including VoIP is done based on the longest prefix match basis. That means if there are several prefixes matching number, the longest one will be the right match. Let's take an example this routing table:

(table1)

Destination Code Name
1US / Canada
1212US – New York
44UK
447UK Mobile
447766UK Mobile Vodafone

 

If the call is made to number 12127773456, it is designated to New York, because it matches both US/Canada code 1 and New York prefix 1212. However, the length of New York prefix 1212 is longer (4 digits) than US/Canada code 1 (1 digit), so New York takes precedence. If the call is made to number 13215551200, it is designated to general US/Canada breakout because the above table does not include specific breakout for Florida (which is 1321).

The call to 44712345678 will be similarly designaed to UK Mobile, whereas call to 44776612345 with be UK Mobile Vodafone because it matches prefix 447766.

Route Cost

Each destination has its cost. Lets add a cost column to the example table:

(table2)

Destination Code Name Cost (units)
1US / Canada5
1212US – New York6
44UK20
447UK Mobile35
447766UK Mobile Vodafone30

 

Therefore call to New York will cost 6 units, whereas to any other US/Canada destination starting with 1 it will be 5 units.

More than one choice

There can be more than one provider of any given destination, and the cost of these providers might vary. Lets add cost columns for more route providers:

(table3)

Destination Code Name Cost Provider 1 Cost Provider 2 Cost Provider 3
1US / Canada556
1212US – New York656
44UK2025N/A
447UK Mobile35N/A30
447766UK Mobile Tele230N/A30

 

Above example shows 3 different priced routes to US and NY, and some routes to UK. Note, that not all providers can offer all routes. In the example above provider 2 does not offer UK Mobile at all (incl. Vodafone), and provider 3 does not provide UK routes except mobiles.

Least Cost Routing

Least Cost Routing (LCR) is method of finding the cheapest route for the given destination based on several available routes and the costs associated with these routes. The tables as above are used to determine the cheapest routes to the specific destination. Note, that there can be specific maximum prices. For example, user may be willing to pay maximum 5 units for calls to US/Canada. Therefore Provider 3 is out of routing because its cost is 6.

Since the real life code tables are far larger than example (can have 20-50k rows), the problem of finding cheapest route becomes more complex.

Code Range Normalization

Additionally, there is the problem of so called normalization. Not all providers have exactly same breakouts. Lets see 2 table below:

 

Provider 1

(table4)

Destination Code Name Cost Route 1
44UK20
447UK Mobile30
449UK Premium100

 

Provider 2

(table 5)

Destination Code Name Cost Route 1
44UK25
449UK Mobile35

 

As you see, Provider 1 will ask price of 100 units for all calls going to UK Premium service numbers starting with 449, whereas Provider 2 will obviously ask only 25 because it does not have specific prefix, and call fill fall into general 44 range.

 

In real life the differences are very frequent and must be addressed when building a LCR system.

To summarize, LCR system needs to be able to provide following functions:

  1. To have up-to-date routing and cost information and be able to serve in real time;
  2. Respect longest prefix match requirement;
  3. Respect maximum allowed price requirement;
  4. To be able to return least cost choices in the order of increasing costs, i.e. from cheapest to most expensive;
  5. To take care of code range normalization, i.e. differences between code breakouts from various providers.

 

 

 

 

 

 

Share this article

Aivis Olsteins

Aivis Olsteins

An experienced telecommunications professional with expertise in network architecture, cloud communications, and emerging technologies. Passionate about helping businesses leverage modern telecom solutions to drive growth and innovation.

Related Articles

Case Study: Global Communications Company

Case Study: Global Communications Company

A leading communications company used our cloud Voice platform to send 30 million OTP calls per month to their customers, resulting in cost reduction and incrased conversion

Read Article
Bridging The Delay Gap in Conversational AI: The Backpressure Analogy

Bridging The Delay Gap in Conversational AI: The Backpressure Analogy

Conversational AI struggles with the time gap between text generation and speech synthesis. A “backpressure” mechanism, akin to network data flow control, could slow text generation to match speech synthesis speed, improving user interaction.

Read Article
How Voice AI Agents Can Automate Outbound Calls and Unlock New Opportunities for Businesses: A Deeper Dive

How Voice AI Agents Can Automate Outbound Calls and Unlock New Opportunities for Businesses: A Deeper Dive

AI voice agents transform healthcare scheduling by reducing costs, administrative tasks, and no-shows. They offer 24/7 service, multilingual support, proactive reminders, and valuable insights, improving efficiency and patient experiences.

Read Article
How to Fix Your Context: Mitigating and Avoiding Context Failures in LLMs

How to Fix Your Context: Mitigating and Avoiding Context Failures in LLMs

Larger context windows in LLMs cause poisoning, distraction, confusion, and clash. Effective context management (RAG, pruning, quarantine, summarization, tool loadouts, offloading) remains essential for high-quality outputs.

Read Article

SUBSCRIBE TO OUR NEWSLETTER

Stay up to date with the latest news and updates from our telecom experts