# Block calls from a prefix

**Scenario:** A company receives frequent spam calls from numbers starting with **1234**, disrupting operations. To
block these calls follow the steps:

## Step 1: Create a Number List

1. Go to **Voice > Inbound Trunks** and open the **Number Lists** tab.
2. Click **Create New** and enter a **Friendly name** (e.g., *Spam Blocklist*).
3. Set the **Mode** to **Prefix match**.
4. Set the **Default action** to **Allow call**.
5. Click **Create**.

[![Creating a Number List](../../../../_images/fig720.png)](../../../../_images/fig720.png)


**Fig. 1.** Creating a Number List

## Step 2: Add the prefix to the Number List

1. Click the **Actions** button next to the newly created **Number List**.
2. Select **Manage numbers**.
3. Click **Add Numbers**.
4. Enter **1234** in the input field (this blocks all calls starting with **1234**) and set the action to **Reject call**.
5. Click **Submit**.

[![Adding a Prefix to Block Calls](../../../../_images/fig814.png)](../../../../_images/fig814.png)


**Fig. 2.** Adding a Prefix to Block Calls

## Step 3: Assign the Number List to a trunk

Assign the **Number List** to the inbound **SIP** or **PSTN** trunk that receives these calls so the call filtering
rules take effect. Select it in the trunk's **CLI Number List** field on the **Number Translations** tab. For the steps,
see [Assign a Number List to a Trunk](../how-to-guides/configure-number-lists.html#inbound-number-lists-assign).

Calls from numbers starting with **1234** are rejected, and all other calls follow the **Default action** and are
allowed.

## Related resources

- [Number lists](../index.html) - Understand how Number Lists match calls and
  allow or reject them.
- [Configure number lists](../how-to-guides/configure-number-lists.html) -
  Create a Number List, add numbers or prefixes, and assign it to a trunk.
- [Number List settings reference](../number-list-settings-reference.html) -
  Look up field definitions, defaults, values, and limits.

On this page
