[Kamailio-Devel] t_on_failure() is not executed in TCP when t_relay() returns 1 ???

Juha Heinanen jh at tutpro.com
Tue Mar 24 16:14:15 CET 2009


Iñaki Baz Castillo writes:

 > You are right, not sure why I said that.
 > 
 > After more testing I agree with you:
 > 
 > **** IP_NON_RESPONDING and t_relay("0x02"):
 > 
 > UDP:
 > - t_relay("0x02") returns true.
 > - failure_route is executed.

as i described, you have two different UDP IP_NON_RESPONDING cases, one
where there is route to host and the other where there isn't.
t_relay("0x02") returns true only in the former case.  but usually the
latter is not relevant, because proxy host as a default route.

 > Do you agree? If so, is it really the expected and desirable
 > behaviour? I don't think so.

i agree, and it is very user UNfriendly behaviour.  as i have tried to
tell, failure route should be executed by default for all t_relay()
failures.

further, in case when t_relay() to tcp fails, a correct script would need
to include a switch statement to check which error code was returned in
order to call t_reply_error() with correct parameter.

it would be interesting to see how complicated the simple forking
example in the sources would become, if one would like to write a
working one.  now the script pretends that t_relay() works as i would
like it to work, which is wrong.

i hope that sip-router fixes this mess, but i doubt that it will do it
without writing new code.

by the way, is there a parameter or something that could be used to
shorten the 10 second delay that t_relay() waits for tcp connection
establishment to a non-responding node?

-- juha



More information about the Devel mailing list