Jan Janak writes:
I wrote a very simple sip-router script to test serial
forking based
on q values with t_load_contacts and t_next_contacts. I noticed that
when I use t_next_contacts before the transaction exists, it uses the
value of fr_inv_timer_next even for the first branch.
Is this itendended behavior? Shouldn't the function use the value of
fr_inv_timer for the first branch and then fr_inv_timer_next for
subsequent branches?
jan,
it is the intended behavior and it has always been like that. it has
even been documented in the readme:
Function t_next_contacts() sets fr_inv_timer to fr_inv_timer_next value
if, after t_next_contacts() is called, there are still lower qvalue
contacts available, and to fr_inv_timer value if there are not.
the idea is that using fr_inv_timer_next, one can shorten the "ringing"
if there are still other contacts to try. if the set of contacts to try
is that last one (or the only one), "ringing" time is normal, i.e.,
specified by fr_inv_timer. if you would wait for normal time already on
the first set, the call would timeout before you have had a change to
try the remaining contacts.
-- juha