CUCM Block Incoming Calls

## Introduction

it is possible to filter or block incoming calls on a CUCM based on the number making the call. this method is very helpful to screen out telemarketers and nuisance callers.

This method relies heavily on translation patterns and Calling Search spaces, so you may want to brush up on your CUCM knowledge.

## Process

when a call comes in from the PSTN it arrives at the Inbound PSTN CSS (Buffalo-Inbound-PSTN-CSS-01) there is only one partition in this CSS (Buffalo-Call-block-PT), and only one translation pattern that matches all incoming numbers but the "**Route Next Hop By Calling Party Number"** box is checked, this changes the logic inside the CUCM to make decisions based on the Caller id coming from the PSTN. The CSS assigned to that Translation Pattern is Buffalo-internal-routing-CSS02 that CSS only has 1 Partition in it the Buffalo-Call-Block-PT inside of that partition there are two translation patterns one is to block calls from **7168514571** that come in from the PSTN, and the other is a match all other numbers and forwards them into the system.

## Set ups

Let's take a quick look at your partitions, Go to **Call Routing > Class of Control > Partitions**

Here is a list of all my partitions

* Buffalo-AA-PT
* Buffalo-Call-Block-PT
* Buffalo-Inbound-Calls
* Buffalo-Internal-PT
* Buffalo-PSTN-Local-PT
* Buffalo-PSTN-Long-Dist-PT

Now let's take a look at our Calling Search spaces Go to Call Routing > Class Of Control > Calling Search Space

Our Calling Search spaces are

* Buffalo-Device-CSS
	+ Buffalo-Internal-PT
	+ Buffalo-AA-PT
* Buffalo-Internal-Routing-CSS-02
	+ Buffalo-Call-Block-PT
* Buffalo-RDP-CSS
	+ Buffalo-Internal-PT
	+ Buffalo-PSTN-Local-PT
	+ Buffalo-PSTN-Long-DIST-PT
* Buffalo-UNRES-CSS
	+ Buffalo-PSTN-Local-PT
	+ Buffalo-PSTN-Long-DIST-PT
* Inbound-Buffalo-PSTN-01
	+ Buffalo-Inbound-Calls-PT

And finally, our Translation patterns go to **Call Routing > Translation Pattern**

In the **Buffalo-Inbound-Calls** there is only one pattern with the following settings:

* Translation Pattern: !
* Partition: Buffalo-Inbound-Calls
* Calling Search Space: Buffalo-Internal-Routing-CSS-02
* Route Option: Route This Pattern
* Route Next Hop By Calling Party Number (Checked)

In the Buffalo-Call-Block-PT partitions There are the following Translation Patterns

**Allow All**

* Translation Pattern: !
* Partition: Buffalo-Call-Block-PT
* Calling Search Space: Buffalo-Device-CSS
* Route Option: Route This pattern

**Block Nuisance Caller**

* Translation Pattern: Number the call is coming from, In our case 716-851-4571
* Partition: Buffalo-Call-Block-PT
* Calling Search Spcae: <None>
* Route Option: Block This Pattern
* Route Next Hop by Calling Party Number (Checked)

In this configuration, all incoming calls that are not identified by blocking patterns are forwarded into the system.

## Situation

It support receives a request to block a nuisance caller who is dialing from 716-851-4571. so we will go ahead and block that number from reaching our system.

## Steps

Step 1: First things first we have to verify what digits we are getting from the PSTN for this caller. you can follow the information in the article CUCM Use RTMT to Test SIP Calls to see what digits you are receiving

Step 2: As we can see from the report we are getting the digits "7168514571"