Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Apr 16, 2024 9:41 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Connect charge on buy rate
PostPosted: Wed Jun 04, 2008 2:06 pm 
Offline

Joined: Wed Jun 04, 2008 1:58 pm
Posts: 2
Hello,

I need to add a connect charge in to the buy rate parameters.

This needed is because, my carrier sell the calls with a connect charge, and I buy the calls with this charge.

The problem of this is that if i have one rate with the same price but apply a connect charge, when i go to the cdr report to evaluate the marge of beneficy, the result is false, beacause the billing say that have a gain of the connect charge.

What can i do to solve this problem? perhaps i can put the connect charge in the buy menu of rate, and then add in to the cdr report on buy and then the comparasion belong true.

Can we help me?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 04, 2008 5:12 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
The only easy way to approximate this would be to arrange the buy rate's minimum duration to bill the connect fee. This is the first time I've heard of a carrier charging a connect fee. What destination is this?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 05, 2008 6:44 am 
Offline

Joined: Wed Jun 04, 2008 1:58 pm
Posts: 2
This is not for a one destination.

I'm from Spain and the telephone provider apply a connect charge with all calls not only for one o two destinations.

This is the problem that i need to include the charge in the buy rate.

Only i can modify de buy rate with billing block and another field.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 05, 2008 2:18 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Unless you're happy to do some coding, the only workaround is to try to incorporate the connect charge into the minimum block and billing block for the buy rate.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 25, 2008 9:09 am 
Offline

Joined: Fri Jan 25, 2008 5:46 am
Posts: 2
Hi. I'm not a coder, just been hacking the A2Billing code as necessary to get it to do what I want.
As the client pays for my time, I spend as little time as possible where possible.

Anyway - if you want just a connect charge (not a connect charge and a variable rate) for your buy rate edit:
/var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php

Search for:
$buyratecost -= ($buyratecallduration/60) * $buyrate;

replace with:
if ($buyrateinitblock == 0 && $buyrateincrement == 0)
{
$buyratecost -= $buyrate;
}
else
{
$buyratecost -= ($buyratecallduration/60) * $buyrate;
}

Really simple hack, where if the increment and the initial block are 0, it will treat the buy rate as a connect charge.

Be sure that all your other ratecards don't have 0 for these values (I did this via some sql queries).

This is currently working in a production environment.

Hope this helps.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group