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

Need help with voice translation rule

I wanted to create a rule that would match any number and append "1" to the number. I have created a sample voice translation:

voice translation-rule 2250

rule 1 /^(.+)/ /1\1/

but when I test the rule:

test voice translation-rule 2250 9047580977

9047580977 Didn't match with any of rules

How come?

2 REPLIES
New Member

Re: Need help with voice translation rule

Solved it. I had to add the "\" character before the "(" and ")" characters to get a match.

voice translation-rule 2250

rule 1 /^\(.+\)/ /1\1/

test voice translation-rule 2250 9047580977

Matched with rule 1

Original number: 9047580977 Translated number: 19047580977

I'm happy with this result.

Hall of Fame Super Gold

Re: Need help with voice translation rule

You said that you wanted to append, not prepend. This is done more simply as:

rule 1 // /1/

Because // matches an empty string "before" the number", and the rest is copied unchanged.

230
Views
0
Helpful
2
Replies
CreatePlease login to create content