Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 19, 2024 10:47 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: calls leaked from database
PostPosted: Wed Aug 24, 2011 1:08 pm 
Offline

Joined: Sun Jan 20, 2008 1:58 am
Posts: 72
I just noticed that I am missing calls. A customer had 462 calls according to his IVR, my a2b database shows me only 435 calls.
Checking the CDR on the machine where a2b is running confirms the 462 calls.
I have seen a similar topic from 2008 (here: viewtopic.php?f=16&t=4250&start=15) but not really sure if it's related. What I can see according to the logs is that there was never a insert statement in the cc_call table which is very very strange.

Since a2b didn't do a-leg billing with the old version what I always did was create a new trunk with this provider IP %dialingnumber%@79.111.111.111, where 79.111.111.111 stands for the remote SIP Server where I want to send the traffic. Then I added a new rate using this new trunk and so I could add a destination 1234 for example with VOIP Call no but still send the call over SIP and bill it. I just wanted to mention this so that my setup is understood ... it might contribute to the problem.
Attached is a log of one such missing call.
The odd thing is, that there is no trace at all of the unique ID 1314087566.22982 from this call after this line:

Aug 23 10:19:26 sip php: file:Class.RateEngine.php - line:1157 - uniqueid:1314087566.22982 - [TRUNK STATUS UPDATE : UPDATE cc_trunk SET inuse=inuse+1 WHERE id_trunk='10']

In my CDR file the call is listed as my customer sees it on his IVR and the call lasted 40 min, that is quite a lot to just 'loose'

Code:
Master.csv:"","030680yyxxx","2502XXX","a2billing-did","""030680yyxxx"" <030680yyxxx>","SIP/foobarcust-00005760","SIP/79.111.111.111-00005761","Dial","SIP/[email protected],60,HRgrL(2147483647:61000:30000)","2011-08-23 08:19:26","2011-08-23 08:19:26","2011-08-23 08:59:21",2395,2395,"ANSWERED","DOCUMENTATION","1314087566.22982",""


although I don't quite understand why the timestamp in the CSV file has a different Timezone, but don't really care about that for now.

Any suggestions where I might be losing my calls ?

LE: I forgot, my a2b version is: A2Billing 1.9.4 (Cuprum), Asterisk 1.6.2.9-2+squeeze3 running on Debian 6.0.2 - Kernel 2.6.32-5


Attachments:
File comment: a2b Log of session
a2b_log.txt [13.5 KiB]
Downloaded 560 times
Top
 Profile  
 
 Post subject: Re: calls leaked from database
PostPosted: Thu Sep 01, 2011 11:56 am 
Offline

Joined: Sun Jan 20, 2008 1:58 am
Posts: 72
I did some further checks and also wrote a little script to check which calls are missing from the database.
As far as I could see not only DID calls where affected but also callingcard calls! This all seems to have started on 01. August after updating to A2Billing 1.9.4 (Cuprum), Asterisk 1.6.2.9-2+squeeze3 and Debian 6.0.2 (was running a rather old version of a2b until then)
I compared the cdr starting from 01. June and have found 0 cases where calls where missing. To be honest, this is scary !
I'm a bit in a hurry now, I will check logs and post everything later. But what I could see from first analyzed call ... I see the call coming in (astersik logfile) I can see in the a2b file that the user entered the number he wanted to call, talked aprox 8.5 minutes and ... nothing, no billing, no error in the a2b logfile, nothing about that call after establishing the call.


Top
 Profile  
 
 Post subject: Re: calls leaked from database
PostPosted: Thu Sep 01, 2011 5:25 pm 
Offline

Joined: Sun Jan 20, 2008 1:58 am
Posts: 72
I have some more results, think it's all not that bad after all.
For example I have this uniqueid in my CDR File: 1312953817.9131 which I can't find in the database, checking all calls from that time I found my missing call with the uniqueid 2312953817.9131 which matches what I found in the logfile:

Code:
[10/08/2011 07:23:50]:[file:a2billing.php - line:193 - uniqueid:1312953817.9131]:[CallerID:43650***]:[CN:]:[[CHANNEL STATUS : 6 = Line is up]
[CREDIT : 21.80630][CREDIT MIN_CREDIT_2CALL : 0]] [10/08/2011 07:23:50]:[file:a2billing.php - line:396 - uniqueid:2312953817.9131]:[CallerID:43650***]:[CN:]:[TARIFF ID -> 3]


here I noticed that the uniqueid has changed and looking into the source I found out why:

Code:
                       // CREATE A DIFFERENT UNIQUEID FOR EACH TRY
                        if ($i>0) {
                                $A2B-> uniqueid = $A2B-> uniqueid + 1000000000;
                        }


this remove quite a lot of missing calls, but then I found this one:

Code:
[08/08/2011 14:29:04]:[file:a2billing.php - line:193 - uniqueid:1312806531.7660]:[CallerID:43650***]:[CN:]:[[CHANNEL STATUS : 6 = Line is up]
[CREDIT : 22.22630][CREDIT MIN_CREDIT_2CALL : 0]]
[08/08/2011 14:29:04]:[file:a2billing.php - line:396 - uniqueid:2312806531.766]:[CallerID:43650***]:[CN:]:[TARIFF ID -> 3]


here the uniqueid changed from 1312806531.7660 to 2312806531.766 c'mon ... this one is mean.

so basicly no calls are missing, except for some few where I had to kill the server so I accept that calls might be missing during that time. It was a bit hard to find though since comparing the DB to the CDR file is a bit complicated when a2b is modifying the uniqueid


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group