cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
597
Views
5
Helpful
1
Replies

how to make a translation rule to reduce numbers?

baselzind
Level 6
Level 6

please can someone tell me how to make a translation rule to reduce calling number count like if the phone that is calling number is 1234 the translation rule would make it 234?

1 Accepted Solution

Accepted Solutions

R0g22
Cisco Employee
Cisco Employee
If you are just doing a 1:1 mapping, following should do it -

voice translation-rule 1
rule 1 /^1234$/ /234/

The carrot and dollar are necessary to restrict the IOS to only look for 4 digits. If you have a bunch of DID's that need the same treatment, you can do that with a wildcard statement as well -

voice translation-rule 1
rule 1 /^.\(...\)$/ /\1/

Tha above would take any 4 digit number and reduce it to 3 digits ignoring the first digit which could be anything from 0 -9.

You can use "test voice translation-rule 1 XXXX" command to test your rules before applying them.

View solution in original post

1 Reply 1

R0g22
Cisco Employee
Cisco Employee
If you are just doing a 1:1 mapping, following should do it -

voice translation-rule 1
rule 1 /^1234$/ /234/

The carrot and dollar are necessary to restrict the IOS to only look for 4 digits. If you have a bunch of DID's that need the same treatment, you can do that with a wildcard statement as well -

voice translation-rule 1
rule 1 /^.\(...\)$/ /\1/

Tha above would take any 4 digit number and reduce it to 3 digits ignoring the first digit which could be anything from 0 -9.

You can use "test voice translation-rule 1 XXXX" command to test your rules before applying them.