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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Translation rule, filter a number from being translated

The below translation rule is applied to FXS ports for FAX machines, the idea is to prepend all outbound FAX calls with "555" for control of routing.

!

voice translation-rule 1

rule 1 /^\(91..........$\)/ /555\1/

rule 2 /^\(9..........$\)/ /555\1/

rule 3 /^\(9.......$\)/ /555\1/

!

If I wanted set up a rule so I could dial a number from one of the FAX machines and it would not be prepended, I am thinking I should be able to create a rule 4 and add the number I want to dial, but I am not sure what the rule would look like.

Sort of like filter a number from the catch all first three lines.

Would this work?

           

rule 4 /^91234567890/ /91234567890/

Everyone's tags (3)
4 REPLIES
VIP Super Bronze

Re: Translation rule, filter a number from being translated

rule 4 /^91234567890/ /91234567890/

Yes this regex would work although you should add $ to terminate the line (e.g. /^91234567890$/). You could also do: /^91234567890$/ /\0/ to simlify things.

The one thing you would need to change is the order. As it currently stands rule one (1) will match and it will be over. You would want to bump the existing rules down one notch.

Please remember to rate helpful responses and identify helpful or correct answers.

New Member

Translation rule, filter a number from being translated

Thanks for the reply.

Can you explain the rule you created here?

/^91234567890$/ /\0/

For example:

/\0/ 

the documentation says that the backslash  "\ = Escapes the meaning of the next chracter",

So i am not sure what this is telling me, to ignore the 0? If so, why put it there?

VIP Super Bronze

Re: Translation rule, filter a number from being translated

The backslash doesn't always escape the next character. It does only if that character would otherwise have special significance.

IOS is using Unix regular expressione. Your favorite search engine has a plethora of information on the topic. Here is a Cisco-specific document that does some explaining though:

http://www.cisco.com/en/US/docs/ios/12_2/termserv/configuration/guide/tcfaapre_ps1835_TSD_Products_Configuration_Guide_Chapter.html

The regular expression \0 would write the entire matched string [...]

Please remember to rate helpful responses and identify helpful or correct answers.

Re: Translation rule, filter a number from being translated

On the POTS dial peer you can use prefix command so no need for translation rule

Sent from Cisco Technical Support iPad App

329
Views
10
Helpful
4
Replies
CreatePlease login to create content