Communications Manager ANI based call routing

Over the years, I’m sure we’ve all had requests to perform ANI based inbound call routing on Cisco Communications Manager.  Prior to CUCM 8.x, this wasn’t possible within Communications Manager; however, with the introduction of the ‘Route Next Hop Based on Calling Party Number” option in CUCM 8, we can now route calls based on inbound ANI.  Typically this feature is used to block inbound SPAM/Malicious calls, but we can use the same concept to perform inbound ANI based call routing.

Here’s an example of the process for configuration ANI based routing on Communications Manager 8.x and higher.

Create new partition ‘PT-INBOUND-ALL’

Create new Calling Search Space ‘CSS-INBOUND-ALL’ and add ‘PT-INBOUND-ALL’ to this new Calling Search Space.

Create new Partition ‘PT-INBOUND-EVALUATE’
Create new Calling Search Space ‘CSS-INBOUND-EVALUATE’ and add ‘PT-INBOUND-EVALUATE’ to this new Calling Search Space.

Create a new Translation Pattern to match ALL inbound calls:

Pattern = !
Partition = PT-INBOUND-ALL
Calling Search Space = CSS-INBOUND-EVALUATE
Route Next Hop by Calling Party Number = TRUE/CHECKED

Create a new Translation Pattern to match ALL inbound calling numbers:

Pattern = !
Partition = PT-INBOUND-EVALUATE
Calling Search Space = {original gateway CSS or new CSS with visibility of internal devices}
Route Next Hop by Calling Party Number = FALSE/UNCHECKED
Called Party Transformation Mask = XXXX

Create a new Translation Pattern for each ANI pattern requiring customized routing:

Pattern = 816555XXXX (assuming you’re receiving 10 digit unmodified ANI from your carrier)
Partition = PT-INBOUND-EVALUATE
Calling Search Space = {original gateway CSS or new CSS with visibility of internal devices}
Route Next Hop by Calling Party Number = FALSE/UNCHECKED
Called Party Transformation Mask = 5000

SIP Trunk Inbound CSS = CSS-INBOUND-ALL

Here’s an explanation of the call routing process:

Translation Pattern ‘!’ in PT-INBOUND-ALL moves call to CSS-INBOUND-EVALUATE.   “Route Next Hop by Calling Party Number” is checked.  No transformations are done at this point.

Translation Pattern ‘816555XXXX’ in PT-INBOUND-EVALUATE matches calls carrying ANI from the 816555 NPANXX and redirects those calls to directory number ‘5000’ using the Called Party Transformation Mask configured on the translation pattern.

Translation Pattern ‘!’ in PT-INBOUND-EVALUATE matches all other inbound ANI and routes the call to the associated 4-digit directory number as determined by the wildcard mask of ‘XXXX’ defined in the Called Party Transformation Mask field on the translation pattern.