[sr-dev] git:master:9a0c850f: tm: clarification that the sip message flags operations after t_newtran()

Daniel-Constantin Mierla miconda at gmail.com
Thu Dec 12 08:43:38 CET 2019


Module: kamailio
Branch: master
Commit: 9a0c850f98063da145120f90d2c5c2a43e76b976
URL: https://github.com/kamailio/kamailio/commit/9a0c850f98063da145120f90d2c5c2a43e76b976

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-12-12T08:42:06+01:00

tm: clarification that the sip message flags operations after t_newtran()

- they are not reflected in transaction, only in local sip message
structure

---

Modified: src/modules/tm/doc/functions.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/9a0c850f98063da145120f90d2c5c2a43e76b976.diff
Patch: https://github.com/kamailio/kamailio/commit/9a0c850f98063da145120f90d2c5c2a43e76b976.patch

---

diff --git a/src/modules/tm/doc/functions.xml b/src/modules/tm/doc/functions.xml
index 82647117cd..489147afd1 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.
 	</para>
 	<para>
-	    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.
 	</para>
 	<example>
 	    <title><function>t_newtran</function> usage</title>
 	    <programlisting>
 ...
-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();
+}
 ...
 	    </programlisting>
 	</example>




More information about the sr-dev mailing list