[cisco-voip] translation-rule - what in the hell.

Jakub Klausa jacke at bofh.pl
Sat Aug 2 17:54:18 EDT 2003


'lo

	I have some issues with translation-rules statement.
	It basicly looks like this:

s5300-tester#sh translation-rule 30000
Translation rule address: 0x63AE67B4
Tag name: 30000
Translation rule in_used 1
**** Xrule rule table ******* 
        Rule : 0
        in_used state: 1
        Match pattern: ^71.......
        Sub  pattern: 71
**** Xrule rule table ******* 
        Rule : 1
        in_used state: 1
        Match pattern: ^61.......
        Sub  pattern: 61
**** Xrule rule table ******* 
        Rule : 2
        in_used state: 1
        Match pattern: ^8000
        Sub  pattern: 128000000
**** Xrule rule table ******* 
        Rule : 10
        in_used state: 1
        Match pattern: any
        Sub  pattern: 713333333

Now, a little testing:

as5300-tester#test translation-rule 30000 711234567
The replaced number: 711234567
as5300-tester#test translation-rule 30000 71123456 
The replaced number: 71123456
as5300-tester#test translation-rule 30000 611234567
The replaced number: 611234567
as5300-tester#test translation-rule 30000 61123456 
The replaced number: 61123456
as5300-tester#test translation-rule 30000 8000    
The replaced number: 128000000
as5300-tester#test translation-rule 30000 344321
The replaced number: 713333333

Ok, I wanted the patterns to be matched exact, but it seems they are not.
Why in the hell seven dots (.) in the first two rules aren't matched exactly? 
Why a six digits after the initial prefix are ok for the rule?

The docs say explicitly:

. Indicates a single character.

But doesn't seem to work for me. 

Am i doing something wrong, or is it just a 'feature' i have to live with?

-- 
k.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 290 bytes
Desc: not available
Url : http://puck.nether.net/pipermail/cisco-voip/attachments/20030802/43a8868b/attachment.bin


More information about the cisco-voip mailing list