Blog
Mobile number portability: why a prefix no longer tells you the carrier
How number portability works, how networks route ported numbers, why plan data goes stale, and how to read the ported flag in a live phone lookup.
Updated 2026-11-24
Mobile number portability (MNP) lets people keep their number when they switch operator. The consequence for software is simple and often forgotten: a prefix used to point to a network, and it no longer does. A number from a block that was opened for one operator can be served today by another. If your code reads the carrier from the digits, it will be wrong for exactly the customers who changed their mind about their provider.
What portability changed
Telephone numbers are handed out in blocks. Before portability, a block meant an operator, so the first digits of a mobile number told you who carried the call. Portability broke that link on purpose. A subscriber who ports out keeps the number, and the number stays inside its original block while the network that serves it changes.
| Term | Meaning |
|---|---|
| Donor operator | The operator the number leaves |
| Recipient operator | The operator the number joins |
| Range holder | The operator the number block was first assigned to |
| Serving operator | The operator that carries the number today |
Plan data knows the range holder. Only the network knows the serving operator. Everything else in this article follows from that gap.
The rules behind it
Portability is a regulatory right in many countries, and the details differ.
- European Union. Article 106 of the European Electronic Communications Code, Directive (EU) 2018/1972, gives end users the right to keep their number when they change provider, and obliges providers to support it.
- United States. The FCC's local number portability rules, in 47 CFR Part 52, require carriers to support portability. Wireless number portability took effect in November 2003, including ports between wireless and landline carriers.
- Elsewhere. Many other countries run comparable schemes. Some limit porting to the same country, and a few have extra rules for moving between fixed and mobile service.
A ported number never changes country. Its country calling code and its E.164 form stay exactly the same.
How networks route a ported number
When a call or message comes in for a number, the sending network needs to know which network owns it today. Two approaches exist, and countries use one or the other, sometimes both.
- Central database. A shared record lists ported numbers. In the United States and Canada, the Number Portability Administration Center (NPAC) records each ported number against a Location Routing Number (LRN), a ten-digit number that identifies the switch now serving it. Operators query the data, or receive copies, before routing.
- Routing through the old network. The donor or range-holder network receives the call and passes it on. The industry names for the variants are onward routing, call drop back, query on release and all-call query. They differ in who asks for the information and when.
For the sender, the result is the same: the call arrives at the right network. For a developer reading a number's digits, none of it is visible, because it happens in the routing layer below the number.
Why plan data goes stale
Numbering plan data is compiled from what regulators publish, and Google's libphonenumber carries it. For many countries it also carries a table that maps number prefixes to the operator that first received them. That table is useful and honest about its limits: it describes the origin.
- The carrier is the range holder. At the basic level of the Qelka phone API,
carrier.nameis the operator the range was originally assigned to, when the plan data names one.carrier.sourceisnumbering_plan. - Some numbers have no carrier at all. In the United States, libphonenumber's data names no range holder for numbers in the states, so
carrier.nameisnullthere. - The line type describes the range. A landline number ported to a mobile operator keeps the type of its original range in plan data.
- Porting is invisible.
portedisnullat the basic level, because a static dataset cannot detect a move that happened after the range was assigned.
None of this is a defect. It is the right answer to the question "what was this range for?". It is the wrong answer to "who serves it now?".
How a live lookup sees porting
A live lookup asks an upstream number-lookup provider about the number at the time of the call. The provider reads current network and porting data, so it can report the serving operator.
| Field | Basic level | Live level |
|---|---|---|
carrier.name |
Original range holder, if named | Operator serving the number now |
carrier.mcc, carrier.mnc |
null |
Mobile country and network codes (ITU-T E.212) |
ported |
null |
true when the number left the operator its range was assigned to, false otherwise |
carrier.source |
numbering_plan |
live |
| Credits | 1 | 3 |
An example response for a ported number looks like this. The values are illustrative:
{
"object": "phone",
"input": "+14155550123",
"valid": true,
"status": "valid",
"e164": "+14155550123",
"line_type": "mobile",
"carrier": { "name": "Example Wireless", "mcc": "310", "mnc": "000", "source": "live" },
"ported": true,
"credits_used": 3,
"cached": false
}
ported: true means the number has moved away from the operator its range was assigned to. It says nothing about when, or why. A live lookup sends the number to the lookup provider, so reserve it for decisions where the serving network matters. See HLR lookup explained for how network queries work.
Where it changes a decision
Sending SMS
Operators price terminations differently, and a message platform chooses its route from the serving network. A route picked from the prefix can miss for ported numbers: it costs more, or it fails. Run a live lookup before bulk SMS campaigns to route and price by the real carrier.
Reviewing risky account changes
A number added to an account moments before a recovery request is a classic step in takeover attempts. A number ported in the last day, with a new device and a new location, adds weight to the review. Treat it as one signal: millions of people change operator for ordinary reasons. Portability does not describe a SIM replacement either, so it does not replace a SIM swap check with the operator.
Cleaning lists
Group a list by serving carrier to see where deliverability problems concentrate. Basic checks catch impossible numbers cheaply, and the live level adds the carrier for the rest. Clean a phone number list shows the order of steps.
Do not confuse porting with recycling
Porting moves a live subscription between operators. The person stays the same. Recycling is different: when a number is disconnected, an operator can assign it again after a period, and a new subscriber then holds a number your records link to the old one. A lookup that shows a carrier cannot tell you whether the person changed. In the United States, the FCC established a Reassigned Numbers Database so callers can check whether a number changed hands. For consent and for account security, a recent one-time code is the evidence that counts.
What to store and what to read live
| Keep in your database | Look up when needed |
|---|---|
| The E.164 number | The serving carrier and ported flag |
| The country, from the lookup | The line type, when it affects delivery |
| When the number was last verified by code | A new live lookup, with "fresh": true to skip the 7-day cache |
Store the carrier only with the date you read it. It is a fact that expires, like a location. E.164 explained covers how to store the number itself.
A minimal check
const response = await fetch('https://api.qelka.com/v1/phone', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ phone: '+14155550123', level: 'live', fresh: true }),
signal: AbortSignal.timeout(10000),
})
if (response.ok) {
const result = await response.json()
const reviewNeeded = result.ported === true && result.line_type === 'mobile'
console.log(result.carrier.name, reviewNeeded)
}
If the provider fails the API answers 502 upstream_unavailable and does not bill the call, so fall back to the basic result. The free carrier lookup shows the carrier for any number, and find the carrier of a phone number explains the difference between the two levels. For the field-by-field reference, see the phone API reference and the glossary entry on mobile number portability.
Where to go next
- Phone number validation for the layers that come before a live lookup.
- Mobile, landline or VoIP for line types and why they go stale.
- US phone prefixes: who holds them for what NANPA's public file shows about range holders.
Frequently asked questions
What is mobile number portability?
How do I know if a phone number was ported?
ported flag. With Qelka, ported is true or false at the live level and null at the basic level, which cannot see porting.Does porting change a phone number's country or format?
Is a ported number suspicious?
ported as one input to a review, never as a reason to refuse on its own.Does the carrier in a basic lookup show who serves the number today?
carrier.name is the operator that originally received the number range, and it is null when the numbering plan data names none. For the operator serving the number now, use the live level, which returns it with carrier.mcc, carrier.mnc and ported. The field carrier.source tells you which of the two you are reading.Is a ported number the same as a recycled number?
Put this check in your product
Get an API key in under a minute. 100 free credits every month, no card required.
- 100 free credits a month
- No card
- Test keys spend nothing
- Cancel any time