Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Translation rule help

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

Re: Translation rule help

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 Holloway

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

Re: Translation rule help

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 Holloway

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

Re: Translation rule help

Anthony,

Thank you for your help.

Regards,

hasrat

Re: Translation rule help

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.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
192
Views
0
Helpful
3
Replies
CreatePlease login to create content