Hi Olle,
On 05/04/2013 14:53, Olle E. Johansson wrote:
modules/tm: Added branch_failure event route to tm documentation
Thank you for adding this route!
You're welcome!
Formatting issue: I don't like the event route doc to come after the module API. We usually have the API docs as the last item.
That is easily fixed.
Architecture/documentation issues:
Is it really an event route - or does it work as the other T_ON_FAILURE?
Would it be better to enable a route with t_on_branch_failure(ROUTE_NAME) ?
What's the architectural difference between an event_route and the other routes triggered by TM?
This branch-failure route has been implemented as an event route after discussion with Daniel. (See http://lists.kamailio.org/pipermail/sr-dev/2013-March/019191.html). As a result, you cannot specify multiple named routes and enable them with a t_on_branch_failure() function. There can only be one route and it is enabled when it is defined.
- Can I do everything I can do in FAILURE_ROUTE in this event route?
No. This event_route uses a new route type (a new BRANCH_FAILURE_ROUTE flag internally) which means functions and PVs are limited to ones that have this flag set. So far, I have enabled the functions that are required to enable outbound flow retries. Since this route is run in a very similar way to the failure_route, it is likely that most functions that work in a FAILURE_ROUTE will also work in a BRANCH_FAILURE_ROUTE just by enabling the flag, but it is a matter of whether they are appropriate for this route.
- How do I retarget and retransmit a request? The transaction i still open so I can't use t_relay like in failure route, or?
I wrote this with the intention of enabling outbound flow retries. This is done by running t_next_contact_flow() and t_relay(), just like you would in a failure_route. This creates a new branch and prevents the failure_route from being run for this response.
Many questions... :-)
Peter and I will be coming up with an kamailio.cfg that enables outbound which will provide a working example, but if you can suggest further details for the README that will help users understand, I will add them.
Regards, Hugh