Hi, as Kamailio 1.5 TM documentation states, changes to transaction (adding headers, filling AVP's and so) after calling t_newtran() are not saved into the transaction:
http://kamailio.org/docs/modules/1.5.x/tm.html#id2510920
NOTE that the changes on the request that are made after this function call will not be saved into transaction!!!
However in 3.X TM documentation such note is not present:
http://kamailio.org/docs/modules/devel/modules/tm.html#t_newtran
So, does 3.X behave different and changes after t_newtran are added to the transaction or not?
Thanks a lot.
Hello,
On 5/16/11 2:49 PM, Iñaki Baz Castillo wrote:
Hi, as Kamailio 1.5 TM documentation states, changes to transaction (adding headers, filling AVP's and so) after calling t_newtran() are not saved into the transaction:
http://kamailio.org/docs/modules/1.5.x/tm.html#id2510920
NOTE that the changes on the request that are made after this function call will not be saved into transaction!!!
However in 3.X TM documentation such note is not present:
http://kamailio.org/docs/modules/devel/modules/tm.html#t_newtran
So, does 3.X behave different and changes after t_newtran are added to the transaction or not?
no, it should behave the same in 3.x. The behavior was there before openser forked from ser, but probably the documentation was updated in the openser branch over the time and then with the migration to tm from ser 2.0 was lost. Cheers, Daniel
2011/5/16 Daniel-Constantin Mierla miconda@gmail.com:
no, it should behave the same in 3.x. The behavior was there before openser forked from ser, but probably the documentation was updated in the openser branch over the time and then with the migration to tm from ser 2.0 was lost.
Thanks for the response.
Let me a question: is it difficult to make new changes into request or new AVP's to be saved within the transaction previously created with t_newtran()? is there any technical reason this not to happen? It would avoid various issues I've suffered in my deployments.
Thanks.
Hello,
On 5/16/11 3:22 PM, Iñaki Baz Castillo wrote:
2011/5/16 Daniel-Constantin Mierlamiconda@gmail.com:
no, it should behave the same in 3.x. The behavior was there before openser forked from ser, but probably the documentation was updated in the openser branch over the time and then with the migration to tm from ser 2.0 was lost.
Thanks for the response.
Let me a question: is it difficult to make new changes into request or new AVP's to be saved within the transaction previously created with t_newtran()? is there any technical reason this not to happen? It would avoid various issues I've suffered in my deployments.
The 3.x provides a way to save the changes done to message after t_newtrans() to transaction: http://kamailio.org/docs/modules/3.1.x/modules/tm.html#t_save_lumps
Regarding avps, the same list should be used after creating the transaction, so new avps are stored in transaction always.
Cheers, Daniel
2011/5/16 Daniel-Constantin Mierla daniel@kamailio.org:
The 3.x provides a way to save the changes done to message after t_newtrans() to transaction: http://kamailio.org/docs/modules/3.1.x/modules/tm.html#t_save_lumps
Regarding avps, the same list should be used after creating the transaction, so new avps are stored in transaction always.
Ok, I didn't know that t_save_lumps also saves AVP's. That's good.
Thanks a lot.
On 5/16/11 3:38 PM, Iñaki Baz Castillo wrote:
2011/5/16 Daniel-Constantin Mierladaniel@kamailio.org:
The 3.x provides a way to save the changes done to message after t_newtrans() to transaction: http://kamailio.org/docs/modules/3.1.x/modules/tm.html#t_save_lumps
Regarding avps, the same list should be used after creating the transaction, so new avps are stored in transaction always.
Ok, I didn't know that t_save_lumps also saves AVP's. That's good.
no, it does not save the avps. But there should be the same avp list used no matter the transaction is already created or not. In other words, when the transaction is createed, the active avp list will point inside transaction structure, so adding/removing works (transparently) with the avps at any time.
Cheers, Daniel
2011/5/16 Daniel-Constantin Mierla miconda@gmail.com:
Ok, I didn't know that t_save_lumps also saves AVP's. That's good.
no, it does not save the avps. But there should be the same avp list used no matter the transaction is already created or not. In other words, when the transaction is createed, the active avp list will point inside transaction structure, so adding/removing works (transparently) with the avps at any time.
Ok, thanks a lot.
On Monday 16 May 2011, Daniel-Constantin Mierla wrote:
So, does 3.X behave different and changes after t_newtran are added to the transaction or not?
no, it should behave the same in 3.x. The behavior was there before openser forked from ser, but probably the documentation was updated in the openser branch over the time and then with the migration to tm from ser 2.0 was lost.
Hello,
I've fixed this in git master and 3.1 branch.
Henning
On Monday 16 May 2011, Daniel-Constantin Mierla wrote:
function call will not be saved into transaction!!!
However in 3.X TM documentation such note is not present: http://kamailio.org/docs/modules/devel/modules/tm.html#t_newtran
So, does 3.X behave different and changes after t_newtran are added to the transaction or not?
no, it should behave the same in 3.x. The behavior was there before openser forked from ser, but probably the documentation was updated in the openser branch over the time and then with the migration to tm from ser 2.0 was lost.
Hello,
Miklos pointed out on sr-dev that the behaviour changed for t_newtran after i fixed the docs in the repository. So aparently the message and AVP modifications should be available even if they are done after t_newtran().
Cheers,
Henning