Skip to content

Commit

Permalink
tm: docs - clarifications about event routes
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Aug 27, 2019
1 parent fa7e915 commit b241fc7
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions src/modules/tm/doc/event_routes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@

<section id="tm.e.branch-failure">
<title>
<function moreinfo="none">event_route[tm:branch-failure]</function>
<function moreinfo="none">event_route[tm:branch-failure:id]</function>
</title>
<para>
Named branch failure routes can be defined to run when when a failure
response is received. This allows handling failures on individual
branches, for example, retrying an alternative outbound flow.
</para>
<para>
The format of the event_route name is "tm:branch-failure:&lt;name&gt;"
and is enabled with the t_on_branch_failure function.
This event_route uses the BRANCH_FAILURE_ROUTE route type.
</para>
<para>
The format of the event_route name is "tm:branch-failure:&lt;id&gt;"
and is enabled with the t_on_branch_failure function.
This event_route uses the BRANCH_FAILURE_ROUTE route type.
</para>
<example>
<title><function>event_route[tm:branch-failure]</function> usage</title>
<title><function>event_route[tm:branch-failure:id]</function> usage</title>
<programlisting>
...
request_route {
Expand All @@ -44,7 +44,17 @@ event_route[tm:branch-failure:myroute] {
<function moreinfo="none">event_route[tm:local-request]</function>
</title>
<para>
Executed after the tm module has sent a local generated, transaction stateful request.
Executed when the tm module generates a request, in other words,
the request originates from &kamailio; and a transaction is created
for it. The source of the requests can be tm itself or other modules
that use tm internally (e.g., msilo, uac). The event route is executed
if it is defined in the native &kamailio; config file. To execute
the equivalent callback when using KEMI scripting, see the
'event_callback' module parameter.
</para>
<para>
The request can still be updated, i.e., changes are possible to
R-URI ($ru), destination URI ($du) or the send socket ($fs).
</para>
<example>
<title><function>event_route[tm:local-request]</function> usage</title>
Expand All @@ -63,7 +73,8 @@ event_route [tm:local-request] {
<function moreinfo="none">event_route[tm:local-response]</function>
</title>
<para>
Executed after the tm module has sent a local generated, transaction stateful response.
Executed when the tm module is about to send a local generated,
transaction stateful response.
</para>
<example>
<title><function>event_route[tm:local-response]</function> usage</title>
Expand Down

0 comments on commit b241fc7

Please sign in to comment.