Number Portability (LNP) Lookup and Routing
A dialled number no longer identifies its carrier. A subscriber can keep a geographic number while moving to a different operator, and the network has to discover the current serving network before it can route the call. Where that discovery is missing or stale, calls fail in a way that looks like a carrier fault: the number is valid, the format is right, and the receiving network simply refuses a call delivered to the wrong place.
What LNP Actually Changes
Number portability separates the number a person dials from the network that serves it. In its common form, a query against a portability database returns a location routing number, often described as an LRN, which identifies the current network. The call is then routed using that routing number while the original dialled digits are carried forward so that the terminating network still knows which subscriber was intended.
This is why a routing table built only on number prefixes eventually goes wrong. A prefix may once have implied a particular carrier, and after a port the same prefix can lead anywhere. The route decision needs the result of a lookup, and the original digits must survive the lookup rather than being replaced by the routing number at the sip level.
| Element | Role | Failure if ignored |
|---|---|---|
| Dialled number | The number the caller entered | Subscriber identity is lost |
| Portability query | Returns the current serving network | Calls go to the old carrier |
| LRN or routing number | Identifies the network to route toward | Route selection has no target |
| Original called party | Carried alongside the routing number | Terminating network cannot find the subscriber |
| Cache entry | Avoids a query on every call | Stale entry after a port completes |
| Porting window status | Marks a number in transition | Temporary routing is not applied |
When to Query the Database
Query timing is a design decision with two competing costs. Querying on every call gives the freshest answer but adds latency to call setup and creates a dependency on the database being available. Querying once and caching is fast but can route to the previous carrier for as long as the cache lives. Most designs query at the point where the call enters the operator's network and then cache the answer for a bounded period.
The cache lifetime should be shorter than the time a number is likely to remain stable and long enough that the database is not overloaded. It is also worth distinguishing a positive result from a negative one. A query that says a number has not been ported is as cacheable as one that says it has, but an error or timeout should never be cached as a negative answer, because that would send every subsequent call down the wrong route for the whole cache period.
The Porting Window Is a Special Case
During a port there is a period in which the number may be reachable through either network, and the exact hours are agreed between the operators. A routing design that treats the database as absolute will break calls during this window. A design that recognises a porting-in-progress result and can temporarily prefer one network, then switch at the agreed time, keeps calls working while the administrative change completes.
- Query at the network boundary rather than at every internal hop
- Cache positive and confirmed negative results, but never cache errors
- Set a cache lifetime shorter than the expected stability of a number
- Preserve the original dialled digits alongside the routing number
- Handle a porting-in-progress result with a temporary route
- Alert on query errors as a routing fault, not a nuisance
- Log the lookup result with the call so a failure can be reconstructed
Routing Table Design
A workable table separates three decisions. The first decides whether the number is one that can be ported at all. The second obtains the current network through a lookup. The third selects a carrier or trunk group based on that result. Collapsing these into one large prefix table produces a configuration that is hard to reason about and impossible to change safely during a porting window.
Fallback deserves explicit attention. If the lookup service is unavailable, the platform can either fail the call or route on the historical prefix. Neither is universally correct. Failing the call is safe but visible; routing on the prefix may work for unported numbers and fail for ported ones. The choice should be deliberate, documented, and different for business-critical numbers than for general traffic.
| Design choice | Simple approach | More robust approach |
|---|---|---|
| Lookup timing | On every call | At entry, with bounded caching |
| Cache result | All answers cached the same | Errors excluded; negatives bounded |
| Route construction | One large prefix table | Separate eligibility, lookup, and carrier choice |
| Lookup failure | Fail the call | Policy-based fallback with an alert |
| Porting window | Treated as an ordinary result | Temporary route with a switch time |
| Diagnostics | Call succeeded or failed | Lookup result logged with each call |
Debugging a Suspected Porting Fault
The symptom of a stale portability answer is distinctive: calls to one number or a small group of numbers fail while calls to neighbouring numbers succeed. That pattern points at a per-number lookup rather than a trunk or a general routing problem. The next step is to compare the lookup result held by the platform with the current authoritative answer and check the age of the cached entry.
It is also worth confirming which number was actually used in the query. A platform that strips a prefix before lookup, or that normalises the number into a different national format, may be querying a number that is not the one that was ported. This connects directly to dial plan consistency, because a number represented in three formats across three systems will produce three different lookup outcomes.
Evidence to Collect
A useful fault record contains the dialled digits, the number used for the lookup, the returned routing number, the cache age, the carrier selected, and the response from that carrier. With those six items the question of whether the fault lies in lookup, cache, route selection, or carrier acceptance can be answered without speculation. Without them, the same fault is often escalated to the carrier first and left there.
- Confirm the exact digits used in the portability query
- Check the age and source of the cached answer
- Compare the selected carrier with the current serving network
- Preserve the original called party in the outbound request
- Apply the porting-window route if a port is in progress
- Escalate with lookup results attached, not only with the call ID
Keeping the Design Understandable
Portability routing is a chain of decisions, and an operator facing a failed call needs to see where the chain broke. A configuration that hides the lookup inside a single large rule makes that impossible. Documenting the eligibility check, the query, the cache, and the carrier choice as separate steps means the engineer can inspect each one, and it means a change to one step can be tested without disturbing the others.
- Keep eligibility, lookup, and carrier choice as separate configuration steps
- Record the cache age alongside each lookup result in call records
- Test the fallback policy deliberately, not only during a real outage
- Keep a contact for the database provider in the escalation path
- Review the cache lifetime whenever porting volumes change
- Re-test routing after the agreed porting window closes
Redstone Approach
Redstone REX series IP-PBX platforms and RGW gateways support number translation rules, carrier and trunk-group routing, and configurable number presentation so that portability results can be applied without losing the original called party. Routing policies can separate lookup, carrier selection, and fallback behaviour, and call detail records capture the digits and route used for each attempt. SBC deployments can terminate carrier interconnects while keeping internal dial plans unchanged.
Redstone Systems, Inc. founded in Delaware, USA in December 2002, has been the ODM vendor for many well-known communications companies, serving the Southeast Asian market. In 2020, Redstone Systems will begin to return to the North America market with its self-developed brand.
Redstone has a complete product line of intelligent voice gateways, providing IP-PBXs, analog VoIP gateways (FXS/FXO), digital VoIP gateways (E1/T1), border appliances, and session boundary controllers (SBCs).
With advanced technology in digital signal processor (DSP), speech coding and speech processing, as well as efficient operational tools such as cloud remote management, auto provisioning, Redstone gateways are widely used in markets of enterprise communications, cloud communications, call centers, operators’ IMS/SIP trunks, bringing users friendly, efficient and reliable communication experience.
For more information about Redstone, You can follow us on Facebook, Linkedin, and Youtube to be the first to get the latest news.

Current Location :

