cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2445
Views
4
Helpful
10
Replies

Need RegEx Help - Simple Voice Translation-Rule

Lucas Phelps
Level 5
Level 5

I've got a Cisco ISR router that is performing SIP Cube operations.  When I call gets routed to my Microsoft Lync server, it needs to be in E.164 format..meaning I need to have a +1 prefixed to all numbers

Can someone help me create a voice translation rule that simply takes the input number, prefixes a +1 on the front and sends it along?

Here is what I'm using now, and it works.  But I want one translation rule that I can use for any number.

voice translation-rule 15

rule 1   /3165551111/    /+13165551111/

1 Accepted Solution

Accepted Solutions

The simplest rule to do this would be:

rule 1 // /+1/

View solution in original post

10 Replies 10

islam.kamal
Level 10
Level 10

My dear , kindly fine the below.:

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

Thank you

Thanks Islam, does that add on the + (plus) at the beginning before the 1?

Basically, the translation rule just needs to take any inbound 10-digit number from my carrier and add a +1 to the beginning.

-Lucas

Dear Lucas

please also after you will configure , kindly test using the below comand.

router # test voice tanslation-rule 1  3165551111

you must find that the number will change to    0013165551111.

Thank you


Thanks for the tip on the test voice translation-rule feature, that is a great help.

It looks like you can indeed do a + on the beginning of the number, this rule does it:

voice translation-rule 4

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

Tested as:

rCube#test voice translation-rule 4 1112223333

Matched with rule 1

Original number: 1112223333     Translated number: +11112223333

Original number type: none      Translated number type: none

Original number plan: none      Translated number plan: none

Anas Abueideh
Level 9
Level 9

Hi,

if you need to + to appear in the number you can use the following voice translation rue
voice translation-rule 1
rule 1 /(..........$)/ /\+\0/

HTH
Anas

rate if it is helpful


Sent from Cisco Technical Support Android App

So Lucas , you can try the two ways  (my solution)  or Eng.aabueideh's slution. Please tell us the feedback.

Anas, the router complained about your rule, so I had to enter it at as:   rule 10 /..........$/     /+\0/

         

          It did indeed add the + sign on the beginning of a 10-digit number, but not the 1.

Islam, your rule converted a 9-digit number and added 001 on the front of it.

The rule I posted above works great, rule 1 /\(.*\)/ /+1\1/

Thanks Guys!

very good congatulation . It is the same for me +1 is same as 001 ( in arab countries we deal with 001). Anyway you ae welcome anytime.

The simplest rule to do this would be:

rule 1 // /+1/

Yes that is true, many ways you can use.