[sr-dev] requests timed out too fast

Andrei Pelinescu-Onciul andrei at iptel.org
Mon Jun 8 22:46:03 CEST 2009


On Jun 06, 2009 at 11:30, Juha Heinanen <jh at tutpro.com> wrote:
> after the regex fixup bug was fixed, i got a bit further with my
> sip-router tests.  by the way, am i the only one testing sip-router,
> because no-one else has complained about anything?
> 
> this time i was hit by problem, where sip-router sends 408 request
> timeout too fast.  the reason turned out to be difference in units of sr
> and kamailio tm module timer values.
> 
> in sr, timer values are given in ms, whereas in k they are seconds.  it
> would be easy to make the change if it would only involve tm module
> params in config file, but in my case, i have these timer values all
> over in database, where they get assigned to pseudo variables used by tm
> module.

You could drop the fr_timer_avp modparam and add instead in the script:

$fr_inv_to_ms=$avp_with_time_in_s * 1000;
t_set_fr($fr_inv_to_ms);
...
t_relay() # or other t* function

It's even more readable (no "hidden" magical  modparam avps).
> 
> so migration from kamailio tm to sr tm will not be easy.  in order to
> help here, could it be possible to have a new tm module param that tells
> which units (ms or seconds) timer values are given to tm module?

I think it would be a support nightmare. This way there's no incentive
to migrate to ms and we'll end up with a lot of confusion regarding the
time unit (will have some users using s and other using ms).
For fixed tm timer modparams (e.g. fr_timer, fr_inv_timer a.s.o) we
could print some warning when the values are too small (e.g. less then 5
s for fr_timer and fr_inv_timer, less then 0.5 s for retr. timers
a.s.o.).

Andrei



More information about the sr-dev mailing list