Signal & Syntax · Guide

HLR Lookup vs eHLR

An HLR lookup asks a mobile operator's register about a number. eHLR is ScoreMachine's own activity check. Both answer whether a number is in use.

5 minUpdated ScoreMachine team

What the HLR Holds

The HLR (Home Location Register) is the subscriber database inside a mobile operator's core network. Every GSM and UMTS operator runs an HLR. The HLR holds one record per subscription, and each record carries four things:

  • —The IMSI (International Mobile Subscriber Identity), the code stored on the SIM.
  • —The MSISDN, the phone number people dial.
  • —The services the subscription allows, such as SMS, roaming and call forwarding.
  • —The address of the switch serving the handset now.

The HLR ties the MSISDN to the IMSI. When a call or SMS arrives, the network asks the HLR where to send the traffic. The serving switch keeps a copy of the record in its VLR (Visitor Location Register). A handset moving to a new area registers with a new VLR. The HLR then updates the address.

Records change without the number changing. A replacement SIM brings a new IMSI behind the same MSISDN. A port moves the subscription to the recipient network's HLR.

An MVNO with its own core network runs its own HLR. A light MVNO relies on the host operator's HLR.

Newer cores keep the same records under different names. 4G networks use the HSS (Home Subscriber Server), which answers over the Diameter protocol. 5G core networks use the UDM (Unified Data Management). Operators running more than one generation keep both kinds of register, or one combined node.

How an HLR Lookup Works

An HLR lookup asks the network's own routing question from outside the operator. The query is a MAP (Mobile Application Part) operation carried over SS7 (Signaling System No. 7). SRI-SM (Send Routing Info for Short Message) is the operation behind a standard lookup. An SMSC sends the same query before delivering every SMS. The lookup sends the query and stops, so no message reaches the handset.

The query travels in five steps:

  1. 01The lookup service addresses the query to the MSISDN over an SS7 interconnect.
  2. 02SS7 routes the query to the operator holding the number's range.
  3. 03For a ported number, the range holder's porting function forwards the query to the serving network.
  4. 04The serving network's HLR answers with the record, or with an error.
  5. 05The lookup service returns the answer.

A completed lookup returns four answers:

  • —The IMSI of the subscription.
  • —The address of the serving switch, or VLR.
  • —The MCC (mobile country code) and MNC (mobile network code) of the serving network.
  • —An absent-subscriber error when the handset is off or out of coverage.

Example

MSISDN 447911123456 MCC-MNC 235-91 · Vodafone UK Absent no

The MCC and MNC name the serving network. An HLR lookup therefore also answers the porting question, when the query completes. Mobile number portability and SMS routing covers porting in full.

Two errors carry meaning for a file:

  • —Absent subscriber. The subscription exists, and the handset is off or out of coverage.
  • —Unknown subscriber. The HLR holds no record for the MSISDN.

A lookup is a snapshot of one moment. A handset switched off at lookup time reads absent, and reads attached an hour later.

Where a Register Lookup Comes Back Empty

The HLR is a mobile core component. Landline and VoIP numbers have no HLR record, so an HLR lookup returns nothing for either.

A lookup also depends on the operator answering. Operators run SS7 firewalls that screen queries arriving from outside the network. A screened query returns no result, or a result the operator chose to return. Interconnect agreements decide which networks a lookup reaches at all.

Each gap leaves a number with no answer on file. A file checked by register lookup alone carries those numbers forward unresolved. The dialer or the SMSC then meets each gap one attempt at a time. A file with mixed line types needs a second check for the landline and VoIP rows. The free Line Type Checker splits one number at a time.

What eHLR Returns

eHLR is ScoreMachine's own check on whether a number is in use. eHLR combines telecom network signals with digital footprint data. The method is score.phone.ehlr, and the verdict comes back as accessibility.

ValueMeaning
validThe number is in use
invalidThe number is out of use
unknownThe signals did not agree

eHLR returns a verdict on ranges and in markets where a register lookup comes back empty. The verdict describes the number. An unknown result is not billed.

The activity check covers mobile numbers. score.phone.validation returns line_type as mobile, landline or voip, so a file splits before the check. score.phone.ehlr runs on one number or up to 10,000 per request. Every phone method takes the same shape: an array of numbers and an optional geo_iso_code. geo_iso_code fills the country for numbers written without a country calling code. E.164 phone number format explained covers the number format itself.

Request:

JSON

{ "jsonrpc": "2.0", "method": "score.phone.ehlr", "params": { "phones": ["+447911123456"], "geo_iso_code": "GB" }, "id": 1 }

Response:

JSON

{ "jsonrpc": "2.0", "result": [ { "phone": "447911123456", "accessibility": "valid" } ], "id": 1 }

Side by Side

The table compares the two checks row by row.

HLR lookupScoreMachine
MethodA MAP query, usually SRI-SM, against the operator's registerscore.phone.ehlr, over JSON-RPC
What comes backIMSI, serving VLR, MCC/MNC of the serving network, and whether the subscriber is currently absentaccessibility as valid, invalid or unknown, from telecom network signals combined with digital footprint data
Numbers coveredMobile only. The register is a mobile core componentline_type is returned for mobile, landline and VoIP
When the operator does not answerNo result, or a result the operator chose to returnThe digital signals still contribute, or the response is unknown
Serving network after portingReturned where the query completesscore.phone.validation.mnp
OTT channelsOut of scopewhatsapp, telegram, facebook, instagram
Ordering a fileNot a scored outputphone_accessibility, 0–10
IntegrationOne lookup per answerOne account, one token, one request envelope

The eHLR activity verdict covers mobile numbers. Landline and VoIP numbers return their line type.

Working a File with Both Verdicts

accessibility splits a file into three groups:

  • —invalid numbers come off the dial or send list.
  • —unknown numbers go to their own path, such as a later recheck or a second channel.
  • —valid numbers go forward.

Sort the valid group on phone_accessibility to work the reachable part first. phone_accessibility is the reachability score, 0 to 10, returned by score.phone.scoring. A value of -100 marks the number as undetermined, not a zero. Undetermined numbers stay separate from the rest of the file.

The channel decides what happens to landlines. For SMS, drop the landline rows before the send. For voice, landline rows stay, and accessibility covers the mobile rows. SMS Providers and Call Centers & BPO walk through each workflow.

Route the forward group on the serving network. score.phone.validation.mnp returns the network in carrier, on the same account and token. The free Carrier Lookup shows carrier for one number.

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.