Friday, September 03, 2010

Translation Rules in IOS gateways

Some quick notes stolen from http://cciev.wordpress.com/2006/06/10/translation-rules-and-profiles/:

voice translation-rule 1
rule 1 /123/ /456/
rule 2 /^123/ /456/
rule 3 /^123$/ /456/
rule 4 /.*/ /456/
rule 5 /^123*/ /456/
rule 6 /^123+/ /456/
rule 7 /^123?/ /456/
rule 8 /^$/ /456/

a. rule 1 is a one to one replacement of any occurence of 123 in the source number with 456.
b. rule 2 replaces any number starting with 123 with a 456.
c. rule 3 replaces only the number 123 as the source number with 456.
d. rule 4 replaces any number with the number 456, including null.
e. rule 5 says any number that starts with 12 and has 0 or more occurence of 3 with 456.
f. rule 6 says any number that starts with 12 and has 1 or more occurence of 3 with 456
g. rule 7 says any number that starts with 12 and has 0 or 1 occurence of 3 with 456.
h. rule 8 says any number with no input digits (empty ani for example) with 456.

Misc items:
A. dot means a single digit.
B. [0-9] specifies a range
C. .* means any digit followed by zero or more occurence, virtually any digit including null
D. .+ means any digit followed by one or more occurence, virtually any digit excluding null
E. ^$ means no digits.
F. () groups digits into sets

No comments:

Post a Comment