<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
2012-03-20 16:36, Jonas Kellens skrev:
<blockquote cite="mid:4F68A407.5010404@telenet.be" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<font face="Helvetica, Arial, sans-serif">Hello,<br>
<br>
I'm trying to cut off the "+" sign if part of a telephone
number, but not succeeding :<br>
<br>
exten => test,n,Set(cid=+99999600)<br>
exten => test,n,Set(regx="([0-9])")<br>
exten => test,n,Set(cid2=$["${cid}" : ${regx}])<br>
exten => test,n,NoOp(cid2=${cid2})<br>
<br>
cid2 is empty afterwards...<br>
<br>
<br>
What I want is to make sure there are only numbers and no other
characters.<br>
<br>
So </font><font face="Helvetica, Arial, sans-serif">+99999600
needs to become </font><font face="Helvetica, Arial,
sans-serif">99999600 (without + )<br>
</font><font face="Helvetica, Arial, sans-serif">So </font><font
face="Helvetica, Arial, sans-serif">99999#600 needs to become </font><font
face="Helvetica, Arial, sans-serif">99999600 (without # )</font><br>
<font face="Helvetica, Arial, sans-serif"><br>
</font></blockquote>
<br>
Maybe the FILTER function could suit your needs?<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="https://wiki.asterisk.org/wiki/display/AST/Function_FILTER">https://wiki.asterisk.org/wiki/display/AST/Function_FILTER</a><br>
<br>
/Johan<br>
<br>
<pre class="moz-signature" cols="72">--
Johan Wilfer email: <a class="moz-txt-link-abbreviated" href="mailto:johan@jttech.se">johan@jttech.se</a>
JT Tech | Developer webb: <a class="moz-txt-link-freetext" href="http://jttech.se">http://jttech.se</a></pre>
</body>
</html>