From 9a0c850f98063da145120f90d2c5c2a43e76b976 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Thu, 12 Dec 2019 08:42:06 +0100 Subject: [PATCH] tm: clarification that the sip message flags operations after t_newtran() - they are not reflected in transaction, only in local sip message structure --- src/modules/tm/doc/functions.xml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/modules/tm/doc/functions.xml b/src/modules/tm/doc/functions.xml index 82647117cdd..489147afd1f 100644 --- a/src/modules/tm/doc/functions.xml +++ b/src/modules/tm/doc/functions.xml @@ -303,19 +303,22 @@ branch_route[1] { way. Typically, it is used to deploy a UAS. - Note that any flag operations (e.g. for accounting) after this - function has been called will be ignored. You can use the the tmx - module function t_flush_flags() to flush the altered flags to the - already created transaction. + Note: once the t_newtran() is executed, the new message flag operations + (i.e., setflag() and resetflag()) are not syncronized to the transaction, + being stored only in the private memory SIP message structure. Use the + tmx module function t_flush_flags() to synchronize the modified message + flags to the already created transaction. <function>t_newtran</function> usage ... -if (t_newtran()) { - log("UAS logic"); - t_reply("999","hello"); -} else sl_reply_error(); +if (t_newtran()) { + xlog("the transaction has been created\n"); + t_reply("999","hello"); +} else { + sl_reply_error(); +} ...