<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 valid<br><br>Cheers,<br><br>Gustavo Mistrinelli<br>
<br><br><div class="gmail_quote">On Fri, Aug 8, 2008 at 2:27 PM, Mouncif Benniane <span dir="ltr"><<a href="mailto:mouncifbb@gmail.com">mouncifbb@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">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,<div dir="ltr">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>
append_branch();<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!!</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>