Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Apr 18, 2024 11:14 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Missing CDRs for callbacks in 1.4.2.1
PostPosted: Sat Oct 03, 2009 4:58 am 
Offline

Joined: Mon Sep 28, 2009 9:49 pm
Posts: 58
Hi,
I have a2b 1.4.2.1 and the CDRs are correct for when a callback connects. In that case both CDR's are created but if the second leg does not connect or is canceled by hanging up the CDR for the first leg is not created. Now i have the setting set to not charge for the first leg if the second leg does not connect but the CDR should still be create and the user should be billed 0. If not it is not possible to track the read profit you make on a user if you can not track all your call costs including the ones that the user does not pay.

Feel free to correct me if i am trying to do something stupid or if i am wrong. still new to this :)

Chris


Top
 Profile  
 
 Post subject: Re: Missing CDRs for callbacks in 1.4.2.1
PostPosted: Sat Oct 03, 2009 10:50 am 
Offline

Joined: Mon Sep 28, 2009 9:49 pm
Posts: 58
guys did some searching through the code and i think i located the issue.

in a2billing.php on line 898
$RateEngine->rate_engine_updatesystem($A2B, $agi, $A2B-> destination, 1, 0, 1);
is used to set the billing but there needs to be another line in there for when you should not charge which should be
$RateEngine->rate_engine_updatesystem($A2B, $agi, $A2B-> destination, 0, 0, 1);

Also the if statement above that needs to be change because it makes the whole section gets skipped and no CDR record is made at all instead of a no cost one. Line 865
if ( ($callback_been_connected==1) || ($callback_been_connected != 1) && ($A2B->agiconfig['callback_bill_1stleg_ifcall_notconnected']==1) ) {

should be not be an if statement at all as even if the callback has not been connected the CDR should be created and ether have a cost or not depending on the settings


And line 898 should be changed to
if ($callback_been_connected==1) {
$RateEngine->rate_engine_updatesystem($A2B, $agi, $A2B-> destination, 1, 0, 1);
}
else if ($A2B->agiconfig['callback_bill_1stleg_ifcall_notconnected']==1)
{
$RateEngine->rate_engine_updatesystem($A2B, $agi, $A2B-> destination, 0, 0, 1);
}

i don't really know PHP so my syntax may be wrong and this is untested but from reading the code i believe this is the cause of the bug

oh the line numbers are based on the tar file for 1.4.2.1

I also raised it as a defect and added my potential solution

regards

Chris


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


All times are UTC


Who is online

Users browsing this forum: No registered users and 15 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