Voice Translation Rules v2

Voice Translation Rules
Digit manipulation using translation rules and
voice translation rules in Cisco IOS
The Goal of this presentation is to provide
the team with fundamental understanding
of digit manipulation using Translation
rules and Voice Translation rules.
Presentation Goal
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.
Learning objectives
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.
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.
Why we need digit manipulation
How we use translation rules
 We use them to expand 5 digit extensions
to the full 10 digit extension that is on the
 We only use them in SRST and H.323 dial
 We can only have a max of 10 rules
configured for 1 translation rule.
IOS Translation Rules
A translation rule consists of 3 parts
 The translation rule itself:
Translation-rule 1
 The rules that make up the translation
Rule 0 ^7…. 904987
 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
Translation-rule 1
Rule 0 ^7…. 904987
Rule 1 ^4…. 904464
Voice-port 3/0:23
Translate called 1
Verification –
FLJVFB401R1#test translation-rule 1 77486
The replaced number: 9049877486
IOS Translation Rules cont.
Implementing translation rules on our network
translation-rule 1
Rule 0 ^3 561393
Rule 1 ^15 1002015
Rule 9 ^2 561362
~config removed~
~config removed~
transfer-pattern 3....
transfer-pattern 561393....
transfer-pattern 100201....
transfer-pattern 9T
transfer-pattern 561362....
transfer-pattern 2....
translate called 1
- defines the translation rule
- individual rules that are specified for translation-rule 1
-SRST configuration where the translation rule is applied
- applies the translation-rule 1 to the callED number and expands it
according to the translation rule
~config removed~
IOS Translation Rules cont.
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
 They use regular expressions.
 They allow up to 15 rules to be specified
per voice translation rule.
 Configured in 4 parts similar to translation
Voice Translation Rules
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 9120212012
Voice translation-rule 1
rule 1 /^2…/ /912012012/
Voice-translation-profile OutgoingCalled
translate called 1
Dial-peer voice 100 pots
destination-pattern 2…
port 3/0:23
translation profile outgoing OutgoingCalled
-Defining the Voice Translation Rule
-The rule that dictates the matches and what to do
-Defining the voice translation profile that will be applied
-Which voice translation rule to match on and where to apply
-Which profile to apply and whether to apply to incoming or
Voice Translation Rules cont.
Using voice translation rules requires an
understanding of regular expressions.
(they use this crazy table)
Voice Translatio Rule Operators
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.
Matches a single character specified in a 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…./ /9048675309/
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
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
The following slide has examples of some regular expressions used
in voice translation rules.
Voice Translation Rules cont.
Voice translation-rule 1
Rule 1 /^$/ /8776754345/
- matches a null string and replaces it with 8776754345
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….$/ /9089872345/ - 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 /^..$/ /9089872345/ - 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 1 77486
the “1” specifies which translation rule to test against; 77486 is the
the number used to test the rule
The replaced number: 9049877486
To test a voice translation rule from the IOS CLI
test voice translation-rule 3 4642946 - the “3” specifies which translation rule to test against; 4642946 is
Matched with rule 2
Original number: 4642946
Original number type: none
Original number plan: none
the number used to test the rule
Translated number: 9044642946
Translated number type: none
Translated number plan: none
Voice Translation Rules cont.
(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.
Regular-expression tutorial.
Voice Translation Rules.
Using IOS Translation Rules - Creating Scalable
Dial Plans for VoIP Networks.
For your reading pleasure
Related flashcards
Create Flashcards