← field notes

How a phone number gets ported

number-portability sim-swap sms-authentication telecom-routing

I buy prepaid SIMs in batches for the proxy lines I run in Singapore, and a fair share of them arrive carrying somebody else’s life. Within a week of registering, a fresh number picks up a parcel notification, a login code, a clinic reminder. None of it is for me. That number belonged to a person for years and then went back into a pool.

Which is a cheap way into a question almost nobody asks: what is a phone number, structurally. It is a key in a routing database. Porting it edits a row. Nothing else happens.

The pointer, and who holds it

The digits used to be the route. Leading digits chose a region, the middle ones an exchange building, the last four a pair of wires inside it. A switch read the number left to right and walked towards you, which welded every number to whichever company owned that exchange. Leaving meant a new number, and a new number meant telling everyone you knew. That is a switching cost, and switching costs are worth money to the party collecting them.

Portability severed the link between the digits and the destination, so something else has to hold the mapping.

In North America that something is a central portability database, operated under contract by iconectiv and mirrored locally by every carrier. Each ported number carries a Location Routing Number, ten digits shaped like a phone number that identify a switch rather than a subscriber. Before a call is delivered, a network on the path runs an LNP dip. If the number has ever been ported, the dip returns the LRN and the call follows it. The dialled digits become a label the network has stopped routing on.

Other countries use different plumbing. Onward routing hands the call to the original carrier and lets it forward, which costs less and adds a hop. The property survives every variant: a number resolves to a network through a lookup, and the lookup is editable.

A mandate, implemented cheaply

None of this came from the industry.

In the United States portability arrived as an obligation in the Telecommunications Act of 1996, and the wireless half did not go live until November 2003, after years of argument about cost. Singapore got full mobile number portability in June 2008, run through a central clearing arrangement under the regulator.

The sequence is the interesting part. A regulator orders an outcome, and what gets built is the cheapest thing producing it. Portability is a lookup layer bolted on top of a numbering plan that still behaves as though the digits mean something, and most of what follows descends from that.

The transaction, and the clock around it

A port is an update request against the routing record, wrapped in paperwork.

The gaining carrier raises it. The losing carrier gets a defined window to accept or reject, and regulators have had to state in writing that rejection exists for mismatched details and not for retaining a customer. The direction is deliberate. You never ask your current provider for permission, because a provider holding a veto would use it.

Then the clock, which is where the design tightens. FCC rules put a simple wireless port at two and a half hours and a simple wireline port at one business day. Singapore aims to complete inside one working day. Those figures are policy targets. A port taking three weeks is a port people abandon, and competition only functions when leaving is easy.

So the system was tuned for speed on purpose, and every hour taken out of the clock is an hour of human scrutiny taken out with it.

What guards the record

Very little, and for the same reason.

A port request gets validated against a handful of account facts. The name on the account, the service address, the account number, and a port protection passcode if the holder ever set one. Most of that is printed on a bill, and a bill arrives in a mailbox other people can reach.

The assumption underneath is that the requester is the account holder and the realistic failure mode is a typo. Fair enough, when the worst consequence of a mistaken port was somebody losing dial tone for a day.

I am not going to describe how those checks get worked around, and it is beside the point anyway. The facts guarding that row are few and static, and most of them are already in circulation.

The same edit at a smaller scope

There is a version that never leaves your carrier, and the two get conflated.

Inside a mobile network the dialable number, the MSISDN, maps to a subscriber identity on the SIM, the IMSI, and that mapping lives in the operator’s own database. Issue a replacement card and the mapping gets rewritten. Same number, different piece of plastic.

A port rewrites which operator holds the record. A SIM swap rewrites which card the record resolves to. Different scope, identical consequence: a database row decides which physical object receives your text messages, and the row is editable through a process built for customer service.

The promotion nobody voted for

The number was a routing label. Over about fifteen years it became a proof of identity by drift.

Password reset by text. Account recovery by text. Messengers that bind a whole account to a number. A bank calling to confirm a transfer. Sitting on top of that is a scoring industry deciding how much to trust a signup by the kind of number in the field, which I have taken apart on its own, and beneath it the techniques for reading a code in flight, which I covered separately.

This is the layer under both. Before anything intercepts a message, something decided where that message goes. That decision is a row with a fast update path and a light check on the front.

So an edit to a routing record is an edit to who receives every credential reset for every account trusting SMS. The blast radius runs well past the handset.

There is a measurement, which is rarer than it should be. In 2020 a group at Princeton opened 50 prepaid accounts across five US carriers and tried to move each number onto a card they controlled, with the carrier’s authentication in the way. 39 of the 50 succeeded, and all five providers accepted at least one challenge a stranger could answer.

What got added afterwards

Every defence that exists here is an addition, and most of them are off by default.

The useful one is a lock: a flag on the account refusing port requests until the holder lifts it through a channel harder to fake than a phone call. Carriers each brand it differently. It is the best setting on your account and it is buried four screens deep.

Then a port protection code, separate from the voicemail PIN and from the login password, existing only to authorise a move.

Then notification, which is the piece that got mandated. The FCC adopted rules in late 2023 requiring proper authentication before a SIM change or a port, plus immediate notice to the customer. Notice what that concedes. It does not prevent the change. It shortens the interval between the change and the customer finding out, which is a smoke alarm where you wanted a fire door.

The honest answer sits outside all of it: stop depending on the number. An app generated code never crosses a carrier. A passkey goes further, since the credential is bound to the site it belongs to and never leaves the device, leaving nothing to redirect. Where a service insists on keeping your number, at least stop it being the recovery path.

Numbers come back around

Numbering is finite and administered. Blocks get allocated to carriers, and a number surrendered by one subscriber ages and then reappears attached to somebody new. The US floor is 45 days. Some carriers wait longer. None of them wait long enough for the internet.

The FCC eventually built a Reassigned Numbers Database, live since November 2021, so a business calling a number can check whether it was disconnected since they last saw it. That exists because companies kept ringing strangers who had inherited a number, and the strangers complained.

The same Princeton group later sampled 259 numbers available to new subscribers at two carriers. 171 of them still had live accounts attached somewhere online.

Neither party can repair that. The previous holder no longer controls the handset, so a recovery path they configured years ago now terminates on a stranger’s hardware. The stranger has no way to tell a bank they are not the customer and no standing to ask. The correct move on abandoning a number is to unbind it from every account first, which requires an inventory of every account you gave it to, which nobody keeps.

Why this is structural

I keyed my own line reconciliation on the phone number for about a year, because the number is what a customer quotes at you when something breaks. Then a card failed in a modem, the carrier reissued a replacement on the same account, and the script produced two lines where there was one. The card identifier is the durable field. The number is a lease. I had built the stable system on the value most likely to be reassigned.

Every component in this stack does the job it was handed. The routing database routes. The portability rules made switching cheap and fast, which was the right call and worked. The ageing pool exists because numbers would otherwise run out.

The failure sits at the joint. A record engineered for rapid update through a customer service process is load bearing for identity across half the internet, and no single party owns that combination. The carrier never asked to become an identity provider. The regulator that mandated fast ports was thinking about competition in a decade when a phone number unlocked a phone call.

More on the machinery running underneath the ordinary internet at The Hidden Internet.

Get new guides and videos first — join the Telegram channel.

watch
The Hidden Internet on YouTube

Every field note starts as a short documentary. Watch the systems in this piece explained on screen.

subscribe →
read on
More field notes

The rest of the series on how the modern internet detects, tracks, and sorts the traffic that reaches it.

browse the archive →