Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Telephony regular expression question

Posted on 2011-09-23
11
Medium Priority
?
289 Views
Last Modified: 2012-06-27
In the voice translation-rule below - what is the difference between rule 1 and rule 2?
Is it that rule 1 will match 1919678 and rule 2 would not?  And a related question - would 919678 (with no leading digit) also match rule 1 (making rule 2 superfluous?)  This is on a Cisco 3845 voice gateway and I'm trying to free up some space in the translation rule.  Thanks!

voice translation-rule 10
 rule 1 /^\+919678/ //
 rule 2 /^919678/ //
0
Comment
Question by:amigan_99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 15

Expert Comment

by:sr75
ID: 36592645
You can teat your translation rules.  

Test voice translation rule 10 (any number)


But to answer you question.  the  ^ means begins with so rule 2 would not match as it begins with 9.
0
 
LVL 1

Author Comment

by:amigan_99
ID: 36592734
What does the \+ mean?  I understand the \ escapes the following character to it means literally "+".  But there is no "+" key on a telephone.  So when would that ever be found in a dial string?
0
 
LVL 15

Expert Comment

by:greg ward
ID: 36592739
Well i would say test it to make sure. But i think your are right.
so remove it from the config and test using.

test voice translation-rule 10 919678


Use the link below for reference on translation rules.
http://www.cisco.com/en/US/tech/tk652/tk90/technologies_tech_note09186a0080325e8e.shtml

Greg
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 15

Accepted Solution

by:
greg ward earned 2000 total points
ID: 36592751
Sorry was in the kitchen and did not see any of the above comments
From the link above.

. Any single digit
0 to 9,*,# Any specific character
[0-9] Any range or sequence of characters
* Modifier—match none or more occurrences
+ Modifier—match one or more occurrences
? Modifier—match none or one occurrence


Greg
0
 
LVL 1

Author Closing Comment

by:amigan_99
ID: 36592805
Thanks much!
0
 
LVL 19

Expert Comment

by:feptias
ID: 36592815
Telephone keypads may not have a + key (although some do on the zero button), but SIP gateways and equipment used by telephone service providers may insert the + character as a prefix because it is defined in the ITU's E.164 standard for international numbering plans and is a valid prefix in the North American Numbering Plan.
http://en.wikipedia.org/wiki/E.164
http://en.wikipedia.org/wiki/North_American_Numbering_Plan

(How did we all manage before Wikipedia?)

In your regular expression it is a literal + and is not being used to mean "match one or more occurences"
0
 
LVL 1

Author Comment

by:amigan_99
ID: 36592830
Thank you feptias.  I was thinking that likely the \ was stripping the + of its magic powers.  Appreciate the confirmation.  I need to check with my carriers if they are every likely to pass me a +.
0
 
LVL 15

Expert Comment

by:greg ward
ID: 36592956
E.164 numbers can have a maximum of fifteen digits and are usually written with a + prefix. To actually dial such numbers from a normal fixed line phone, the appropriate international call prefix must be used.


from the website http://en.wikipedia.org/wiki/E.164.

It says you dont ever dial a +
and if you could it would not be recognised by the cisco equipement or any other AFAIK.
Greg
0
 
LVL 19

Expert Comment

by:feptias
ID: 36595721
> "It says you don't ever dial a +"
I could not see that quoted anywhere in the wiki article.

A google search on "plus dialing" returns various results discussing the benefits of dialing + as a prefix for international calls. For example:
http://www.messagingnews.com/onmessage/ben-gross/using-plus-simplify-international-dialing
http://www.howtocallabroad.com/qa/plus-sign.html
Also, as I mentioned earlier, the + symbol is printed on the zero key of some mobile phones.

> "...if you could it would not be recognised by the cisco equipment"
But isn't that why the Cisco 3845 mentioned in the question already had a regular expression specifically to recognise the prefix?
0
 
LVL 15

Expert Comment

by:greg ward
ID: 36595777
rule 1 /^\+919678/ //
 rule 2 /^919678/ //


the + is to include numbers like 1919678 or 11919678 in fact any number infront of 919678

Greg
0
 
LVL 19

Expert Comment

by:feptias
ID: 36595956
I don't pretend to be an expert on regular expressions, but I thought \+ would be interpreted as a literal plus sign. However, it does seem an extremely unlikely dial string in this particular context and your interpretation would make more sense.

Please see the section "Escaped" characters literals in the following link (approx two thirds of the way down the the whole article):
http://gnosis.cx/publish/programming/regular_expressions.html
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you think no one can listen in on your VOIP conversations, eh? Well... if you haven't setup Secure Real Time Transport (SRTP), your voice communications can be hacked into by just about anyone! First, let's talk about the intended audience for…
Although VoiceOver IP has been around for a while, internet connections have only recently become fast enough to provide good call quality. Now, VoIP has become a real option for businesses looking at ways to improve their business model. In this ar…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question