Occasionally I am asked to configure the ability to block calls based on Caller ID. Prior to Cisco Unified Communications Manager (CUCM) v8, the only way to block these calls was to configure voice translation rules and profiles on the gateway receiving the calls. This has changed in CUCM v8 with the introduction of an additional parameter in translation patterns: Route Next Hop By Calling Party Number.
This parameter is present only in translation patterns and not in route patterns. If you recall, a route pattern points a call to the way out through a trunk or gateway for delivery. A translation pattern’s only job is to change something about a call and send it back in for another lookup through the call routing process. In this case, the change will be to inform CUCM to do the next lookup based on the Caller ID and not the called number.
Here are the steps to configure Caller ID blocking:
- Create a partition called Inbound_Calls_pt and a Calling Search Space (CSS) called Gateways_css, which contains the previously created partition. Next, create a partition called CID_Filter_pt and create a CSS called Filter_by_CID_css that contains the CID_Filter_pt.
- Create a translation pattern with the “!” symbol for the pattern so that it matches all calls. Place this translation pattern into the “Inbound_Calls_pt” partition. Check the box next to Route Next Hop By Calling Party Number. Set the CSS for this translation pattern to be Filter_by_CID_css.
- Apply the Gateways_css to all trunks and gateways that can carry calls from the outside into the cluster.
- Define translation patterns in the CID_Filter_pt for each CID or group of CIDs you want to block. Make sure that you select “Block this pattern” for the Route Option setting. Make sure you enter the CIDs in the format that will be delivered to CUCM.
- Define a translation pattern in the CID_Filter_pt with a “!” pattern to catch all the rest of the CIDs that should not be blocked and make sure you select “Route this pattern” for those calls. The CSS configured here should contain your internal phone and voicemail port partitions so these calls can be routed to your internal phones or voicemail.
- Define a translation pattern in the CID_Filter_pt with a null pattern to catch calls without a CID. Depending on your desired goal of routing or blocking calls that don’t have a CID, select either “Block this pattern” or “Route this pattern” for these calls. If you choose “Route this pattern,” then the CSS configured here should contain your internal phone and voicemail port partitions so these calls can be routed to your internal phones or voicemail.
Now all calls entering the CUCM cluster via trunks and gateways will be checked against the first translation pattern, which simply instructs CUCM to do the next lookup against the CID. Then CUCM will match the CID to all translation patterns in the CID_Filter_pt and will block the more specific CIDs while allowing all other CIDs to ring through into the cluster.
One thing to note is that the CSS applied to the gateways and trunks should not contain any other partitions, other than the “Inbound_Calls_pt,” otherwise calls might be routed directly to the internal phones without being checked for CID.
In general, this approach works for many scenarios. However, there are some scenarios for which this might not work and which might require additional configuration and testing. These scenarios include calls via an FXO port or anonymous calls via a SIP trunk. Consult your Cisco documentation on how to configure for call screening in these instances.
In summary, prior to CUCM v8, blocking calls based on CID had to be configured on the gateway and not on CUCM. Starting with CUCM v8, you can use the new translation pattern parameter “Route Next Hop By Calling Party Number” to allow for call screening based on CID.
ICOMM - Introducing Cisco Voice and UC Administration v8.0
CIPT1 - Implementing Cisco Unified Communications IP Telephony Part 1 v9.x
ACUCW1 - Administering Cisco Unified Communications Workspace Part 1: Basic v9.x