[SR-Users] TM clarifications

Andrei Pelinescu-Onciul andrei at iptel.org
Mon Jun 21 12:19:54 CEST 2010


On Jun 21, 2010 at 11:58, Iñaki Baz Castillo <ibc at aliax.net> wrote:
> 2010/6/21 Henning Westerholt <henning.westerholt at 1und1.de>:
> >> But take into account that after calling t_newtran() new data being
> >> created in the script is not stored within the transaction information
> >> (flags, AVP's...). It produces really unexpected behavior if you don't
> >> take it into account.
> >
> > Hi Iñaki,
> >
> > yes, this is one of the reasons that it IMHO not that useful in proxy
> > configurations, where one need to rewrite a lot.
> 
> I've tryed to use it in some scenarios and finally left it as it's unfeasible.
> IMHO new transaction data created after t_newtran() should be appended
> to the transaction memory when t_relay is invoked.

flags & lumps are appended on t_relay() (ser 2.1, sr 3.*).
You can do things like:
    t_newtran();
    append_hf("FOO: bar\r\n");
    t_relay();
and it will work as expected.


Andrei



More information about the sr-users mailing list