Module: sip-router Branch: 3.1 Commit: 6ef54ae2cb3c5390be823707aa1ebb2008b5eaef URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6ef54ae2...
Author: Henning Westerholt henning.westerholt@1und1.de Committer: Henning Westerholt henning.westerholt@1und1.de Date: Mon May 16 15:22:15 2011 +0200
tm: add warning about t_newtran behaviour (pointed out from Iñaki (cherry picked from commit 9f27cb55a1b4def4f393def6170430cbf70e6615)
---
modules/tm/README | 5 +++++ modules/tm/doc/functions.xml | 6 ++++++ 2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/modules/tm/README b/modules/tm/README index 4e535bc..bf44793 100644 --- a/modules/tm/README +++ b/modules/tm/README @@ -1342,6 +1342,11 @@ t_relay(); the only way a script can add a new transaction in an atomic way. Typically, it is used to deploy a UAS.
+Warning + + Please note that the changes on the request that are made after this + function call will not be saved into transaction! + Example 46. t_newtran usage ... if (t_newtran()) { diff --git a/modules/tm/doc/functions.xml b/modules/tm/doc/functions.xml index 6de270a..683a7d8 100644 --- a/modules/tm/doc/functions.xml +++ b/modules/tm/doc/functions.xml @@ -268,6 +268,12 @@ t_relay(); is the only way a script can add a new transaction in an atomic way. Typically, it is used to deploy a UAS. </para> + <warning> + <para> + Please note that the changes on the request that are made after this + function call will not be saved into transaction! + </para> + </warning> <example> <title><function>t_newtran</function> usage</title> <programlisting>
Hello Henning,
I believe the message and AVP modifications work even after t_newtran(), they are saved into the transaction context in sip-router 3.x. The message modifications were not saved in Kamailio 1.5 as Daniel wrote on the user list, but this is no longer the case with 3.x. If the modifications are not saved after t_newtran() in 3.x, then this is a software bug, please let me know, and I will check.
I would like to ask you to revert this commit as well as the same commit to master. For more info, please check t_save_lumps() in the readme, and the POSTPONE_MSG_CLONING #define in sip_msg.h.
Thanks, Miklos
On 05/16/2011 03:24 PM, Henning Westerholt wrote:
Module: sip-router Branch: 3.1 Commit: 6ef54ae2cb3c5390be823707aa1ebb2008b5eaef URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6ef54ae2...
Author: Henning Westerholthenning.westerholt@1und1.de Committer: Henning Westerholthenning.westerholt@1und1.de Date: Mon May 16 15:22:15 2011 +0200
tm: add warning about t_newtran behaviour (pointed out from Iñaki (cherry picked from commit 9f27cb55a1b4def4f393def6170430cbf70e6615)
modules/tm/README | 5 +++++ modules/tm/doc/functions.xml | 6 ++++++ 2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/modules/tm/README b/modules/tm/README index 4e535bc..bf44793 100644 --- a/modules/tm/README +++ b/modules/tm/README @@ -1342,6 +1342,11 @@ t_relay(); the only way a script can add a new transaction in an atomic way. Typically, it is used to deploy a UAS.
+Warning
- Please note that the changes on the request that are made after this
- function call will not be saved into transaction!
- Example 46. t_newtran usage ... if (t_newtran()) {
diff --git a/modules/tm/doc/functions.xml b/modules/tm/doc/functions.xml index 6de270a..683a7d8 100644 --- a/modules/tm/doc/functions.xml +++ b/modules/tm/doc/functions.xml @@ -268,6 +268,12 @@ t_relay(); is the only way a script can add a new transaction in an atomic way. Typically, it is used to deploy a UAS.
</para> + <warning> + <para> + Please note that the changes on the request that are made after this + function call will not be saved into transaction! + </para> + </warning> <example> <title><function>t_newtran</function> usage</title> <programlisting>
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Miklos Tirpak writes:
I believe the message and AVP modifications work even after t_newtran(),they are saved into the transaction context in sip-router 3.x.
i too was wondering this discussion, since i do t_newtran() before authentication and after that set various avps. i would have noticed if they would not have been available in failure or reply route.
-- juha
On Tuesday 17 May 2011, Miklos Tirpak wrote:
I believe the message and AVP modifications work even after t_newtran(), they are saved into the transaction context in sip-router 3.x. The message modifications were not saved in Kamailio 1.5 as Daniel wrote on the user list, but this is no longer the case with 3.x. If the modifications are not saved after t_newtran() in 3.x, then this is a software bug, please let me know, and I will check.
I would like to ask you to revert this commit as well as the same commit to master. For more info, please check t_save_lumps() in the readme, and the POSTPONE_MSG_CLONING #define in sip_msg.h.
Hi Miklos,
thanks for the clarification, I'll revert it.
Cheers,
Henning
2011/5/17 Miklos Tirpak miklos@iptel.org:
I believe the message and AVP modifications work even after t_newtran(), they are saved into the transaction context in sip-router 3.x. The message modifications were not saved in Kamailio 1.5 as Daniel wrote on the user list, but this is no longer the case with 3.x. If the modifications are not saved after t_newtran() in 3.x, then this is a software bug, please let me know, and I will check.
I would like to ask you to revert this commit as well as the same commit to master. For more info, please check t_save_lumps() in the readme, and the POSTPONE_MSG_CLONING #define in sip_msg.h.
Thanks a lot for pointing it out. Indeed IMHO it's the desired and *expected* behaviour.
Thanks.