cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
779
Views
15
Helpful
12
Replies

Syntax error when editing/readding voice translation-rules

Good day Gents,

 

I recently encountered an issue when attempting to add new VOIP phone on the 16.08.01 firmware(4331).

 

It should be simple enough change translating a 4 chipher assigned number to the full number on our servers, however receiving the following error when editing the translation rules:

 

The invalid syntax is given at circumfleks character. E.g. :

 

(cfg-translation-rule)# rule 4 /^<4 chiphers>$/ /<Full number>/
                                              ^                             

Translating prefixes is ok on a side note:

                                                                   

(cfg-translation-rule)# rule 18 /^47+/ /0147/
(cfg-translation-rule)# rule 19 /^1+/ /011/

 

Tested on a similar router running the same firmware with no issues. And the weird thing is that copying from the running config yields the same syntax error.

 

Any ideas?

12 Replies 12

I see this error when I have generated the ruleset with the command "translation-rule" instead of "voice translation-rule". Check to see if you have that initial command correct. If you are still getting an error after that, let us know and we can take a look.

Maren

Thanks for the reply. Input commands are added to the topic and are all starting with 'voice translation-rule'. Tests have been made on an identical setup(firmware, router version and general voice config) however the issue is only present on this one router with same input commands on the similar router without any issues.

How interesting! If it dislikes the voice translation-rule with the cipher but is happy with other voice translation-rules, is it possible there is a licensing issue with the security portion of IOS - isr4400-universalk9 vs. isr4400-universalk9_npe?

Maren

Hmm... It appears to be in order. Both images are isr4300-universalk9.16.08.01.SPA.bin for the compared router and the one having this issue. Here is the output of the license details, which also are identical on both, if to any help:

RO1#show license feature
Feature name Enforcement Evaluation Subscription Enabled RightToUse
appxk9 yes yes no yes yes
uck9 yes yes no yes yes
securityk9 yes yes no yes yes
ipbasek9 no no no yes no
FoundationSuiteK9 yes yes no no yes
AdvUCSuiteK9 yes yes no no yes
cme-srst yes yes no yes yes
hseck9 yes no no no no
throughput yes yes no no yes
internal_service yes no no no no

Åsmund

We can easily identify if we are  under the translation-rule or voice translation-rule.

 

When using translation-rule:-  (config-translate)#rule 

When using Voice translation-rule : (cfg-translation-rule)#



Response Signature


Can you post <4 chiphers> value which you tried on (cfg-translation-rule)# rule 4 /^<4 chiphers>$/ /<Full number>/ I can test this on my isr 4321 router.

 

 

 

 



Response Signature


Hello,

I am afraid I can't disclose the full number translation. It is basically 'translate this 4 digit IP phone assigned number(the last 4 digits of the full length number) to its full length E164 number.' E.g. 8803.

Åsmund

If what you want is to translate the last 4 digits to the full number I would recommend you to use this rule.

 

rule 4 /\(<4 last digits>\)$/ /<prefix to get full number>\1/

or this if you have a range of numbers and all you want to do is expand it out to the full number
rule 4 /\(....\)$/ /<prefix to get full number>\1/

 

If the number is longer than 4 digits there is no need to have both a ^ and a $ as that should indicate that you want to match on that specific 4 number string and that it start and ends with the digits.



Response Signature


Hello Roger,

 

Thank you for your input. Decided to drop the 'start with and end with' operands as a workaround. 

Do you however have any ideas as to why the operands aren't accepted as valid syntax?

Working with several systems and as mentioned initially, is that our preferred logic as there is the off-chance of another number string matching when dropping those operands.

 

Its valid on the exact same software/firmware on a different router. Its an interesting case to say the least.

 

Cheers!

Sorry but English is not my first language. I don't understand what you mean by this.


@asmund.bjerkeborve wrote:

 

Do you however have any ideas as to why the operands aren't accepted as valid syntax?


Would you mind to elaborate in simpler terms?



Response Signature


No worries.

 

The symbols ^ and $ should signify the start of the string and the end followed by a NULL, respectively, if understood correctly.

 

Do you know why these are invalid syntax eventhough its working on similar routers and even in the running config itself?

Without seeing the rule itself, it is difficult to know why the issue exists. You should be able to post the voice translation rule as-written if you change some portion of the number to a dummy number. Such as, in the US, changing the NPA to 999 and the NXX to 555.

Maren