[sr-dev] DB accounting missing if t_newtran() is called explicitly

Andrew Pogrebennyk apogrebennyk at sipwise.com
Wed Sep 26 15:30:46 CEST 2012


I have found recently that in order to detect retransmits I have to
create a transaction explicitly when the request comes in:
        sl_send_reply("100", "Trying");
        xlog("L_INFO", "New request - $ci\n");

it appears like there are carriers or UAs that do not honor the T1
retransmission interval retransmit the INVITE sooner than proxy creates
a transaction in t_relay(). And since we are counting concurrent calls,
we count the same call multiple times, which is not good.

But with this patch we've faced another sporadic problem - if the
transaction is created beforehand the accounting record is lost.. we use
acc_db mode and set flag to account the transaction. And there are no
errors in kamailio log but no insert into acc in mysql binlog either. I
wasn't successful reproducing it in the lab systems with identical setup.

Is anybody here perhaps aware of some limitation in acc module or
callbacks which makes a transaction created beforehand not accountable?

On a related note, it could make sense to create a transaction
implicitly if dlg_manage() is called to avoid counting same call many
times, I just don't know yet how common this issue is in real life.

More information about the sr-dev mailing list