<div dir="ltr">Check how are you handling ACK method on the main route<br>You need something like that:<br><br> if (has_totag()) {<br> # sequential request withing a dialog should<br> # take the path determined by record-routing<br>
if (loose_route()) {<br> if (is_method("BYE")) {<br> setflag(1); # do accounting ...<br> setflag(3); # ... even if the transaction fails<br> }<br> route(1);<br>
} else {<br> if ( is_method("ACK") ) {<br> if ( t_check_trans() ) {<br> # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server<br>
t_relay();<br> exit;<br> } else {<br> # ACK without matching transaction ... ignore and discard.\n");<br> exit;<br> }<br>
}<br> sl_send_reply("404","Not here");<br> }<br> exit;<br> }<br><br>Cheers,<br><br clear="all">Gustavo Mistrinelli<br>
<br><br><div class="gmail_quote">On Fri, Aug 8, 2008 at 3:30 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 get this in the log:<br><br>Aug 8 04:18:42 206-225-83-32 /usr/local/sbin/openser[18461]: ERROR:tm:t_forward_nonack: no branch for forwarding<br>Aug 8 04:18:42 206-225-83-32 /usr/local/sbin/openser[18461]: ERROR:tm:w_t_relay: t_forward_nonack failed<div>
<div></div><div class="Wj3C7c"><br>
<br><br><br><div class="gmail_quote">On Fri, Aug 8, 2008 at 1:46 PM, Gustavo Mistrinelli <span dir="ltr"><<a href="mailto:gmistrinelli@gmail.com" target="_blank">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 valid<br><br>Cheers,<br><br>Gustavo Mistrinelli<br>
<br><br><div class="gmail_quote"><div><div></div><div>On Fri, Aug 8, 2008 at 2:27 PM, Mouncif Benniane <span dir="ltr"><<a href="mailto:mouncifbb@gmail.com" target="_blank">mouncifbb@gmail.com</a>></span> 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>
<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></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">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>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>