<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Rich,<br>
<br>
<i>It's kind of tough to truly understand what you are trying to
accomplish
<br>
<br>
</i>Ack, sorry! It's hard to post to the list on a saturday when my
2year old is wanting to play with the keyboard as well. Best I can do
is half a mind, most of the time that's enough. <br>
<br>
Not always, however. :)<br>
<br>
<i>(or ask for). Apparently you've got something more in mind that
words are making it through the list. Reading between the lines, it
would appear from the 800-in that calls are coming in from some
external source, and you trying to do something with them. Can you be a
little more explicit<br>
</i><br>
I have an 800 number from teliax. When my "local" users dial it, they
will dial 1866... instead of the 866 I have in my dial plan. I do not
want the call to use one of my external sources to terminate the call (
in essence, dialing out via voicepulse, and recieving the call via
teliax ). I know I can do two seperate exten patterns, but I was
hoping for a single pattern. To that end, I was wondering if there was
a way of saying "Match this 0 or 1 times", something I'm used to in
perl and the like.<br>
<br>
If there isn't, there isn't. Won't kill me to add the second exten
match.<br>
<br>
Sean<br>
<br>
Rich Adamson wrote:
<blockquote cite="mid439B7BF3.2000600@routers.com" type="cite">Or, just
do...
<br>
exten => 18661234567,1,Goto(800-in)
<br>
exten => 8661234567,1,Goto(800-in)
<br>
<br>
It's kind of tough to truly understand what you are trying to
accomplish
<br>
(or ask for). Apparently you've got something more in mind that words
are making it through the list. Reading between the lines, it would
appear from the 800-in that calls are coming in from some external
source, and you trying to do something with them. Can you be a little
more explicit.
<br>
<br>
<br>
<br>
<blockquote type="cite">Hi Dan,
<br>
<br>
Thanks for the info, but what I'm after is the ability to match a
digit/character 0 or 1 times at the beginning of the string. If I'm
reading your example right, it'll match anything starting with 866,
which doesn't work for me. I am trying to match:
<br>
<br>
18661234567 and 8661234567
<br>
<br>
Sean
<br>
<br>
ps: The pdf doesn't have a good explaination of this either, although
it occurs to me that this might not be possible with * if I'm having
such a hard time finding it.
<br>
Daniel Wright wrote:
<br>
<br>
<blockquote type="cite">Sean Kennedy wrote:
<br>
<br>
<blockquote type="cite">Hi all,
<br>
<br>
I'm having a hard time finding information related to the regular
expressions that can be used in a dialplan, specifically as an
extension. For example, I have an 800 number which I'd like to jump
directly to if my users dial it, instead of going over my pstn
termination. Currently, it looks like this:
<br>
<br>
exten => 8661234567,1,Goto(800-in)
<br>
<br>
However, I'd like 1866123456 to match as well. I can't find in the
wiki or sample configs how to say "match this 0 or 1 times".
<br>
Can anybody provide a link that would go over this? Again, I've been
digging through the wiki, but I seem to be missing it.
<br>
<br>
Thanks
<br>
<br>
Sean
<br>
<br>
</blockquote>
You could do it like this:
<br>
<br>
exten => _866.,1,GoTo(800-in)
<br>
<br>
The period means match one or more characters.
<br>
<br>
You can find reference to expressions and how they work in this pdf
book <a class="moz-txt-link-freetext" href="http://www.nufone.net/downloads/asteriskdocs/AsteriskTFOT.zip">http://www.nufone.net/downloads/asteriskdocs/AsteriskTFOT.zip</a>
<br>
</blockquote>
</blockquote>
</blockquote>
</body>
</html>