[OpenSIPS-Devel] [ opensips-Bugs-3590667 ] ACC not logging BYE on random calls

SourceForge.net noreply at sourceforge.net
Wed Dec 5 18:23:07 CET 2012


Bugs item #3590667, was opened at 2012-11-28 04:30
Message generated for change (Comment added) made by 
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3590667&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.8.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel ()
Assigned to: Vladut-Stefan Paiu (vladut-paiu)
Summary: ACC not logging BYE on random calls

Initial Comment:
Hi

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[2024]: ACC: transaction answered: timestamp=1353582441;method=INVITE;from_tag=as6c53d5bd;to_tag=1c431879610;call_id=c1434b259b666c921e0c67752f09c01 at 2.2.2.2: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?

Thanks


----------------------------------------------------------------------

>Comment By: Daniel ()
Date: 2012-12-05 09:23

Message:
HI

The problem is still happening but I'm out of time to generate the whole
scenario and collect the info.

I provided a log some messages below... Is it enough to analize? 
https://sourceforge.net/projects/opensips/forums/forum/839860/topic/6253903


----------------------------------------------------------------------

Comment By: Daniel ()
Date: 2012-11-30 05:49

Message:
Correcting:
** I was thinking if the dialog wasn't created but, not sure. The INVITE
was accounted.

----------------------------------------------------------------------

Comment By: Daniel ()
Date: 2012-11-30 05:48

Message:
Hi Vlad
Sorry, didn't see your comment earlier.

For testing purpose, i set the db_flag on the first line of the script and
ACC also didn't write it to the DB... I was thinking if the dialogic wasn't
created but, not sure.

I'll set log on everything and try get the full log.

In the mean time, please check my first post about this issue:
https://sourceforge.net/projects/opensips/forums/forum/839860/topic/6253903

Thanks



----------------------------------------------------------------------

Comment By: Vladut-Stefan Paiu (vladut-paiu)
Date: 2012-11-28 09:35

Message:
Hello,

So you cannot replicate this scenario ?
Are you sure that the BYEs that are not accounted for are ok from SIP and
Dialog point of view ? Perhaps they have no route headers, and thus they do
not enter the scripting logic where you set the accounting flag for the BYE
as well.

Could you try to setup more logging in your script, putting some xlog
messages for BYEs , and then search for the missing BYEs in the log file,
to make sure they are hitting your part of the script ?

Regards,
Vlad

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3590667&group_id=232389



More information about the Devel mailing list