I built a billing system using Opensips. The logic was to log on a mysql table "acc" all INVITEs and BYEs to be removed later. Then within a few seconds, a console would search for BYEs and related INVITES, calculate duration and price, write on the final table and erase those 2 records from this table.
After some time running, I checked that randomly calls, ACC wrote to DB just the INVITEs and not the BYEs. Checked on syslog and happened the same. I got this:
sbin/opensips: ACC: transaction answered: timestamp=1353582441;method=INVITE;from_tag=as6c53d5bd;to_tag=1c431879610;firstname.lastname@example.org:5060;code=200;reason=OK
But not the "BYE" message.
This seems to be a bug on ACC module because it doesn’t write the data to Mysql neither to syslog, and also doesn't generate any error on syslog.
To make sure that my problem was on the module and not in my logic, I removed almost all functionality of my Opensips and let just the call routing and ACC module... It reduced the problem but still happens on some situations, from 0.5% to 5% of all calls, randomly.
To temporary solve my problem, i forced INSERT on DB using avp_db_query on loose_route function. On 95% calls it generate a duplicated BYE on my table but my algorithm discard these additional BYEs, so it’s fine for now.
I believe this is an urgent issue since it affects the billing system of almost everyone using opensips.
How can I debug this issue?
Log in to post a comment.