Andrei Pelinescu-Onciul writes:
0x02 - in sip-router the negative reply is
generated at the end of the
script (and not internal inside t_relay()) and only if no reply from
script was generated. So one could always use t_reply() to change the
reply code, or t_release() to skip generating a reply.
I'm not sure if this is completely equivalent to the k 0x02.
this sounds fine.
in
case of failure, does t_relay always return -1 or are the other negative
values as well?
It can return other negative values, when called form a request route
(e.g.: E_BAD_ADDRESS, E_SEND, E_ADM_PROHIBITED, E_OUT_OF_MEM a.s.o,
see error.h for the negative values).
now the thousand euro question is, is failure route executed (if set),
on all those cases?
No, if t_relay() returns negative, the failure route is not executed
(since the transaction was not created in the first place).
Andrei