Presentation on theme: "Voice Translation Rules Digit manipulation using translation rules and voice translation rules in Cisco IOS."— Presentation transcript:
Voice Translation Rules Digit manipulation using translation rules and voice translation rules in Cisco IOS
Presentation Goal The Goal of this presentation is to provide the team with fundamental understanding of digit manipulation using Translation rules and Voice Translation rules.
Learning objectives At the end of the presentation you should be able to: Identify the difference between a translation rule and a voice translation rule. Implement, test and troubleshoot the different methods of digit manipulation outlined in the presentation.
Vocabulary Automatic Number Identification (ANI) – This is the “Calling Number”. Dialed Number Identification Service (DNIS) – This is the “Called Number”. Translation Rule – A basic method of digit manipulation based on a matched string. Voice Translation Rule – A more advanced method of digit manipulation using regular expressions.
Why we need digit manipulation Digit manipulation is used to help manage our number plans. Different PSTN providers may provide different quantities of digits to different sites. This could lead to overlaps in DN ranges between sites. So we use the various methods of digit manipulation to standardize them. In this presentation we will only cover IOS (Voice) translation rules.
IOS Translation Rules How we use translation rules We use them to expand 5 digit extensions to the full 10 digit extension that is on the phone. We only use them in SRST and H.323 dial peers. We can only have a max of 10 rules configured for 1 translation rule.
IOS Translation Rules cont. A translation rule consists of 3 parts The translation rule itself: Translation-rule 1 The rules that make up the translation rule: Rule 0 ^7… Where the translation rule is applied: Voice-port 3/0:23 Translate called 1
IOS Translation Rules cont. The rule below takes an inbound 5 digit called number and expands it to a full 10 digits Configuration Translation-rule 1 Rule 0 ^7… Rule 1 ^4… Voice-port 3/0:23 Translate called 1 Verification – FLJVFB401R1#test translation-rule The replaced number:
IOS Translation Rules cont. Implementing translation rules on our network translation-rule 1- defines the translation rule Rule 0 ^ individual rules that are specified for translation-rule 1 Rule 1 ^ Rule 9 ^ ~config removed~ call-manager-fallback-SRST configuration where the translation rule is applied ~config removed~ transfer-pattern transfer-pattern transfer-pattern transfer-pattern 9T transfer-pattern transfer-pattern translate called 1- applies the translation-rule 1 to the callED number and expands it according to the translation rule ~config removed~
Voice Translation Rules Voice Translation Rules are used in the same manner as Translation Rules but they allow for a more granular manner of digit manipulation for the following reasons: They use regular expressions. They allow up to 15 rules to be specified per voice translation rule. Configured in 4 parts similar to translation rules.
Voice Translation Rules cont. Using voice translation rules requires an understanding of regular expressions.
Voice Translation Rules cont. The 4 parts of a voice translation rule are: The voice translation rule. The rules that make up the voice translation rule. The profile that defines where the rule manipulates the digits. Lastly where the profile is applied.
Voice Translation Rules cont. A basic voice translation rule. This will match any 4 digit string that starts with a 2 and then replace it with Voice translation-rule 1-Defining the Voice Translation Rule rule 1 /^2…/ / /-The rule that dictates the matches and what to do Voice-translation-profile OutgoingCalled-Defining the voice translation profile that will be applied translate called 1 -Which voice translation rule to match on and where to apply Dial-peer voice 100 pots destination-pattern 2… port 3/0:23 translation profile outgoing OutgoingCalled-Which profile to apply and whether to apply to incoming or outgoing
Voice Translation Rules cont. Using voice translation rules requires an understanding of regular expressions. (they use this crazy table) Voice Translatio Rule OperatorsDescription ^Matches the expression at the start of the line. $Matches the expression at the end of the line. /Delimiter that the marks the start and end of both the matching and replacment strings. \Escapes the meaning of the next character. - Indicates a range when not in the first or last position. This is typically used with the [and] to indicate a range. [list]Matches a single character specified in a list. [^list]Does not match a single character specified in a list..Matches any single character. *Repeats the previous regular expression zero or more times +Repeats the previous regular expression one or more time ? Repeats the previous regular expression zero or one occurrence of the previous expression. (Use Ctrl-V ? To enter in IOS) ()Groups digits into sets &Brings all the matched digits into the replacement string
Voice Translation Rules cont. Regular expressions can be complex and confusing. Some things to keep in mind are: Begin and end any match or replacement string with “/” rule 1 /1234/ /5678/ The match string can be made up of an explicitly defined string or wildcards, the replacement string cannot contain any wildcards. Use the “^” to match from the beginning of a string. rule 3 /^7…./ / / Use the “$” to match from the end of a string. rule 2 /^4.\(4….$\)/ /90446\1/ The “(\)” escapes the next character in the string. /^3\(…\)/ /345\1/
Voice Translation Rules cont. If you want to match a wild card and not change them create a set. rule 4 /^3\(…\) /4\1/ Any digits that are in the match string but are not explicitly matched by the match string are carried over to the match string unchanged. The following slide has examples of some regular expressions used in voice translation rules.
Voice Translation Rules cont. Voice translation-rule 1 Rule 1 /^$/ / / - matches a null string and replaces it with Rule 2 /^987\(.+\)/ /464\1/ - matches 987 something and prepends the set (.+) with with 464 Rule 3 /^\(770\)\(….\)/ /678\2/ - matches 770 then prepends 678 to the second set (….) Rule 4 /\(^…\)464\(….\)/ /\1987\2/ - changes the middle of the number from 464 to 987 Rule 5 /\(^.*\)7399/ /\15309/ - matches on the beginning of a number and replaces the end
Voice Translation Rules cont. How we use Voice Translation rules on our network. Voice translation-rule 1 Rule 1/^105110….$/ / / - matches the nonDID range and replaces it with the BTN Rule 2 /\^904\)1.1\(….\)/ /\1987\2/ - matches on the NPA of the site and the first pseudo number range Rule 3 /^..$/ / / - matches on the intercom line if it tries to make an offnet call during SRST These are applied as outgoing to the voice translation-profile then that profile is associated to the SRST config.
Voice Translation Rules cont. How do we verify the Translation Rules and Voice Translation Rules? To test a translation rule from the IOS CLI test translation-rule the “1” specifies which translation rule to test against; is the the number used to test the rule The replaced number: To test a voice translation rule from the IOS CLI test voice translation-rule the “3” specifies which translation rule to test against; is Matched with rule 2 the number used to test the rule Original number: Translated number: Original number type: none Translated number type: none Original number plan: none Translated number plan: none
Summary (Voice) translation rules can be used in the IOS to manipulate the digits in a call. Voice translation rules use regular expressions to match digits.
For your reading pleasure Regular-expression tutorial. Voice Translation Rules. ml Using IOS Translation Rules - Creating Scalable Dial Plans for VoIP Networks. mple09186a shtml