Translation Pattern and “Route Next Hop By Calling Party Number” option to Block incoming calls based on the Caller ID

Translation Pattern is the most important tool in the Call Routing Process for Cisco Unified Communication manager. Largely used in the Globalized Dial Plan, inter-site and intra-site dialing, and a powerful tool to solve the problem of overlapping directory numbers.

A Translation Pattern is used to match the DIALED NUMBER (CALLED). After a match is found we can perform digits manipulation.

In some scenarios and some designs, we want to block some incoming calls from PSTN based on the calling number to specific internal number.

We can do that using the translation profile on the voice gateway, but there is a lot of gymnastics to write appropriate regular expressions to match specific PSTN numbers.

From CUCM Version 8, the translation pattern was armed with an option called “Route Next Hop By Calling Party Number” in the translation pattern configuration to route or block a call based on the calling number using the “Route this pattern” or “Block this pattern” Route Option.

A Translation Pattern can be used to match both the Calling / Called Numbers. But only if the translation pattern with dialed number is matched first and we instruct it to match the next translation pattern based on the calling number.

Let’s say there is a requirement, the Executive Director instructs the admin to block calls coming from international numbers, especially from the Australia Country, while the rest of the calls should be received.

Using the Translation Pattern on CUCM:

Create three partitions called Executive-PT, From-Australia-PT and From-Any-PT.

Create a CSS called Caller-ID-CSS, associate two partitions named From-Australia-PT and From-Any-PT.

Create the first Translation Pattern with pattern 11001 which is Directory Number of the Executive Director 11001. Put this pattern in the Executive-PT partition.

This Translation Pattern will match all incoming PSTN calls destined to 11001.

Associate the Caller-ID-CSS Calling Search Space with this Translation Pattern.

Make sure the Route this pattern option is checked.

In this Translation Pattern, check the “Route Next Hop By Calling Party Number” option.

Once a call to 11001 is matched by the previous Translation Pattern, create a second Translation Pattern with pattern 61! to match all calls coming from Australia country, in other words with the calling numbers that start with 61, basically the First Translation Pattern 11001 with the option “Route Next Hop By Calling Party Number” will instruct the second Translation Pattern 61! to look at the calling number to decide whether to route or block the call.

In this second Translation Pattern, select the Block this pattern option since we want to block calls coming from Australia country, then put this Translation Pattern 61! in the From-Australia-PT partition.

Finally creates a third Translation Pattern to allow the remaining calls, it’s like a permit all. You can use the exclamation point (!) wildcard. Associate this Translation Pattern with From-Any-PT partition.

Make sure this Translation Pattern (!) has the calling search space phone-css that access to the phones partition internal-pt.

Finally, the SIP Tunk or the gateway that receives the PSTN calls must be configured with the inbound CSS. This inbound CSS must have access to the Executive-PT partition of the first translation pattern 11001 and the phones partition internal-pt, make sure the Executive-PT is placed first.

Now place a call to 9212177411001 from the International-AU line, the call is rejected.

While the local, national, and international UK calls are allowed.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s