HLR Lookup: Verify Carrier, Porting and Line Type Before You Send
An HLR lookup asks the subscriber's home network one question — is this number attached to a live network, which operator is serving it, and what kind of line is it — and answers in milliseconds without delivering a message. This page documents exactly what SMSRoute's HLR lookup returns, how the underlying SS7 query works, and how to run single or bulk lookups through the REST API.
What an HLR lookup actually asks the network
The Home Location Register is the authoritative subscriber database of a mobile core network. For every SIM it serves, it holds the IMSI, the current Visitor Location Register (VLR) address, subscription state, and the services the subscriber is allowed to use. When an SMS centre needs to deliver a message, it must first ask the HLR where the subscriber is, because only the serving MSC/VLR can page the handset.
That ask is the SRI_SM operation. The SMSC sends it over SS7 (or SIGTRAN) to the
subscriber's HLR; the HLR answers with the IMSI and the MSC address currently serving the subscriber,
or with an error that states precisely why the subscriber cannot be reached — absent subscriber,
detached, subscriber barred or unknown subscriber. A production grading stack
uses the same operation with delivery suppressed, which is what an HLR lookup is: a dry run of SMS
delivery that stops before any message is constructed.
Because the answer comes from the live register rather than from a static prefix table, it reflects porting and roaming as they are at query time. A number that moved from one operator to another last week is already reported on its new network, and a number whose prepaid credit lapsed yesterday is already reported as disconnected.
The data points an SMSRoute lookup returns
Every successful lookup returns the fields below. They are the same fields the API returns, the same fields the dashboard renders, and the same fields you can export from a bulk job.
| Field | What it tells you | How to use it |
|---|---|---|
status |
Active, inactive or unknown, as answered by the register. | Suppress sends on inactive; retry unknown before discarding the record. |
valid |
Whether the MSISDN is structurally valid for its numbering plan. | Reject typo'd and fabricated numbers at the signup form, before they reach a campaign. |
carrier |
The network currently serving the number — the recipient network after a port. | Pick the SMPP bind or direct interconnect that terminates on that operator. |
country |
ISO country of the current serving network. | Enforce destination policy and apply the right per-country price before send. |
ported |
Whether the number has been ported between operators. | Re-route and re-price only the minority of numbers that actually moved. |
roaming |
Whether the subscriber is attached outside their home network. | Expect slower or deferred delivery and widen the retry window accordingly. |
phoneNumber |
The MSISDN normalised to E.164. | Store one canonical form instead of re-parsing local notations per send. |
timestamp |
When the register answer was produced. | Treat telemetry older than a few days as stale before a large campaign. |
id |
Identifier for this query. | Join the lookup to the SMS, delivery receipt and billing records it influenced. |
The dashboard result table renders the wider SS7 detail on top of those API fields: serving MCC/MNC, the original donor network for ported numbers, line type (mobile, landline, VoIP, unknown), subscriber time zone and the E.164, international, national and RFC 3966 renderings of the number. That is enough to see why a route was chosen without opening the raw response.
Why an unverified phone list is a billing problem
Mobile numbering data decays continuously. Subscribers churn between operators, prepaid SIMs lapse when top-ups stop, numbers are reassigned after a quarantine period, and signup forms collect typo'd or fabricated digits. Operators that clean lists for a living model the decay at roughly 2–3% of records per month; SMSRoute plans against 2.5%. On a 500,000-record list that is more than twelve thousand records a month that quietly stop being deliverable.
Every one of those records still costs money at submit time, and the damage is not limited to the wasted segment. Three effects compound:
- Wasted segments. An SMSC accepts the message and charges the credit; the failure is only visible later in the delivery receipt, if a receipt arrives at all.
- Carrier filtering pressure. Operators score traffic by the ratio of failed destinations. A sender that routinely submits to disconnected numbers gets throttled before its content is even examined, which suppresses delivery on the valid part of the list too.
- Sender-ID and short-code reputation. Alpha-numeric sender IDs and short codes are provisioned against an expected quality of traffic. Bounce rates above one percent are a common trigger for review.
A lookup costs a fraction of a segment, so the economics are asymmetric: cleaning a list before a send is cheaper than a single delivery attempt to a dead number, and it removes the filtering risk at the same time.
Reading the result: what to do with each outcome
A lookup returns telemetry, not a verdict. The useful work is in mapping each combination of reachability, line type and porting state onto an action your pipeline can take automatically.
| Lookup result | What it means | Recommended action |
|---|---|---|
| Reachable · mobile · not ported | Attached to the range-holding operator, standard handset. | Send on the default route for that MCC/MNC. |
| Reachable · mobile · ported | Attached, but the number moved; the range holder no longer serves it. | Route to the recipient network from current_network, not the prefix owner. |
| Reachable · VoIP | A virtual number, typically a cloud telephony or OTP-farm endpoint. | Allow only if your fraud policy accepts virtual numbers; otherwise block the signup. |
| Reachable · landline | A fixed line that cannot receive SMS. | Reject at validation, or fall back to voice or email. |
| Absent subscriber | The SIM is known but not currently attached (powered off, out of coverage, roaming gap). | Queue and retry inside your delivery window; do not drop the message yet. |
| Disconnected / unknown subscriber | The MSISDN is no longer assigned on that network. | Remove from the list and stop paying for segments that can never be delivered. |
| Barred | The subscription is blocked for messaging, or the operator has applied a barring. | Suppress; escalate to a compliance review if the volume is material. |
Running a lookup from the dashboard
- Create an account with an email address only — no company documents, no ID upload. Top up with Bitcoin, USDT, Ethereum, Monero, Litecoin or Solana; the minimum is $5.
- Open the HLR tool inside the dashboard, paste one number in single mode or drop a CSV in bulk mode.
- Read the per-line result table: reachability, serving network, MCC/MNC, porting flags and line type. Results can be filtered and exported, and the query history stays available afterwards.
Numbers are accepted in national or international notation and normalised to E.164 before the query, so
a list that mixes +1 415 555 2671, 0014155552671 and
(415) 555-2671 resolves to the same subscriber.
Automating lookups with the REST API
The same register query is available as a JSON endpoint, which is how most integrators use it: validate at signup, then re-validate a record only when it is about to be charged. Authentication is a bearer API key generated in the dashboard; no KYC documents are required to obtain one.
Single lookup
curl -X POST https://api.sendsmsnokyc.com/hlr/get/lookup \
-H "Authorization: Bearer $SMSROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone":"+14155552671"}'
{
"id": "hlr_8f21c4",
"phoneNumber": "+14155552671",
"valid": true,
"carrier": "T-Mobile USA",
"country": "US",
"status": "active",
"roaming": false,
"ported": true,
"timestamp": "2026-10-26T09:14:02Z"
}
A valid: false answer is a numbering-plan failure — the digits cannot belong to a
subscriber. valid: true with status: "inactive" means the number is a real
MSISDN that is not currently attached. Those two failures need different handling: the first should
reject the record outright, the second should hold it for retry.
Bulk lookup
Bulk jobs take the same payload shape as the single endpoint, with an array of MSISDNs. A single request accepts up to 10,000 numbers; larger lists are split across requests so a slow operator cannot stall the whole file.
import os
import httpx
API = "https://api.sendsmsnokyc.com"
HEADERS = {"Authorization": f"Bearer {os.environ['SMSROUTE_API_KEY']}"}
def clean(numbers: list[str]) -> list[dict]:
kept = []
for start in range(0, len(numbers), 10_000):
batch = numbers[start:start + 10_000]
r = httpx.post(
f"{API}/hlr/get/lookup/bulk",
headers=HEADERS,
json={"phone_numbers": batch},
timeout=60,
)
r.raise_for_status()
for row in r.json():
if row["valid"] and row["status"] == "active":
kept.append(row)
return kept
Every lookup is also recorded in the query history endpoint
(GET /hlr/history), which is what makes the cleaning step auditable: you can prove after the
fact which numbers were suppressed and on what evidence.
Where the lookup belongs in a routing decision
A lookup is most valuable immediately before a send, not once at import. Between import and send, records age, subscribers port, and prepaid SIMs lapse. Wiring the lookup into the send path gives three routing decisions that a prefix table cannot make:
-
Interconnect selection by serving network. A prefix table maps a number range to the
operator that originally owned it. After porting, that operator is no longer the terminating network,
so the message takes a slower and more expensive path. Routing on
carrierfrom the lookup sends the traffic straight to the network that will actually deliver it. - Channel selection by line type. OTP flows should not burn segments on landlines or virtual numbers that were never going to complete the verification. Rejecting them at the form, rather than at the SMSC, is the cheapest fraud control available.
- Timing by attachment state. An absent subscriber answer during a burst usually means the handset is off or out of coverage, not that the number is dead. Holding those records for a retry window recovers conversions that a blind delete would lose.
The network codes in the answer are the routing keys. 310-260 is T-Mobile USA and
234-15 is Vodafone UK; those MCC/MNC pairs select the bind that terminates on that operator.
Storing the pair alongside the message record also makes delivery analysis possible later: delivery
receipts can be grouped by the network that actually carried the traffic rather than the network the
prefix suggested.
What an HLR lookup cannot tell you
Precision about limits is what separates a useful lookup from the misleading one. An HLR query is a reachability and identity check; it is not a delivery guarantee.
- It cannot predict content filtering. A reachable subscriber on a healthy network can still have the message dropped by an operator firewall because of a URL, a shortener, a keyword or a sender-ID policy. Only the delivery receipt shows that outcome.
- It does not confirm delivery. Reachability describes the state of the subscription at query time. A handset that goes offline a second later will not accept the message.
- It does not describe handset capability. Rich messaging support, RCS availability and app-level push are separate capabilities the register does not model.
- It is a point-in-time answer. Treat telemetry as perishable. For a campaign that runs for a week, re-validate the records you have not sent yet.
- It is not a SIM-swap history. A ported flag is not a fraud score. Number-recycling and swap detection need your own account-level signals on top.
HLR lookup vs number validation vs delivery receipt
The three checks answer different questions and belong at different points in the pipeline. Using one where another is needed is the most common way teams either waste money or block good users.
| Check | Question answered | Source of truth | Best point to run it | Relative cost |
|---|---|---|---|---|
| Syntax / plan validation | Could these digits be a real number? | Numbering plan, offline | Anywhere, including the browser | Free |
| HLR lookup | Is this subscriber attached, on which network, on what kind of line? | Live HLR over SS7 MAP | Before charging for a send | Fraction of a segment |
| Delivery receipt | Did the message reach the handset? | SMSC / operator DLR | After the send, asynchronously | Included with the segment |
| Synthetic send (“SMS ping”) | Will an actual message be accepted end to end? | Real message delivery | Only when a real message is acceptable | Full segment price |
In practice a healthy pipeline runs validation at input, an HLR lookup immediately before a paid send, and a delivery receipt for reporting. That keeps the expensive, authoritative checks on the records that are actually going to be billed.
Frequently asked questions
Does an HLR lookup notify the subscriber in any way?
No. The query is an SS7 MAP signalling exchange between network elements, answered by the Home Location Register. No short message is submitted, so nothing is delivered, billed to the subscriber, or shown on the handset — no tone, no notification, no wake-up.
How is an HLR lookup different from a phone number validator?
A validator only inspects the digits: length, country calling code, prefix ranges. It runs offline and cannot know that a well-formed number was disconnected last month. An HLR lookup asks the live register of the serving network, so it reflects porting, disconnection and current attachment state as they are at query time.
How current is the carrier information for ported numbers?
The answer comes from the subscriber's register rather than a cached prefix table, so a port is
visible as soon as the receiving network has activated the subscription. That is why routing on the
lookup's carrier field is more accurate than routing on the number range.
Why does a lookup return inactive or unknown for a number that used to work?
The usual causes are a lapsed prepaid subscription, a deactivated or replaced SIM, a number recycled to another subscriber, or an operator temporarily not answering signalling queries for the range. Only the first three justify removing the record; an operator-side timeout is worth retrying.
Can I look up thousands of numbers at once?
Yes. The bulk endpoint accepts up to 10,000 MSISDNs per request, and the dashboard accepts CSV uploads of the same size. Results come back per line with the same fields as a single lookup, and every query is retained in the lookup history so the cleaning step can be audited later.
Do I need KYC to run lookups?
No. SMSRoute accounts are created with an email address only and funded with Bitcoin, USDT, Ethereum, Monero, Litecoin or Solana, with a $5 minimum top-up. Lookup credit comes from the same prepaid balance as messaging, and the API key is generated in the dashboard.