<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I didn't know about the function but from what I understand from the "show function FILTER" &nbsp;output it doesn't validate a string but it cleans the string from not allowed characters. So TRIM(1234567890,01243567&amp;505) results in &nbsp;01243567505. If the length of the output string is shorter then the input string the call setup should stop because not allowed characters were stripped. &nbsp;With some extra lines TRIM() will do as good as the macro I guess. &nbsp;You can add some lines so someone trying to perform &nbsp;number injection will be connected with an answering machine and be &nbsp;requested to leave name and phone number ;-)<div><br></div><div><br></div><div>Erik</div><div><br></div><div><br><div><div>On 17 feb 2010, at 00:41, Warren Selby wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><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></div><br>Doesn't the built-in function FILTER() already do this?<br><br>*CLI&gt; core show function FILTER<br>*CLI&gt;<br><br>&nbsp; -= Info about function 'FILTER' =-<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;,&nbsp; filtering all others outs.<br>In addition to literally listing the characters,&nbsp; you may also use ranges<br> of characters (delimited by a '-'<br>Hexadecimal characters started with a '\x'(i.e. \x20)<br>Octal characters started with a '\0' (i.e. \040)<br>Also '\t','\n' and '\r' are recognized.<br> NOTE: If you want the '-' character it needs to be prefixed with a&nbsp; '\'<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> -- <br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a> --<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> &nbsp;&nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div><br></div></body></html>