<div dir="ltr">syntanx is right, openser starts with no problems, I had XLOG statement I just removed them here for easy readability.<br>if ($avp(s:failure_set) == y ) is a valid expression and I saw it gets logged.<br><br>
<br><br><div class="gmail_quote">On Fri, Aug 8, 2008 at 1:47 PM, Gustavo Mistrinelli <span dir="ltr"><<a href="mailto:gmistrinelli@gmail.com">gmistrinelli@gmail.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;">
<div dir="ltr">Hi Mouncif, <br>
<br>
append_branch() is ok, but you must check first your entire configuration. I'm seeing several avp without quotes.<br>
Add xlog inside every if and every route to see what's happening, may be wrong AVPs assignment or comparison.<br>
First check if ($avp(s:failure_set) == y ) is a valid expression<br><br>
Cheers,<br><font color="#888888">
<br>
Gustavo Mistrinelli</font><div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr"><div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr"><div><div><div class="gmail_quote">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div><br>
<br>
On 08/08/08 16:58, Mouncif Benniane wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
I am using openser 1.3, I can't make the failure_route to work properly.<br>
<br>
here is my config:<br>
<br>
modparam("tm", "fr_timer", 2) # set fr_timer<br>
<br>
<br>
route{<br>
<br>
if (is_method("INVITE")) {<br>
<br>
avp_delete("*");<br>
<br>
if (avp_db_query("SELECT prefix,grp_id,priority,custid,did,ip,port,failure_set,failure_i<br>
p,failure_port FROM test_table WHERE prefix='$rU'","$avp(s:prefix);$avp(s:grp_id);$avp(s:priority);$avp(s:custid);$avp(s:did);$avp(s:ip);$avp(s:port<br>
);$avp(s:failure_set);$avp(s:failure_ip);$avp(s:failure_<br>
port)")) {<br>
<br>
<br>
$ru = "sip:"+$rU + "@" + $avp(s:ip) + ":" + $avp(s:port);<br>
<br>
<br>
<br>
if ($avp(s:failure_set) == y ) {<br>
$avp(i:3) = 3;<br>
t_on_failure("1");<br>
t_relay();<br>
<br>
}<br>
<br>
<br>
}<br>
<br>
} else {<br>
xlog("L_NOTICE", "avp_db_query() returned no records or failed query\n");<br>
};<br>
<br>
}<br>
### END OF ROUTING<br>
<br>
<br>
<br>
failure_route[1] {<br>
<br>
# status is 408 if openser session timer fires<br>
if (t_check_status("408")) {<br>
<br>
$ru = "sip:"+$rU + "@" + $avp(s:failure_ip) + ":" + $avp(s:failure_port);<br>
t_relay();<br>
<br>
}<br>
<br>
}<br>
<br>
<br>
route[1] {<br>
# send it out now; use stateful forwarding as it works reliably<br>
# even for UDP2TCP<br>
if (!t_relay()) {<br>
sl_reply_error();<br>
};<br>
exit;<br>
}<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
So I set ip field to no responsive one and failure_ip to responsive one, but still the invite does not fail to the last one (failure_ip) after the timeout.<br>
Am I doing something wrong?<br>
<br>
<br>
cheers!!<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
<br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div></div>
</blockquote></div><br></div>