How is number lookup (HLR/VLR) performed?
Posted: Thu May 22, 2025 3:10 am
Number lookup, in the context of mobile telecommunications, primarily refers to the process of querying databases within the mobile network to determine a subscriber's current status, location, and serving network. This is crucial for routing calls and messages, as well as for various business use cases like data cleansing, fraud prevention, and marketing optimization. The core components involved in this process are the Home Location Register (HLR) and the Visitor Location Register (VLR), connected and queried via signaling protocols like Signaling System No. 7 (SS7).
Here's how number lookup (HLR/VLR) is performed:
The Home Location Register (HLR):
What it is: The HLR is a central, permanent database maintained by each mobile network operator. It holds comprehensive, unchanging information about all its registered subscribers. Think of it as the master record for every SIM card issued by that operator.
Information Stored: For each subscriber, the HLR stores vital data including:
Their International Mobile Subscriber Identity (IMSI) – a unique identifier for the SIM.
Their Mobile Station International Subscriber Directory Number (MSISDN) – which is their actual phone number.
Their service subscriptions (e.g., voice, SMS, data plans, call forwarding settings).
Their authentication keys (used for security).
Crucially, the address of the Visitor Location Register (VLR) where the chinese student database subscriber is currently located (if roaming or in a different location area).
Their current status (e.g., active, inactive, suspended, switched on/off).
Number portability information (if the number has been ported to or from another network).
The Visitor Location Register (VLR):
What it is: The VLR is a temporary database associated with a Mobile Switching Center (MSC), which manages calls and connections within a specific geographic area or "location area." It stores dynamic information about all mobile subscribers currently roaming within that MSC's coverage area, regardless of their home network.
Information Stored: When a subscriber enters a new location area, their mobile device registers with the local MSC/VLR. The VLR then queries the subscriber's HLR (their home network) to download a temporary copy of their service profile and authentication information. The VLR primarily stores:
A temporary copy of the subscriber's IMSI and MSISDN.
Their current Location Area Identity (LAI) or Cell ID, indicating their approximate geographic location.
Their temporary mobile subscriber identity (TMSI), used for privacy.
Their current status (e.g., busy, idle, reachable, unreachable).
Purpose: The VLR reduces the need for the MSC to constantly query the distant HLR for every incoming call or message, enabling faster call setup and more efficient service delivery for roaming users.
The Number Lookup Process (Call/SMS Routing & HLR Lookups for Businesses):
For Incoming Calls/SMS:
When a call or SMS is made to a mobile number, the originating network first identifies the subscriber's home network based on the MSISDN (phone number) and its associated Mobile Network Code (MNC).
It then sends a query (via the SS7 signaling network) to the HLR of the home network for that number.
The HLR checks its records for the MSISDN.
If the subscriber is active and registered, the HLR returns the address of the VLR where the subscriber is currently located. If the number has been ported, the HLR lookup will also reveal the actual current carrier.
The originating network then routes the call/SMS to the MSC associated with that VLR.
The VLR pages the mobile device within its location area. Once the device responds, the call/SMS is delivered.
If the HLR indicates the subscriber is inactive, disconnected, or the number is invalid, the call/SMS will fail (e.g., "number not in service").
For Businesses (HLR Lookup Services):
Beyond call routing, various businesses utilize HLR lookup services (provided by third-party vendors with direct SS7 connections to mobile operators) for purposes like:
Data Cleansing: Verifying if a phone number is active, valid, or disconnected, improving marketing list accuracy and reducing costs for sending messages to invalid numbers.
Fraud Prevention: Detecting suspicious activities like SIM swapping (where a number is ported to a new SIM card, often indicating account takeover attempts) or identifying virtual/disposable numbers.
Real-time Status Checks: Determining if a phone is currently reachable (switched on, in coverage) or roaming, which can inform delivery attempts for critical notifications.
Carrier Identification: Confirming the current mobile operator for a number, even if it has been ported, which is vital for least-cost routing for bulk SMS/calls.
The entire HLR/VLR lookup process leverages the SS7 (Signaling System No. 7) network, which is the backbone signaling infrastructure of the global PSTN and mobile networks. SS7 is an "out-of-band" signaling system, meaning control information (like lookup queries) travels on separate channels from the actual voice or data traffic, ensuring rapid and efficient exchange of information for call setup, routing, and subscriber management. These lookups occur in real-time, typically within milliseconds, ensuring that calls and messages are delivered efficiently to the correct destination.
Here's how number lookup (HLR/VLR) is performed:
The Home Location Register (HLR):
What it is: The HLR is a central, permanent database maintained by each mobile network operator. It holds comprehensive, unchanging information about all its registered subscribers. Think of it as the master record for every SIM card issued by that operator.
Information Stored: For each subscriber, the HLR stores vital data including:
Their International Mobile Subscriber Identity (IMSI) – a unique identifier for the SIM.
Their Mobile Station International Subscriber Directory Number (MSISDN) – which is their actual phone number.
Their service subscriptions (e.g., voice, SMS, data plans, call forwarding settings).
Their authentication keys (used for security).
Crucially, the address of the Visitor Location Register (VLR) where the chinese student database subscriber is currently located (if roaming or in a different location area).
Their current status (e.g., active, inactive, suspended, switched on/off).
Number portability information (if the number has been ported to or from another network).
The Visitor Location Register (VLR):
What it is: The VLR is a temporary database associated with a Mobile Switching Center (MSC), which manages calls and connections within a specific geographic area or "location area." It stores dynamic information about all mobile subscribers currently roaming within that MSC's coverage area, regardless of their home network.
Information Stored: When a subscriber enters a new location area, their mobile device registers with the local MSC/VLR. The VLR then queries the subscriber's HLR (their home network) to download a temporary copy of their service profile and authentication information. The VLR primarily stores:
A temporary copy of the subscriber's IMSI and MSISDN.
Their current Location Area Identity (LAI) or Cell ID, indicating their approximate geographic location.
Their temporary mobile subscriber identity (TMSI), used for privacy.
Their current status (e.g., busy, idle, reachable, unreachable).
Purpose: The VLR reduces the need for the MSC to constantly query the distant HLR for every incoming call or message, enabling faster call setup and more efficient service delivery for roaming users.
The Number Lookup Process (Call/SMS Routing & HLR Lookups for Businesses):
For Incoming Calls/SMS:
When a call or SMS is made to a mobile number, the originating network first identifies the subscriber's home network based on the MSISDN (phone number) and its associated Mobile Network Code (MNC).
It then sends a query (via the SS7 signaling network) to the HLR of the home network for that number.
The HLR checks its records for the MSISDN.
If the subscriber is active and registered, the HLR returns the address of the VLR where the subscriber is currently located. If the number has been ported, the HLR lookup will also reveal the actual current carrier.
The originating network then routes the call/SMS to the MSC associated with that VLR.
The VLR pages the mobile device within its location area. Once the device responds, the call/SMS is delivered.
If the HLR indicates the subscriber is inactive, disconnected, or the number is invalid, the call/SMS will fail (e.g., "number not in service").
For Businesses (HLR Lookup Services):
Beyond call routing, various businesses utilize HLR lookup services (provided by third-party vendors with direct SS7 connections to mobile operators) for purposes like:
Data Cleansing: Verifying if a phone number is active, valid, or disconnected, improving marketing list accuracy and reducing costs for sending messages to invalid numbers.
Fraud Prevention: Detecting suspicious activities like SIM swapping (where a number is ported to a new SIM card, often indicating account takeover attempts) or identifying virtual/disposable numbers.
Real-time Status Checks: Determining if a phone is currently reachable (switched on, in coverage) or roaming, which can inform delivery attempts for critical notifications.
Carrier Identification: Confirming the current mobile operator for a number, even if it has been ported, which is vital for least-cost routing for bulk SMS/calls.
The entire HLR/VLR lookup process leverages the SS7 (Signaling System No. 7) network, which is the backbone signaling infrastructure of the global PSTN and mobile networks. SS7 is an "out-of-band" signaling system, meaning control information (like lookup queries) travels on separate channels from the actual voice or data traffic, ensuring rapid and efficient exchange of information for call setup, routing, and subscriber management. These lookups occur in real-time, typically within milliseconds, ensuring that calls and messages are delivered efficiently to the correct destination.