06-26-2012 10:15 AM - edited 03-16-2019 11:51 AM
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/
06-26-2012 10:36 AM
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.
06-26-2012 10:50 AM
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?
06-26-2012 11:49 AM
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:
The regular expression \0 would write the entire matched string [...]
Please remember to rate helpful responses and identify helpful or correct answers.
06-26-2012 03:10 PM
On the POTS dial peer you can use prefix command so no need for translation rule
Sent from Cisco Technical Support iPad App
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide