Monday, 30 March 2015

Translation rules on Cisco CME

Translation rules on Call Manager Express


This post is a guide for configuring translation rules. 
It’s a simple scenario where Company X uses a Cisco Call Manager Express system based on a Cisco 2900 series router running ios 15.1

I will post actual configurations and explanations will be in between.

#voice translation-rule 1
 rule 1 /^204242\(...$\)/ /\1/     
 rule 2 /^254204242\(...$\)/ /\1/
 rule 3 /^4242\(...$\)/ /\1/

#voice translation-profile 1
translate called 1
      
Rule 1: The forward slash marks the beginning of the numbers to be matched (or translated), the caret says only numbers starting with 2 will be matched, the backslash after digit 6 is used to tell the router to ignore the opening parenthesis, and the opening parenthesis marks the beginning of set 1. Set 1 defined by … and it means any three digits, the dollar sign marks the end of the three digits, hence no digit can be added after the first 3 digits. The backslash tells the router to ignore the closing parenthesis that follows. The closing parenthesis marks the end of set 1. The forward slash marks the end of the numbers to be matched.
The second section is the translated portion. The forward slash marks the beginning of the translated numbers, the backslash tells the router to ignore 1. 1 represents Set 1 in the first section of the rule (the numbers to be matched/translated)

Rule 1 translates called numbers of the range (0204242000-0204242999) to a range (000-999). In Kenya the first range depicts landline numbers offered by Telkom Kenya. The second range depicts internal extension numbers of a given company.
Rule 2 translates called numbers of the range (254204242000-254204242999) to a range (000-999). This is used by international callers who want to call us. Someone who wants to reach me from San Jose, California will dial +254204242133 on their mobile phone. The call will be routed by their carrier, say Verizon to Telkom Kenya, the call hits our router through the E1 provided by Telkom, then gets translated to 133 and my desk phone will start ringing.
Rule 3 translates called numbers of the range (424200-4242999) to the range (000-999). This rule is only used by callers within Nairobi and using landlines. Since the calling party are in our area code of 20 (For Nairobi area)
The rule instructs the router on how to reach an internal extension. Since an internal extension is defined using only 3 numbers as shown below;

Note that:
A calling party within Nairobi can use all formats. He can dial 4242133 or 0204242133 or +2544242133

A calling party within Kenya but outside Nairobi can only dial 0204242133 or +254204242133

A calling party from outside Kenya can only dial +254204242133


My extension (133) as defined in the voice gateway

#ephone-dn 9 dual-line
 number 133
 label Kevin Kamau - 133
 description Kevin Kamau
 name Kevin Kamau

A client in Kenya would reach me directly without going through the operator by dialing 0204242133 on his cellphone. The call goes through his mobile carrier, say Safaricom, then routed to Telkom and lastly hits our voice gateway through the E1 trunk.
Note that the only the first zero is ignored by the carriers so only 204242133 is examined by our router. Even the zero you in our mobile numbers is irrelevant as far as call routing is concerned.

The incoming call uses the below dial-peer to reach our company through the E1 defined as: port 0/1/1:15

#dial-peer voice 5 pots
 description "Telkom PSTN Dialpeer"
 incoming called-number .  
 direct-inward-dial
 port 0/1/1:15


The translation-profile we created earlier is applied on the E1 to do the translation

#voice-port 0/1/1:15
 translation-profile incoming INCOMING-E1

You can test if your translation rule are working by using the following test command:

 COMPANY-X-VG#test voice translation-rule 1 254204242133
Matched with rule 5
Original number: 254204242133   Translated number: 133
Original number type: none      Translated number type: none

Original number plan: none      Translated number plan: none


This is a basic use case of using translation patterns for only incoming calls.

No comments:

Post a Comment