voice translation-rule help

Answered Question
Dec 17th, 2010

OK, so I am having a hard time really understanding translation-rules.  What I want to do seems pretty simple, but it is not working.

When the following three numbers are called, I want the translation rule to send the digits as dialed.  (these are not real numbers we own, fyi)

555.222.5551

555.222.5552

555.222.5553

Here is that I have

voice translation-rule 1
rule 1 /5552227564/ /\1/
rule 2 /555222555[1-3]/ /\1/
rule 3 /5552227610/ /6000/
rule 4 /\(.*\)/ /6001/

When I tried to call 5552225551, I can't complete the call.  When I debug the translation, I see that is replaced the patten with NULL (at least that is how is looks to me).  Is my translation-rule the problem, so is it somewhere else?


-----------

Dec 17 14:53:44.116: //-1/4751A48A899F/RXRULE/sed_subst: Successful substitution; pattern=5552225551 matchPattern=555222555[1-3] replacePattern= replaced pattern=

collocation_router#test voice translation-rule 1 5552225551
Matched with rule 2
Original number: 5552225551     Translated number:
Original number type: none      Translated number type: none
Original number plan: none      Translated number plan: none

I have this problem too.
0 votes
Correct Answer by Paolo Bevilacqua about 3 years 4 months ago

Works for me


CME#sh voice translation-rule 1
Translation-rule tag: 1

        Rule 1:
        Match pattern: \(555222555[1-3]\)
        Replace pattern: \1
        Match type: none                Replace type: none
        Match plan: none                Replace plan: none

CME#test voice translation-rule 1 5552225551
Matched with rule 1
Original number: 5552225551     Translated number: 5552225551
Original number type: none      Translated number type: none
Original number plan: none      Translated number plan: none

Likely there is another reason for fast-busy.

  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 5 (1 ratings)
Paolo Bevilacqua Fri, 12/17/2010 - 08:15

You need round brackets (parenthesis mark) for pattern match recall.

rule 3 /\(555222555[1-3]\)/ /\1/

Support@mmicnc.com_2 Fri, 12/17/2010 - 08:38

p.bevilacqua wrote:

You need round brackets (parenthesis mark) for pattern match recall.

rule 3 /\(555222555[1-3]\)/ /\1/

Dec 17 16:34:27.772: //-1/599DDF6189B5/RXRULE/sed_subst: Successful substitution; pattern=5552225551 matchPattern=555222555[1-3] replacePattern=\1 replaced pattern=

Here is the debug log.  I still got a fast busy.

Correct Answer
Paolo Bevilacqua Fri, 12/17/2010 - 08:46

Works for me


CME#sh voice translation-rule 1
Translation-rule tag: 1

        Rule 1:
        Match pattern: \(555222555[1-3]\)
        Replace pattern: \1
        Match type: none                Replace type: none
        Match plan: none                Replace plan: none

CME#test voice translation-rule 1 5552225551
Matched with rule 1
Original number: 5552225551     Translated number: 5552225551
Original number type: none      Translated number type: none
Original number plan: none      Translated number plan: none

Likely there is another reason for fast-busy.

Support@mmicnc.com_2 Fri, 12/17/2010 - 09:01

p.bevilacqua wrote:

Works for me


CME#sh voice translation-rule 1
Translation-rule tag: 1

        Rule 1:
        Match pattern: \(555222555[1-3]\)
        Replace pattern: \1
        Match type: none                Replace type: none
        Match plan: none                Replace plan: none

CME#test voice translation-rule 1 5552225551
Matched with rule 1
Original number: 5552225551     Translated number: 5552225551
Original number type: none      Translated number type: none
Original number plan: none      Translated number plan: none

Likely there is another reason for fast-busy.

I got it working!  I was missing some the \ and \ in the match pattern.  I do not understand how to write these AT ALL!  What did not make a lot of sense is that the first backslash is outside of the parentheses and the second backslash in inside the parentheses.  I've read the document explaining this from Cisco's website, but it still has not sunk in.

What got it working:

voice translation-rule 2
rule 1 /5552227564/ /\1/
rule 2 /\(555222555[1-3]\)/ /\1/
rule 3 /5552227610/ /6000/
rule 4 /\(.*\)/ /6001/

What I had before:

voice translation-rule 2
rule 1 /5552227564/ /\1/
rule 2 /(555222555[1-3])/ /\1/
rule 3 /5552227610/ /6000/
rule 4 /\(.*\)/ /6001/

Paolo Bevilacqua Fri, 12/17/2010 - 09:04

I did not catch that. The backslash does a function called "quoting", to prevent interpreting a special character as parenthesis .

I understand that in these days of pervasive GUIs, such concepts are not common knowledge as they were once.

Thank you for the nice rating and good luck!

Actions

Login or Register to take actions

This Discussion

Posted December 17, 2010 at 7:16 AM
Stats:
Replies:6 Avg. Rating:5
Views:506 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard

Rank Username Points
1 21,026
2 15,047
3 10,314
4 7,999
5 4,856
Rank Username Points
135
90
72
66
55