cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1176
Views
0
Helpful
1
Replies

Translation rule to strip digits

Tomas Mazur
Level 1
Level 1

I am trying to add a new voice translation rule to our CUBE in order to strip some incoming digits.

Router IOS is Version 15.7(3)M4b (2901).

 

I would like to strip all but the last 3 incoming digits  on number +499874565XXX.

When I try to add the translation rule below I get error:

 

DE-PSTN-01(config-translate)#rule 1 /^.*\(...\)/ /\1/ 
Incorrect format for Translation Match Pattern
        regular expression must be of the form  ^(\^)?(\+)?([0-9,A-F.*%?#]+)$

 Invalid match pattern string input /^.*\(...\)/

I have taken this particular example from an online forum which was written in 2011 so not entirely sure if the syntax has changed or if its a bug?

1 Accepted Solution

Accepted Solutions

Tomas Mazur
Level 1
Level 1
Just realized I was missing "voice" in front of the translation-rule command. voice translation-rule 201 rule 1 /^.*\(...\)/ /\1/ Works like a charm.

View solution in original post

1 Reply 1

Tomas Mazur
Level 1
Level 1
Just realized I was missing "voice" in front of the translation-rule command. voice translation-rule 201 rule 1 /^.*\(...\)/ /\1/ Works like a charm.