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

Insert no#3 and remove the last 3 digits...

Dear All,

I would like to issue a voice translation-rule that can insert the digit number 3 before/after certain digits and also remove the last 3 digits at the same time.

# Details:

------------

I receive the following Dialed numbers on a voice port for example: 004925147260123 For these numbers I have 3 sets:

- Set 1: 004925147 is always the same; I need to insert the digit number 3 just after 004925, for my example 004925 --> must be 0049253

- Set 2: consists of 3 digits can vary so I want the translation rule to translate these numbers to be the same numbers, for my example 260 --> must be 260

- Set 3: The last 3 digits also they can vary but I would like to remove these last 3 digits from the final translated number

So for my example I would like the voice translation-rule to translate the dialed no# 004925147260123 so that it will be 0049253147260

Appreciate you support,

Thanks..

2 ACCEPTED SOLUTIONS

Accepted Solutions
Hall of Fame Super Gold

Re: Insert no#3 and remove the last 3 digits...

Hi,

rule 1 /^\(004925147\)\(...\)...$/ /\13\2/

try with "test voice translation-rule xxx

Hope this helps, please rate post if it does!

Hall of Fame Super Gold

Re: Insert no#3 and remove the last 3 digits...

Sorry, I misread the numbers. There is also a shorter form:

rule 1 /\(......\)...$/ /3\1/

Thanks for the nice rating and good luck!

5 REPLIES
Hall of Fame Super Gold

Re: Insert no#3 and remove the last 3 digits...

Hi,

rule 1 /^\(004925147\)\(...\)...$/ /\13\2/

try with "test voice translation-rule xxx

Hope this helps, please rate post if it does!

New Member

Re: Insert no#3 and remove the last 3 digits...

Thanks, the way i want it can be done like this:

rule 1 /^\(004925\)\(......\)...$/ /\13\2/

But you gave me the right way..

Appreciate your support..

Thanks.

Hall of Fame Super Gold

Re: Insert no#3 and remove the last 3 digits...

Sorry, I misread the numbers. There is also a shorter form:

rule 1 /\(......\)...$/ /3\1/

Thanks for the nice rating and good luck!

New Member

Re: Insert no#3 and remove the last 3 digits...

thanks again it works as well..

however you've missed a dot in the second set :)

Hall of Fame Super Gold

Re: Insert no#3 and remove the last 3 digits...

Did I?

I have six dots in first and three in second set.

This time I thought, I had it right :)

129
Views
0
Helpful
5
Replies
CreatePlease to create content