SIP Router Project
FS#296 - tm:branch-failure event_route is not executed on all branch failures
Opened by Juha Heinanen (jh) - Wednesday, 15 May 2013, 17:13 GMT
Last edited by Juha Heinanen (jh) - Saturday, 25 May 2013, 11:16 GMT
when t_relay() fails due to unreachable tcp destination, [t_fwd.c:1520] generates error message
LOG(L_ERR, “ERROR: t_send_branch: sending request on branch %d "
and immediately sends back SIP/2.0 477 Unfortunately error on sending to next hop occurred (477/TM) response.
tm:branch-failure event_route is not executed although it has been activated for the branch. instead, this makes is difficult to act on the failing branch in the config script, for example, by unregistering the unresponsive contact.
currently tm:branch-failure event_route is executed only from t_reply.c when reply is processed. one possibility to fix this might be generating a fake reply from t_fwd.c so that t_reply.c could do its job. another one might be calling the activated tm:branch-failure event_route directly from t_fwd.c.
i would appreciate if someone who is familiar with internals of tm module could fix this bug.