[sr-dev] t_newtrans() more user friendly

Daniel-Constantin Mierla miconda at gmail.com
Sat Oct 2 18:23:13 CEST 2010



On 10/2/10 4:40 PM, Iñaki Baz Castillo wrote:
> Hi, I want to create a transaction prior to performing some DB queries
> or any other type of communication with external processes. I want to
> create the transaction manually (t_newtrans) before invoking t_relay,
> so if something blocks the request processing for a while, a
> retransmission would not trigger all the DB queries again.
>
> The problem is that changes to the transaction done after invoking
> t_newtrans() are not saved within the transaction (this is: adding
> headers, setting flags, AVP's....) which makes t_newtrans() function
> really ugly and anti-user-friendly.
>
> So my question is: couldn't t_relay() update transaction information
> in case there are changes after calling t_newtrans()?
According to t_save_lumps() doc, t_relay() should update transaction 
with changes to headers:
http://kamailio.org/docs/modules/devel/modules/tm.html#t_save_lumps

In <=v1.5.x, it was no save indeed, iirc.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the sr-dev mailing list