t_relay() clarification

The aim of this page is to clarify t_relay() behaviour and response codes in case of failure.

The documentation of t_relay() function is a bit confusing and not well detailed. Let's examine some sections of the function documentation:

Server transaction creation

The coresponding transaction may or may not be already created. If not yet created, the function will automatically create it.

Returned error codes

In case of error, the function returns the following codes:
-1 - generic internal error
-2 - bad message (parsing errors)
-3 - no destination available (no branches were added or request already cancelled)
-4 - bad destination (unresolvable address)
-5 - destination filtered (black listed)
-6 - generic send failed

Failure route invocation

Transport erros