<div class="gmail_quote">On Tue, Feb 16, 2010 at 4:38 PM, meetmecall <span dir="ltr">&lt;<a href="mailto:info@meetmecall.nl">info@meetmecall.nl</a>&gt;</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;">
I have read the posts about the security issue and from what I<br>
understand there should be a check to make sure that the characters<br>
used are actually allowed. I wrote a very straightforward and not so<br>
rocket science kind of macro that will do the job I guess. Just two<br>
parameters, one with the allowed characters and one with the string to<br>
check. The allowed characters can be stored in a global variable if<br>
this set has a global character. It is just one extra line in the<br>
dialplan and a little bit extra cpu load.<br></blockquote></div><br>Doesn&#39;t the built-in function FILTER() already do this?<br><br>*CLI&gt; core show function FILTER<br>*CLI&gt;<br><br>  -= Info about function &#39;FILTER&#39; =-<br>
<br>[Synopsis]<br>Filter the string to include only the allowed characters<br><br>[Description]<br>Permits all characters listed in &lt;allowed-chars&gt;,  filtering all others outs.<br>In addition to literally listing the characters,  you may also use ranges<br>
of characters (delimited by a &#39;-&#39;<br>Hexadecimal characters started with a &#39;\x&#39;(i.e. \x20)<br>Octal characters started with a &#39;\0&#39; (i.e. \040)<br>Also &#39;\t&#39;,&#39;\n&#39; and &#39;\r&#39; are recognized.<br>
NOTE: If you want the &#39;-&#39; character it needs to be prefixed with a  &#39;\&#39;<br><br>[Syntax]<br>FILTER(allowed-chars,string)<br><br>[Arguments]<br>Not available<br><br>[See Also]<br>Not available<br><br><br clear="all">
<br>-- <br>Thanks,<br>--Warren Selby<br><a href="http://www.selbytech.com">http://www.selbytech.com</a><br>