<br><br><div class="gmail_quote">On Mon, Feb 15, 2010 at 8:25 AM, Lenz Emilitri <span dir="ltr"><<a href="mailto:lenz.loway@gmail.com">lenz.loway@gmail.com</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;">
<div>Yes but in any case you can enter all of the strings that reasonably match - even if you have variable-length numbers, you will be able to determine that a valid number be between 5 and 15 characters - or likely 2 to 20, all numbers. A number of 156 characters is very likely to be a problem.<br>
</div></blockquote><div><br>This is probably a stupid idea, because it could only be implemented in trunk, and won't help with current implementations,<br>and I suggested it a long time ago already when I did the fast pattern matching code, but I don't THINK it would be all that<br>
hard to offer SOME regex syntax in patterns to help reduce the impact of these kinds of problems.<br><br>Like using:<br><br><div>[incoming-from-voip]</div>
<div>exten => _X\{7-10\},1,Dial(${EXTEN}@incoming-from-voip-old)</div>
<div><div><br></div></div>
instead of :<br><br><div>[incoming-from-voip]</div><div>exten => XXXXXXX,1,Dial(${EXTEN}@incoming-from-voip-old)</div><div><div>exten => XXXXXXXX,1,Dial(${EXTEN}@incoming-from-voip-old)<div>
exten => XXXXXXXXX,1,Dial(${EXTEN}@incoming-from-voip-old)<div>exten => XXXXXXXXXX,1,Dial(${EXTEN}@incoming-from-voip-old)</div></div></div></div><div><br></div>I put the \'s in front of the {}'s because we probably wouldn't want to change the<br>
behavior of exact matching, and there's some precedent for using such stuff<br>in some implementations of regex, where \< matches the beginning of a word, etc.<br><br>and, of course there would be the shorthand variants \{7-\} for seven or more; \{-10\} for 1-10.<br>
Some might argue 0-10. Whatever. <br><br>I THINK this could be implemented in both the fast pattern matcher and the <br>current slow one. I know it wouldn't be that bad to do in the fast pattern matcher.<br>I hadn't really given the slow one (the current one) much thought.<br>
<br>murf<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
</div><div><br></div><div>BTW, you could add a catchall "mail the sysadmin" option - so when you get a number that is not being matched you could be notified and adjust the dialplan as needed.</div><div>l.</div>
<div><br></div><div><br></div><br><div class="gmail_quote">2010/2/15 Olle E. Johansson <span dir="ltr"><<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>></span><div class="im"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
> To avoid extensive rewriting and fix the current issue.<br>
That works in countries where you have fixed-length numbers. Unfortunately, not every dialplan works that way, so that can't be a generic advice even though it may solve your problems.<br>
<br>
Thanks for your suggestion!<br>
<font color="#888888"><br>
/O<br>
</font><div><div><br>
</div></div></blockquote></div></div><br>-- <br><div><div></div><div class="h5">Loway - home of QueueMetrics - <a href="http://queuemetrics.com" target="_blank">http://queuemetrics.com</a><br><br>
</div></div><br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Steve Murphy<br>ParseTree Corp<br>
<br>