doc/
subfolder, the README file is autogenerated)we have a use case where we need to drop the request within a transaction, and that is not possible because tm module will always send the final reply.
route[MYREQ]
{
## protect from retrans
if (!t_newtran()) {
xlog("L_ERROR", "$ci|log|failed to create transaction\n");
drop;
}
if(some early business use case that requires drop) {
xlog("L_INFO", "$ci|log|dropping request\n");
t_drop();
}
async_func_that_suspends_and_continues("$anyparam", "TR_OK", "TR_ERROR");
}
failure_route[TR_ERROR]
{
xlog("L_INFO", "$ci|log|failed $T_reply_code $T_reply_reason\n");
t_drop();
}
onreply_route[TR_OK]
{
xlog("L_INFO", "$ci|log|checking transaction result\n");
if(some business use case that requires dropping the request) {
t_drop();
}
...
}
if we use drop
instead of t_drop
, we always get a final reply sent to the requestor
not sure if this is the right approach to the problem but at least fixes for us and can start the discussion.
https://github.com/kamailio/kamailio/pull/1726
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.