[sr-dev] t_on_branch_failure never called AND t_relay never fails in a forked scenario

Tristan Mahé t.mahe at b-and-c.net
Wed May 20 00:30:35 CEST 2015


Wrong list, sorry for the noise.

On 05/19/2015 03:28 PM, Tristan Mahé wrote:
> Hi fellow kamailio users,
>
> I'm playing actually with t_on_branch_failure, in a simultaneous
> forking scenario ( lookup("location") returns multiple contacts ).
>
> Any idea on how to get those "on_branch_failure" working ?
>
> Thanks in Advance !
>
> * Test by putting failure_exec_mode:
> - at 1 => no branch failure being called, never.
> - at 0 => t_relay does not fail if a single branch answers the
> transaction, even if all other branches are failing.
>
> * 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.
> - The on_route branch are executed, but never the failure one.
> - tried also with failure_exec_mode = 0 or 1.
>
> * 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.
>
> * Config extract:
>
> # auto-discard branches from previous serial forking leg
> modparam("tm", "failure_reply_mode", 3) # 3 by default
> # default retransmission timeout: 30sec
> modparam("tm", "fr_timer", 30000)
> # default invite retransmission timeout after 1xx: 120sec
> modparam("tm", "fr_inv_timer", 120000)
> modparam("tm", "reparse_on_dns_failover", 0)
> # 1: Allow branches to have a per branch failure route
> # 0: t_relay should fail if a branch fail
> modparam("tm", "failure_exec_mode", 1)
> # Allow locally generated 408 to be forgotten in case a reply is received.
> #modparam("tm", "faked_reply_prio", 2000)
>
>
> # USER location service
> route[LOCATION] {
>         t_on_branch_failure("manage_branch_failure");
>         if (!lookup("location")) {
>         ....
>         }
>         # Let's get back after 2.5s if no 100/Trying received.
>         t_set_fr(0, 2500);
>         # set_forward_no_connect();
>         #t_on_branch("SET_BRANCH_FAILURE");
>         route(RELAY);
>         exit;
> }
>
> route[RELAY] {
>         ....
>         if (!t_relay()) {
>                 xlog("L_WARN","$rm|$ci|$fu|$tu|RELAY_FAILED");
>                 sl_reply_error();
>         }
>         exit();
> }
>
> # set failure route per branch
> branch_route[SET_BRANCH_FAILURE] {
>         xlog("L_WARN","$rm|$ci|$fu|$tu|SETTING_BrANCH_FAILURE_ROUTE");
>         t_on_branch_failure("manage_branch_failure");
> }
>
> # manage failure routing cases per branch
> event_route[tm:branch-failure:manage_branch_failure] {
>        
> xlog("L_WARN","$rm|$ci|$fu|$tu[$avp(dest_to)]|MANAGE_BRANCH_FAILURE");
> }
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150519/dfd2a2fc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150519/dfd2a2fc/attachment.sig>


More information about the sr-dev mailing list