<div dir="ltr">Dear Bogdan,<br><br>i did the following:<br><br>if($rU=~ "^123456")<br>{<br>route(1);<br>exit;<br>}<br>}<br>route[1] {<br> # for INVITEs enable some additional helper routes<br> if (is_method("INVITE")) {<br>
t_on_branch("2");<br> t_on_reply("2");<br> t_on_failure("1");<br> }<br><br>if (!lookup("location")) {<br> sl_send_reply("404","Not Found");<br>
exit;<br> }<br><br> if (!t_relay()) {<br> sl_reply_error();<br> };<br> exit;<br>}<br><br>When trying to make a call to 123456, the softphone returns timeout after 30 to 40 s<br>
<br>Regards<br><br><div class="gmail_quote">On Thu, Jan 29, 2009 at 12:32 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</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;">
<div class="Ih2E3d">michel freiha wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear Bogdan,<br>
<br>
kindly find below my route1<br>
route[1] {<br>
# for INVITEs enable some additional helper routes<br>
if (is_method("INVITE")) {<br>
t_on_branch("2");<br>
t_on_reply("2");<br>
t_on_failure("1");<br>
}<br>
</blockquote></div>
add here:<br>
if (!lookup("location")) {<br>
sl_send_reply("404","Not Found");<br>
exit;<br>
}<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
<br>
if (!t_relay()) {<br>
sl_reply_error();<br>
};<br>
exit;<br>
}<br>
<br>
<br>
regards<br>
<br></div><div><div></div><div class="Wj3C7c">
On Thu, Jan 29, 2009 at 12:01 PM, Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>> wrote:<br>
<br>
Hi Michel,<br>
<br>
the request loops because probably you do not change the RURI<br>
(domain part) in route[1], so opensips is routing back to itself.....<br>
<br>
What this route[1] does ?<br>
<br>
<br>
Regards,<br>
Bogdan<br>
<br>
michel freiha wrote:<br>
<br>
Hello Bogdan,<br>
<br>
Kindly note that I tried the following method to configure<br>
local calls:<br>
<br>
if($rU =~ "^111" || $rU =~ "^011.*" || $rU =~ "^00.*" || $rU<br>
=~ "^[+].*" )<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<br>
looks fine and the call is routed correctly to its<br>
destination...The issue is when trying a call that do not<br>
begin by 00 like calling "micho"...The system access the else<br>
{ xlog("XXXXXXXX.....and it enter inside a loop and nothing<br>
will happen on the other side...<br>
<br>
Can you advice please about what could be that issue?<br>
<br>
<br>
<br>
</div></div></blockquote>
<br>
</blockquote></div><br></div>