Guide

HLR Lookups & Network Validation

To confirm a phone number is genuinely active — not just syntactically valid — systems must bridge the web layer with the SS7 telecom signaling network.

How SS7 Network Validation Works

In Part 1 of this guide, we introduced the three states of a phone number: Valid, Active, and Online. Parts 2 and 3 covered how to confirm a number is Valid — structurally correct and assigned to a known carrier range — using E.164 formatting and Tier 1 API validation.

To move from "Valid" to "Active," systems must engage with the Signaling System No. 7 (SS7) network — the protocol suite used by global carriers to route calls, process SMS, and manage billing. SS7 has been the backbone of the public switched telephone network (PSTN) since the 1980s, and despite newer protocols like Diameter for 4G/5G, it remains the primary signaling layer for subscriber lookups worldwide.

Network validation through SS7 bridges the gap between algorithmic format checks and real-time carrier intelligence. It answers the question that no offline library can: Is this number actually live on a carrier network right now?

The HLR Lookup Mechanism

The Home Location Register (HLR) is the central database maintained by each mobile network operator, containing routing instructions for every subscriber. It stores the subscriber's IMSI (International Mobile Subscriber Identity), current serving network, authentication keys, and service entitlements.

An HLR Lookup API translates a standard HTTP POST request into an SS7 signaling request, using the Mobile Application Part (MAP) protocol to send a SendRoutingInfoForSM message to the carrier. This is the same mechanism that SMS centers use to determine how to route a text message to the correct subscriber.

How It Works

  1. 1 Your application sends a phone number to an HLR Lookup API via HTTPS.
  2. 2 The API gateway translates the request into an SS7 MAP SendRoutingInfoForSM message.
  3. 3 The SS7 network routes this message to the subscriber's home carrier HLR.
  4. 4 The HLR responds with the subscriber's status, serving network, and routing information.
  5. 5 The API returns this data as a structured JSON response to your application.

Key Point

This SS7 query pings the carrier's network switch without placing a call or sending an SMS. The user's phone doesn't ring or light up — the process is entirely silent, passive, and frictionless.

What HLR Data Reveals

A successful HLR query returns several critical data points that go far beyond simple "valid or not" checks:

Live Status

The subscriber's current network state:

  • Active — Can receive messages; device registered on the network
  • Absent — Device off or out of coverage; subscriber exists but unreachable
  • Barred — Blocked by the carrier (e.g., unpaid bills, fraud suspension)
  • Invalid — Unassigned or doesn't exist in the carrier's database

MNC/MCC (Network Identification)

Precise identifiers of the serving network. The Mobile Country Code (MCC) and Mobile Network Code (MNC) pinpoint the exact carrier. By comparing the original network (based on the number range) with the current serving network, the system reveals whether the number has been ported — a Mobile Number Portability (MNP) check. This is critical for SMS routing, as messages must reach the current carrier, not the original one.

Roaming Status

Whether the subscriber is on a foreign network via a Visitor Location Register (VLR). Roaming status impacts billing rates, SMS deliverability, and can serve as a fraud signal — for instance, a user claiming to be in the UK while their device is registered on a network in a different country.

Debunking Validation Myths

There are several widespread misconceptions about what phone number validation can and cannot do. The following table separates fact from fiction:

MythRealityImplication
A valid number means an active userNumbers stay valid after deactivation/reassignmentNeed real-time HLR lookups to confirm
Validation guarantees SMS deliveryValidation checks network status, not device conditions or OS blockingTreat as high-probability indicator, not guarantee
HLR lookups slow down appsModern SS7 gateways execute in millisecondsCan integrate into real-time onboarding without UX impact
OTPs make validation unnecessaryOTPs verify immediate possession, not long-term accuracyContinuous validation needed for database accuracy

Important Limitations

An HLR "Active" response does NOT guarantee SMS delivery. The lookup confirms the number is provisioned and the subscriber account is live on the carrier network, but it cannot account for conditions beyond the network switch:

  • Full inbox — the device's message storage is at capacity
  • Radio interference — temporary signal degradation preventing delivery
  • OS-level blocking — the user has blocked the sender or disabled notifications
  • Carrier firewalls — anti-spam filters intercepting messages before delivery

HLR is a probabilistic indicator, not an absolute guarantee. However, it is highly effective at purging dead data — typically identifying 8-10% of a legacy database as disconnected. For businesses running SMS campaigns or maintaining large contact databases, this translates directly into reduced costs and improved deliverability rates. To prove the person at the other end is who they claim to be, you need OTP verification.

Key Takeaway

HLR lookups are the gold standard for confirming a number is live on a carrier network — silently, without alerting the user. Use them to scrub databases before campaigns and to verify high-value transactions. But they cannot prove the person at the other end is who they claim to be. For that, you need OTP verification.