<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Wrong list, sorry for the noise.<br>
<br>
<div class="moz-cite-prefix">On 05/19/2015 03:28 PM, Tristan Mahé
wrote:<br>
</div>
<blockquote cite="mid:555BB8F7.1040606@b-and-c.net" type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link href="chrome://translator/skin/floatingPanel.css"
type="text/css" rel="stylesheet">
Hi fellow kamailio users,<br>
<br>
I'm playing actually with t_on_branch_failure, in a simultaneous
forking scenario ( lookup("location") returns multiple contacts ).<br>
<br>
Any idea on how to get those "on_branch_failure" working ? <br>
<br>
Thanks in Advance !<br>
<br>
* Test by putting failure_exec_mode:<br>
- at 1 => no branch failure being called, never.<br>
- at 0 => t_relay does not fail if a single branch answers the
transaction, even if all other branches are failing.<br>
<br>
* Test by moving the t_on_branch_failure("manage_branch_failure");
line before or after the lookup("location") or on a _on_branch
route to set it per branch.<br>
- The on_route branch are executed, but never the failure one.<br>
- tried also with failure_exec_mode = 0 or 1.<br>
<br>
* Using set_forward_no_connect, I can see in the logs a "Sending
to branch X failed" but no failure route being executed. Without
it, nothing in the logs indicating that the branch has timeout.<br>
<br>
* Config extract:<br>
<br>
# auto-discard branches from previous serial forking leg<br>
modparam("tm", "failure_reply_mode", 3) # 3 by default<br>
# default retransmission timeout: 30sec<br>
modparam("tm", "fr_timer", 30000)<br>
# default invite retransmission timeout after 1xx: 120sec<br>
modparam("tm", "fr_inv_timer", 120000)<br>
modparam("tm", "reparse_on_dns_failover", 0)<br>
# 1: Allow branches to have a per branch failure route<br>
# 0: t_relay should fail if a branch fail<br>
modparam("tm", "failure_exec_mode", 1)<br>
# Allow locally generated 408 to be forgotten in case a reply is
received.<br>
#modparam("tm", "faked_reply_prio", 2000)<br>
<br>
<br>
# USER location service<br>
route[LOCATION] {<br>
t_on_branch_failure("manage_branch_failure");<br>
if (!lookup("location")) {<br>
....<br>
}<br>
# Let's get back after 2.5s if no 100/Trying received.<br>
t_set_fr(0, 2500);<br>
# set_forward_no_connect();<br>
#t_on_branch("SET_BRANCH_FAILURE");<br>
route(RELAY);<br>
exit;<br>
}<br>
<br>
route[RELAY] {<br>
....<br>
if (!t_relay()) {<br>
xlog("L_WARN","$rm|$ci|$fu|$tu|RELAY_FAILED");<br>
sl_reply_error();<br>
}<br>
exit();<br>
}<br>
<br>
# set failure route per branch<br>
branch_route[SET_BRANCH_FAILURE] {<br>
xlog("L_WARN","$rm|$ci|$fu|$tu|SETTING_BrANCH_FAILURE_ROUTE");<br>
t_on_branch_failure("manage_branch_failure");<br>
}<br>
<br>
# manage failure routing cases per branch<br>
event_route[tm:branch-failure:manage_branch_failure] {<br>
xlog("L_WARN","$rm|$ci|$fu|$tu[$avp(dest_to)]|MANAGE_BRANCH_FAILURE");<br>
}<br>
<br>
<br>
<div style="bottom: auto; left: 161px; right: auto; top: 522px;
display: none;" class="translator-theme-default"
id="translator-floating-panel"> </div>
</blockquote>
<br>
</body>
</html>