[SR-Users] event_route[tm:branch-failure] question

Juha Heinanen jh at tutpro.com
Mon Apr 14 21:15:28 CEST 2014


Daniel-Constantin Mierla writes:

> To get the branch attributes, the code should be similar to execution of 
> failure_route. In failure_route, the attributes are taken from winning 
> branch. In branch-failure, the attributes should be taken from current 
> branch. But in both cases is dealing with a branch structure.

the code in t_reply.c for branch failure handling already looks very
similar to failure handling.  run_failure_handlers() use branch

	on_failure = t->uac[picked_branch].on_failure;

whereas run_branch_failure_handlers() use branch

	on_branch_failure = t->uac[picked_branch].on_branch_failure;

then both create faked request environment, run the route handler, and
restore the original environment.

why the faked request in case of branch failure does not include correct
$ru goes beyond my knowledge of tm module.

-- juha



More information about the sr-users mailing list