I've never used strip() before, but you could try $rU=$(rU{s.substr,1,0})<div><br></div><div>you could also do something similar in your if() statement if you want to get rid of the regular expression and save a couple cpu cycles.<br>
<br><div class="gmail_quote">On Mon, Aug 16, 2010 at 9:45 AM, michel freiha <span dir="ltr"><<a href="mailto:michofr@gmail.com">michofr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr">Dear All,<br><br>I'm trying to strip + from dialed number that hit the OpenSIPS server, after that I'm using carrierroute that read from database all routes and send the call to the appropriate GW...The issue that the number is sent with the + to the destination GW so i need you to help me please...<br>
<br>The DialPlan is as below:<br><br>if($rU =~ "^[+].*" )<br>{<br> strip(1);<br> if(!cr_route("default", "0", "$rU", "$rU", "call_id")){<br><br> sl_send_reply("403", "Not allowed");<br>
} else {<br> t_on_failure("1");<br> # Relay the request to the gateway<br> t_relay();<br><br> }<br><br><br>Regards<br><br><br><div style="display:inline">
</div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>