cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Cisco Community Designated VIP Class of 2020

1520
Views
4
Helpful
10
Replies
Highlighted
Contributor

Need RegEx Help - Simple Voice Translation-Rule

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
Beginner

Re:Need RegEx Help - Simple Voice Translation-Rule

The simplest rule to do this would be:

rule 1 // /+1/

View solution in original post

10 REPLIES 10
Engager

Need RegEx Help - Simple Voice Translation-Rule

My dear , kindly fine the below.:

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

Thank you
Contributor

Need RegEx Help - Simple Voice Translation-Rule

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

Engager

Re: Need RegEx Help - Simple Voice Translation-Rule

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


Contributor

Need RegEx Help - Simple Voice Translation-Rule

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

Re:Need RegEx Help - Simple Voice Translation-Rule

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

Engager

Re:Need RegEx Help - Simple Voice Translation-Rule

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

Contributor

Re:Need RegEx Help - Simple Voice Translation-Rule

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!

Engager

Re:Need RegEx Help - Simple Voice Translation-Rule

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.

Beginner

Re:Need RegEx Help - Simple Voice Translation-Rule

The simplest rule to do this would be:

rule 1 // /+1/

View solution in original post

Engager

Re:Need RegEx Help - Simple Voice Translation-Rule

Yes that is true, many ways you can use.

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here