<div class="gmail_quote">On Thu, Feb 25, 2010 at 7:03 AM, Klaus Darilion <span dir="ltr"><<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Am 25.02.2010 14:53, schrieb Pavel Troller:<br>
<div><div></div><div class="h5">> Hi!<br>
><br>
>> _XXX! in overlap mode:<br>
>><br>
>> 1 is received ... wait for more<br>
>> 1 is received ... wait for more<br>
>> 1 is received ... trigger -> dialed number: 111<br>
>><br>
>> _XX. in overlap mode:<br>
>><br>
>> 1 is received ... wait for more<br>
>> 1 is received ... wait for more<br>
>> 1 is received ... trigger -> dialed number: 111<br>
><br>
> It's not true.<br>
> I've made an example on a live system for you.<br>
> Please look at the following:<br>
><br>
> exten => _133X.,1,NoOp(Collected number: ${EXTEN})<br>
> exten => _133X.,n,Milliwatt()<br>
><br>
> exten => _134XX!,1,NoOp(Collected number: ${EXTEN})<br>
> exten => _134XX!,n,Milliwatt()<br>
><br>
> Asterisk log:<br>
> Case 1:<br>
> -- Accepting overlap call from '11442' to '<unspecified>' on channel 0/19, span 1<br>
> -- Starting simple switch on 'DAHDI/g1-1'<br>
> -- Executing [1333333333@default-ovlp:1] NoOp("DAHDI/g1-1", "Collected number: 1333333333") in new stack<br>
> -- Executing [1333333333@default-ovlp:2] Milliwatt("DAHDI/g1-1", "") in new stack<br>
> Case 2:<br>
> -- Accepting overlap call from '11442' to '<unspecified>' on channel 0/19, span 1<br>
> -- Starting simple switch on 'DAHDI/g1-1'<br>
> -- Executing [13444@default-ovlp:1] NoOp("DAHDI/g1-1", "Collected number: 13444") in new stack<br>
> -- Executing [13444@default-ovlp:2] Milliwatt("DAHDI/g1-1", "") in new stack<br>
><br>
> Both the cases were dialled the same way: A call was received over PRI (no SS7)<br>
> in overlap mode (you can see) and then, once per second, a digit has bee sent<br>
> maximum 10 times. In the first case, after 10 digits the dialling was stopped,<br>
> and after a timeout about 5 seconds the call was connected. In the second<br>
> example, immediately after receiving the fifth digit, the connection was<br>
> established, so it was not possible to send more digits.<br>
><br>
> Do you see the diffference now ?<br>
<br>
</div></div>Yes, I see. You are right. ! stops the overlap timer.<br>
<br>
So, ! and . are not only different in 2 ways - minimum number of<br>
characters and overlap behavior.<br>
<br>
I guess the conclusion is that 2 different wildcards are needed - one<br>
which stops the overlap timer and one which does not stop the overlap timer.<br>
<br>
regards<br>
<font color="#888888">klaus<br>
</font><div><div></div><br></div></blockquote><div> </div><div>No, not really. Immediate end to a pattern is the immediate end of the pattern.<br>! has nothing to do with with classified pattern matching, perse. It isn't a "zero or more"<br>
type of construct. It's a "zero" sort of construct. It's a marker for the end of the pattern.<br>"Stop here and call it a day" sort of situation. So, there's no need for one more version<br>
of it.<br><br>But, you are right along the 'orthogonality' lines. If we are going to supply a regex equiv<br>to '+', we might as well supply one for '*'. OK, I get that. BNF, regex, all these sorts of <br>
systems took the trouble to supply both "0 or more" and "1 or more" constructs, even<br>tho the "1 or more" is just shorthand for a char match followed by "zero or more".<br>(ie, X+ == XX* )<br>
<br>So, all that's left is to decide what characters to use for them. <br>* and # are definitely out. They are on phone keypads, common input.<br>! and . and [ and ] are out. Quote chars are out-- they imply they come in pairs, so `,', and " are out too,<br>
along with '{', '}', and '(' and '), and '<' and '>''. '$' will confuse those familiar with regex. '@' is probably not a good candidate<br>because you'd think it would be common in urls, which might turn up sometime in extension values.<br>
'^' would also confuse regex familiar folks. '&' is commonly used in stuff like dialstrings and hints.<br>'_' is used to start patterns. We could use it for stuff like this, but it might confuse. '-' is out, it is<br>
used in range notation, and could confuse. '+' would normally be considered open game, but it turns<br>up in European numbers (doesn't it?) as a prefix, so that would louse things up or confuse at least.<br>| seems out, used as a separator in other places. So are comma, and ; and : and /. \ is out.<br>
Let's leave out ?, too, as someday we might want to use it in patterns to match its regex <br>usage, a "0 or 1" of any character, or some dialplanishly appropriate set of almost any characters.<br><br>That leaves us with ~ and %. <br>
<br>So, how about: ~ at the end is 1 or more of the preceding character.<br>and % is 0 or more of the preceeding character. Or vice versa, as the original <br>proposal was really wanting ~ for 0-or-more usage. It don't matter to me, but<br>
the % has those little circles in its graphics, crying "Zero!"... any pnemonic trick helps.<br><br>Am I making sense? Have I missed something big? <br><br>murf<br><br></div></div>-- <br>Steve Murphy<br>ParseTree Corp<br>
<br>