# Subscriber records

Let on-duty police look up who bought a SIM at the carriers' data center.

## What police can find

Carriers keep a record of every SIM they sell. On-duty police read those records at a terminal in the carriers' data center, the **Nova Networks Data Center**, and can search:

- **A phone number.** Its carrier and status, the registered subscriber, every SIM bought for the number (who bought it, when, and at which carrier shop) and its history: earlier numbers, and who held the number before it was reissued.
- **A citizen ID.** Every number registered to that citizen, with its carrier and status. On ESX, the citizen ID is the player's identifier, such as `char1:...` with multicharacter.

SIMs created by an admin command or another resource show "issued outside a shop". So do SIMs bought before your server installed the update that added records, since the shop was not recorded then.

**Ghost Mobile keeps no records.** A Ghost Mobile number answers that there is no record of who bought the SIM, and Ghost numbers never appear in a citizen's list. This applies to every carrier with `supportsSecure = true` in `config/carriers.lua`, and to every Wolfden Phone Secure line. [Shade](#/docs/wd_phone/shade) handles are never in subscriber records either.

## Use the terminal

1. Go to the terminal at the data center. With `ox_target`, look at it and choose **Subscriber records**; only the jobs allowed to search see this option. Without `ox_target`, stand at the terminal and press **E**.
2. Choose **Search a number** or **Search a citizen ID** and type it in.
3. The results open in a menu. Go back to run another search.

The server checks the officer's job, duty and distance from the terminal on every search. Each officer can run 15 searches a minute. On ESX versions without duty tracking, every officer counts as on duty; see [Framework and inventory](#/docs/wd_phone/configuration?section=framework-and-inventory).

## Set it up

Edit `Config.SubscriberRecords` in `config/records.lua`:

| Setting | Default | What it does |
| --- | --- | --- |
| `enabled` | `true` | Turn subscriber records on or off |
| `jobs` | `{ 'police' }` | Jobs that can search |
| `requireOnDuty` | `true` | The officer must be on duty |
| `terminals` | One terminal | Where officers search; see below |
| `maxDistance` | `3.0` | How far from a terminal a search is still accepted, in metres |
| `maxSims` | `10` | SIMs shown for a number |
| `maxHistory` | `10` | History entries shown for a number |
| `maxNumbers` | `20` | Numbers shown for a citizen |

Each terminal needs a unique `id`, a `label`, its `coords` and a target `radius`. Move the included terminal to fit your map or MLO, or add more:

```lua config/records.lua
terminals = {
    {
        id = 'nova_datacenter',
        label = 'Nova Networks Data Center',
        coords = vector3(-1083.0, -245.9, 37.76),
        radius = 1.5,
        blip = { enabled = false, sprite = 521, color = 38, scale = 0.7 },
    },
},
```

Terminals have no map blip by default. Set `blip.enabled = true` to show one.

## Review searches

Every search is logged, including searches with no result, so you can check for abuse. Each row in the `phone_records_lookups` table holds the officer's citizen ID, the type of search, what was searched, whether anything was found, the terminal and the time:

```sql
SELECT officer_citizenid, query_type, query, found, created_at
FROM phone_records_lookups ORDER BY created_at DESC LIMIT 50;
```

Searches also fire the `wd_phone:server:recordsLookup` server event, for your logging resource. A police MDT can read the same records through the `GetSubscriberRecord` and `GetCitizenNumbers` exports, which follow the same Ghost Mobile rule and are logged too. See [Exports & integrations](#/docs/wd_phone/exports?section=subscriber-records).

## Seized phones

Subscriber records tell police who bought a SIM. To get into a seized Wolfden Phone Secure, on-duty police use the [forensic unlock](#/docs/wd_phone/nova-secure?section=forensic-unlock). For other phones, see the lost and stolen status in [Nova Account & recovery](#/docs/wd_phone/device-operations?section=lost-and-stolen-phones).
