# Handle Incoming Calls Based on Caller ID

You can tell Cloud Voice to treat incoming calls differently depending on who is calling. By defining one or more Caller ID rules, you can, for example, send a known number straight to your extension, drop nuisance callers, or forward certain numbers to voicemail without ever picking up. Caller ID is the phone number the calling party presents when the call arrives.

## Create a call handling rule

1. In the Cloud Voice App (Desktop), open **Preferences > Features > Call Handling Based on Caller ID**.
2. Click **Add** and define the rule:
   1. In the **Caller ID** field, specify which callers the rule applies to. You can match either a single number or a range of numbers:
      - **A specific number**: type the exact Caller ID. For instance, enter `10086` to act only on calls from that number.
      - **A number pattern**: use a wildcard to match many numbers at once. The trailing dot is the wildcard, so `9011.` matches any Caller ID that begins with 9011 followed by any additional digits.
   2. From the **Action** drop-down, choose what should happen when a matching call arrives:
      - **Hang Up**: ends the call immediately without connecting it.
      - **Extension**: routes the call to an extension you select.
      - **Voicemail**: sends the caller to voicemail.
      - **IVR**: sends the caller into an IVR (Interactive Voice Response) menu, the automated "press 1 for sales" style menu.
      - **Play Greeting then Hang up**: plays a recorded message to the caller, then ends the call.
      - **Accept Call**: lets the call ring through to your extension as normal.
   3. Click **Confirm**.
3. Optional: To create additional rules, repeat step 2.
4. Optional: Use the **Move** column to reorder your rules. Cloud Voice evaluates them from top to bottom, so a rule higher in the list takes priority.
5. Click **Save**.

:::note
Every incoming call is allowed through to your extension by default. The **Accept Call** action is useful when a broader rule blocks a range of numbers but you want to let one of them through. Suppose a rule rejects spam from numbers like `728373XX`; you can add a separate rule that accepts calls from `72837300`.
:::

:::tip
Order matters when rules overlap. Place "Accept calls from 72837300" above "Reject calls from numbers starting with 728373" so the specific number wins. Cloud Voice will then ring your extension for calls from 72837300 while hanging up on every other 728373 number.
:::

## Result

Your rules apply the moment you save them. From then on, whenever a call reaches your extension, Cloud Voice checks the Caller ID and handles the call according to the matching rule.
