From e174eb4372103c307d446c4e69620898c5b0a934 Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Wed, 15 Jun 2016 19:25:36 +0300 Subject: [PATCH 1/2] modules/tm: document t_relay() script function return values From http://kamailio.org/docs/modules/1.5.x/tm.html#id2514020 --- modules/tm/doc/functions.xml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/modules/tm/doc/functions.xml b/modules/tm/doc/functions.xml index 4ad34fcb202..4d3b5248056 100644 --- a/modules/tm/doc/functions.xml +++ b/modules/tm/doc/functions.xml @@ -35,6 +35,35 @@ Returns a negative value on failure -- you may still want to send a negative reply upstream statelessly not to leave upstream UAC in lurch. + + 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 + + + <function>t_relay</function> usage From 1f1c077b5e811a297d38dfbaea43b78ef70d3872 Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Wed, 15 Jun 2016 19:38:53 +0300 Subject: [PATCH 2/2] modules/tm: use consistent naming for route names --- modules/tm/doc/functions.xml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/tm/doc/functions.xml b/modules/tm/doc/functions.xml index 4d3b5248056..102416625e7 100644 --- a/modules/tm/doc/functions.xml +++ b/modules/tm/doc/functions.xml @@ -815,9 +815,8 @@ route { Returns true if the failure route is executed for a branch that did - timeout. It can be used from - failure_route and - branch-failure event route. + timeout. It can be used from FAILURE_ROUTE and BRANCH_FAILURE_ROUTE + event route. <function>t_branch_timeout</function> usage @@ -840,9 +839,8 @@ failure_route[0]{ Returns true if the failure route is executed for a branch that did receive at least one reply in the past (the "current" reply is not - taken into account). It can be used from - failure_route and - branch-failure event route. + taken into account). It can be used from FAILURE_ROUTE and + BRANCH_FAILURE_ROUTE event route. <function>t_branch_replied</function> usage @@ -1318,7 +1316,7 @@ if (!t_next_contacts()) { was empty and thus there was nothing to do, and returns -1 in case of an error (see syslog). - This function can be used from a BRANCH_FAILURE event route. + This function can be used from a BRANCH_FAILURE_ROUTE event route. <function>t_next_contact_flow</function> usage