Hi:

 

You are talking about voice translation rules, I'm talking aboute translation 
patterns

 


 


From: [email protected]
To: [email protected]; [email protected]
Date: Fri, 19 Mar 2010 07:17:00 -0500
Subject: RE: [OSL | CCIE_Voice] Translation Pattern: Negate a range







Angel,
 
For starters, the only scenario where you’re need to worry about a plus being 
sent to an IOS gateway from CUCM would be an MGCP/SIP gateway.  H.323 cannot 
receive a plus from CUCM; it will simply strip it off before it hits any 
translation rules.
 
That said, say you are asked to strip off a + on a SIP/H.323 based CUCME router 
for all inbound calls.  If you’re running a negation in a translation pattern, 
you should enter the command like this:
 
voice translation-rule 1
  rule 1 /\+\([^1^2].*\)/ /\1/
 
Let’s break this apart:
rule 1     /     \+     \(     [^1^2].*     \)     /                     /     
\1     /
·         Rule 1
·         Start match pattern
·         \+ removes the special significance from the + and treats it as a 
digit
·         Now we need to create match pattern section.  We use parenthesis 
prefixed by \ to remove special significance
·         Your negation pattern requires a caret (^) for every negated value.  
[^123] would negate 1 but allow 2 and 3.  [^1^2] negates both 1 and 2.
·         .* functions just like the ! in CUCM
·         Now we end the match pattern section.  We use parenthesis prefixed by 
\ to remove special significance
·         Start replace pattern
·         \1 for match pattern scenario #1
 
test voice translation-rule 1 +2000
+2000 Didn't match with any of rules
 
test voice translation-rule 1 +1000
+1000 Didn't match with any of rules
 
test voice translation-rule 1 +4000
Matched with rule 1
Original number: +4000  Translated number: 4000
Original number type: none      Translated number type: none
Original number plan: none      Translated number plan: none
 
test voice translation-rule 1 +400043324324
Matched with rule 1
Original number: +400043324324  Translated number: 400043324324
Original number type: none      Translated number type: none
Original number plan: none      Translated number plan: none
 
Does that help?
 


From: [email protected] 
[mailto:[email protected]] On Behalf Of Angel Perez
Sent: Friday, March 19, 2010 6:30 AM
To: osl osl
Subject: [OSL | CCIE_Voice] Translation Pattern: Negate a range
 
Hi:
 
I wan't to negate a range of numbers in a tranlation pattern like in a router 
pattern, but I think that this is not possible after doing some tests.
 
For example, I want to match all pattern that begin with + and then any number 
except 1 and 2
 
\+[^1-2]!
 
In a router pattern this would match, but in a translation pattern do not...
 
Any suggestions? Thanks



Hotmail: Powerful Free email with security by Microsoft. Get it now.            
                          
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969
_______________________________________________
For more information regarding industry leading CCIE Lab training, please visit 
www.ipexpert.com

Reply via email to