<div dir="ltr">Dear Sir,<br><br>Let's forget the alphanumeric extension name...I troed to dial an extension where the username is 123456 and I got the same issue...The system ente in a loop<br><br>Regards<br><br><div class="gmail_quote">
On Thu, Jan 29, 2009 at 11:22 AM, Raúl Alexis Betancor Santana <span dir="ltr"><<a href="mailto:rabs@dimension-virtual.com">rabs@dimension-virtual.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;">
El Jueves, 29 de Enero de 2009 08:57, michel freiha escribió:<br>
<div class="Ih2E3d">> Hello Bogdan,<br>
><br>
> Kindly note that I tried the following method to configure local calls:<br>
><br>
> if($rU =~ "^111" || $rU =~ "^011.*" || $rU =~ "^00.*" || $rU =~ "^[+].*" )<br>
> {<br>
> if(!cr_route("default", "0", "$rU", "$rU", "call_id")){<br>
> sl_send_reply("403", "Not allowed");<br>
> } else {<br>
> # In cas of failure, re-route the request<br>
> t_on_failure("1");<br>
> # Relay the request to the gateway<br>
> t_relay();<br>
> }<br>
><br>
><br>
> }<br>
><br>
> else<br>
> {<br>
><br>
> xlog("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");<br>
> route(1);<br>
> }<br>
> }<br>
><br>
> When making a Long distance call that begis with 00 everything looks fine<br>
> and the call is routed correctly to its destination...The issue is when<br>
> trying a call that do not begin by 00 like calling "micho"...The system<br>
> access the else { xlog("XXXXXXXX.....and it enter inside a loop and nothing<br>
> will happen on the other side...<br>
<br>
</div>The system always will go to the else statement, because in your if statement<br>
your regular expresions only catch uri's that in it Username are:<br>
<br>
-111<br>
-011.*<br>
-00.*<br>
-+.*<br>
<br>
Where do you catch the usernames that begins with alphabetic chars ? no where<br>
<div class="Ih2E3d"><br>
> Can you advice please about what could be that issue?<br>
<br>
</div>Yes, read a good book about regular expressions.<br>
<font color="#888888"><br>
--<br>
Raúl Alexis Betancor Santana<br>
Dimensión Virtual<br>
</font><div><div></div><div class="Wj3C7c"><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>
</div></div></blockquote></div><br></div>