Testing translation rules

When you’re testing translation rules on a CME setup, you need to be very careful. An example of the test command:

test translation-rule 1 01234555321

Don’t assume that just because there is no output from the test, that nothing has been matched. If there are no matches across any of your rules, you will see:

01234555321 Didn't match with any of rules

If there’s no output, then you have a partial match. If you issue ‘debug voice translation’, and watch carefully, you will see output such as this:

Router(cfg-translation-rule)#do test voice translation-rule 1 0123
Router(cfg-translation-rule)#
//-1/xxxxxxxxxxxx/RXRULE/regxrule_match: more digits needed; number=0123 rule precedence=1
//-1/xxxxxxxxxxxx/RXRULE/regxrule_match: more digits needed; number=0123 rule precedence=2
//-1/xxxxxxxxxxxx/RXRULE/regxrule_match: more digits needed; number=0123 rule precedence=3
//-1/xxxxxxxxxxxx/RXRULE/regxrule_match: more digits needed; number=0123 rule precedence=4
//-1/xxxxxxxxxxxx/RXRULE/regxrule_rule_match: partial match found, partial_match 4

There is a problem with this: if your translation rules are mistakenly waiting for any number (as mine was this morning; I’d left a .* on the beginning of the expression!), then your calling will exhibit some odd behaviour.

For instance, when dialling extensions from one ephone to another (simply across CME) your call will be subject to the ‘timeout interdigit’ value (as set in telephony-service). Why? Well, if your translation rules pick up a partial match they wait for a predefined length of time to see if you dial any other digits. The time waited is predefined by the interdigit timeout!

Even if the number matches the correct dial-peer (eg. 20001, 20002) and eventually dials correctly, you will still be subjected to the interdigit timeout, despite the lack of any ‘T’ in your destination-patterns. This is purely because the translation rules are waiting on your dial pattern.

Just thought I’d mention it. Really confused me this morning – many thanks to Tele for helping out!

Leave a Reply

You must be logged in to post a comment.