Signal & Syntax · Guide

Mobile Number Portability and SMS Routing

A ported number keeps its digits and changes networks. Routing on the number's range sends the traffic to the wrong operator.

5 minUpdated ScoreMachine team

What MNP Is

MNP (mobile number portability) lets a subscriber keep a phone number when switching operators. The digits stay the same, and the network behind the digits changes. Regulators mandate MNP in the UK, the EU, the US and the UAE. Ofcom sets the UK rules, and the FCC sets the US rules.

Porting happens inside one country. A UK number stays a +44 number after any number of ports. A number ports more than once over its life. Each port has its own donor and recipient.

Countries differ on where the porting record lives. In one model, a central porting database answers before each call or message is routed. In the other, the donor network forwards ported traffic onward. The UK uses onward routing through the donor network. Both models reach the serving network, and onward routing adds a hop.

The US also allows porting between fixed and mobile lines. A US number's range then says less about the number's line type.

Range Holder and Serving Network

Two operators matter for every mobile number. The range holder is the operator the regulator allocated the number's range to. The serving network is the operator holding the subscription today.

For a number that has never ported, the two are the same operator. After a port, the range holder stays the same and the serving network changes. The serving network is always the latest recipient.

Example

Range holder O2 → Carrier Vodafone

The example number +44 7911 123456 sits in a range allocated to O2. Vodafone holds the subscription after porting. Routing on the range sends the traffic to O2. A lookup built on the range alone still returns O2 for the number. That answer went out of date on the day of the port.

Routing tables built from national numbering plans map ranges, so those tables name the range holder. The range still carries useful facts. The range sets the number's country, the line type on first reading and the original operator. What the range no longer sets is the network the traffic terminates on.

Donor and Recipient Networks

Each port has two sides. The donor network releases the number. The recipient network takes the number over.

On a first port, the donor network is also the range holder. On a second port, the previous recipient becomes the donor. The range holder takes no part in a second port, and stays the range holder.

In the UK, the subscriber gets a PAC (porting authorization code) from the donor network. The subscriber gives the PAC to the recipient network, which submits the request. The port completes within one business day. In the US, the subscriber gives the recipient network the account number and a port-out PIN. A simple US port also completes within one business day. Once the port completes, SMS and calls terminate on the recipient network. The porting database records the date of each port. Traffic routed from a stale table keeps reaching the donor network after that date.

RoleChanges on each portIn the example
Range holderNeverO2
Donor networkYesO2, on the first port
Recipient networkYesVodafone
Serving networkYes, to the latest recipientVodafone

What Routing on the Range Costs

A routing table built on ranges maps each prefix to one operator. For a ported number, that operator is the range holder, not the serving network.

Traffic then reaches the range holder first. Under onward routing, the range holder forwards the traffic to the serving network. Each forward adds a hop, and each hop adds cost and a point of failure.

Where the range holder does not forward, the message is rejected. On a route billed on submission, each rejected message still costs the sender. The delivery receipt arrives after the charge, as UNDELIV or REJECTD. How A2P SMS reaches a handset traces every hop and receipt. Voice follows the same logic: a call routed on the range reaches the range holder first. A2P traffic pays twice, once in extra hops and once in messages that never arrive.

The fix sits before submission. Resolve the serving network for each number, then route on the serving network. The range holder then drops out of the path.

MNP Lookup and HLR Lookup

Two lookups answer porting questions from different sources. An MNP lookup reads porting data and returns the serving network. An HLR lookup queries the serving network's register for the subscription's state.

MNP lookupHLR lookup
SourcePorting dataThe operator's subscriber register
Question answeredWhere does the traffic go?Is the subscription live on the network?
ReturnsThe serving networkIMSI, serving switch, MCC and MNC, absent-subscriber status
Travels overPorting database or data feedSS7

The MNP answer tells a router where to send the traffic. The HLR answer tells a router whether the handset is attached. The two lookups also differ in reach. An MNP lookup covers every number in the porting data. Fixed lines count where fixed porting exists. An HLR lookup covers mobile numbers on networks the query reaches.

An MNP lookup still answers for a handset switched off for a week. The porting record stays the same. A file where routing and activity both matter needs both answers. HLR lookup vs eHLR covers the register side in full.

Screening a File Before Submission

score.phone.validation.mnp returns the serving network in carrier. ported comes back as true or false beside carrier. mcc and mnc return the serving network's mobile country and network codes. Line type, country, location and time zone come back on the same call.

Example

"phone_validation_mnp": { "line_type": "mobile", "carrier": "Vodafone", "ported": true, "mcc": "235", "mnc": "91", "country": "United Kingdom", "location": "London, England", "iso_code": "GB", "timezone": "UTC+1", "e164_format": "+447911123456", "international_format": "+44 7911 123456", "local_format": "07911 123456" }

Route each number on carrier, and every message goes straight to the serving network. ported separates the numbers a range-based table would misroute. Numbers where ported is false still route on carrier. For those numbers, the range holder and carrier name the same network. mcc and mnc let a routing table key on codes in place of operator names. Operator names change with a rebrand, and the codes stay the same. One request takes up to 10,000 numbers. A whole file resolves before the first message leaves.

Terms in this guide

Frequently asked questions

Run the Checks on Your Own List

Upload a file in a free workspace, or walk through your use case with our team.