cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
368
Views
0
Helpful
3
Replies

Translation rule help

Hasrat Raja
Level 1
Level 1

Hello,

is there a way to combine these 3 rules to 1'

!

voice translation-rule 1

rule 5 /8881211/ /0051211/

rule 5 /8881212/ /0051212/

rule 5 /8881213/ /0051213/

!

Thaks

hasrat

1 Accepted Solution

Accepted Solutions

Anthony Holloway
Cisco Employee
Cisco Employee

Yes there is:

voice translation-rule 1

rule 1 /888121\([1-3]\)/ /005121\1/

!

This takes the last digit: either a 1, 2, or 3 (as indicated by [1-3]) and then places it in the replace string with the stored reference of \1.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

View solution in original post

3 Replies 3

Anthony Holloway
Cisco Employee
Cisco Employee

Yes there is:

voice translation-rule 1

rule 1 /888121\([1-3]\)/ /005121\1/

!

This takes the last digit: either a 1, 2, or 3 (as indicated by [1-3]) and then places it in the replace string with the stored reference of \1.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Anthony,

Thank you for your help.

Regards,

hasrat

It would have been smart on my part, to actually test this before posting it.  Thankfully I nailed it blind.

Test Results

Router#! Show voice translation-rule 1

Router#sh run | sec rule 1

voice translation-rule 1

rule 1 /888121\([1-3]\)/ /005121\1/

Router#

Router#! Test rule 1 with a non-matching number of 8881210

Router#test voice translation-rule 1 8881210

8881210 Didn't match with any of rules

Router#! Test rule 1 with a matching number of 8881211

Router#test voice translation-rule 1 8881211

Matched with rule 1

Original number: 8881211        Translated number: 0051211

Original number type: none      Translated number type: none

Original number plan: none      Translated number plan: none

Router#! Test rule 1 with a matching number of 8881212

Router#test voice translation-rule 1 8881212

Matched with rule 1

Original number: 8881212        Translated number: 0051212

Original number type: none      Translated number type: none

Original number plan: none      Translated number plan: none

Router#! Test rule 1 with a matching number of 8881213

Router#test voice translation-rule 1 8881213

Matched with rule 1

Original number: 8881213        Translated number: 0051213

Original number type: none      Translated number type: none

Original number plan: none      Translated number plan: none

Router#! Test rule 1 with a non-matching number of 8881214

Router#test voice translation-rule 1 8881214

8881214 Didn't match with any of rules

Router#

Router#! Done

Anthony Holloway


Please use the star ratings to help drive great content to the top of searches.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: