Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 19, 2024 10:50 am
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Tue Jul 31, 2007 6:07 am 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
Hey guys,

Sorry I'm late to the party on this conversation. I'm just now jumping into 1.3 and am looking at same issues. Keep me posted on these mods, and I'll be glad to test them. Right now, I'm still getting 1.3 items working how I want, so I won't be far behind.

The billing, monthly/daily/weekly items for everything from packages to DID's to VAS (value added services such as voicemail) are very KEY components in my estimation.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 16, 2007 4:00 pm 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
***************************************************
slight DELAY I was ready to release the code and my programmer talked me into renaming some tables and fields for a better naming scheme.

**************************************************


Last edited by Sam on Thu Aug 16, 2007 4:37 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 16, 2007 4:22 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
Sam, does this mean you're about ready for some testers? :roll:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 16, 2007 4:35 pm 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
krzykat wrote:
Sam, does this mean you're about ready for some testers? :roll:


I was hoping additional testing would not necessary. But you never know. Bugs sometimes seem to pop up from nowhere. It will be released today or tomorrow I think. Just waiting for my programmer to give me the new file.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 20, 2007 9:40 am 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
krzykat,

Yes.. Have a go at it... It’s finally done and I hope BUG free.
Remove the .txt from the PHP files. There are 2 PHP files. The one beginning in test is the same far as I know. If I understood my coder correctly it doesn’t look for a string in a2billing.conf file as does the other file. which is the reason why it was called Test.

Inside of table cc_subscription_fee you will see a new column called “chargedaily” after you run the mysql statements in sql.txt file

When chargedaily is set to “0” the amount being charged for this subscription will be charged all at once each month but when set to “1” the card will be charged once each day the amount of subscription free divided by the number of days in that very month. Example: non auto paying strictly prepaid customers shouldn’t be charged one lump sum for any monthly amounts. The reason for this is because they depend on the balance prompt telling them when to send in additional payment. If the monthly charge was to be removed all at once at the end of the month they would suddenly be without service and without warning. So when the monthly amount is divided by the number of days in that current month, customers balance gets less and less on a per day basis at the same time customers or clients will always be charge the same each month for each subscription unlike the cron service fees that don’t take into account for some months having more or less days then others.

Another thing is with strictly prepaid customers you normally don’t want their balance going into the negative. If you ever charge them all at once for any monthly fees this could make their balance go into the negative if their balance was already near 0 due to them making international or calls to other areas not included in the monthly service plan.


Since there is no gui for the Feature being discussed above you will need to modify the data directly into the tables. I do not yet have a web designer so Areski or someone else will need to design the web GUI for this service and subscription’s grouping feature.

Direction below is assuming you already created some cront services and subscriptions in your tables cc_ serviceplan table or cc_subscription_fee table.

1. There is a field inside of the cc_card table called “runservice”. In this field or column you need to add the ID from ”cc_serviceplan” table of the service plan you want to charge that client. Inside of the “cc_serviceplan” table you need to create a name for a group of services and subscription’s you want to charge clients.
2. Once you added a record to this table you will take the ID from that record and append/add it to the field “id_serviceplan” in the table cc_serviceplan_group.
3. And to the right in this same table there is a field called id_service. In this field you need add the service ID or the subscription ID found in either the cc_service table and cc_subscription_fee tables.
4. And in the next column of the cc_serviceplan_group table there is a field called service_type. This field tells A2b which table the ID is from. If the ID is a ID of a service inside of cc_service table, set service_type = 0 but if the ID you put in the id_service field is a ID of a subscription from the cc_subscription_fee table set service_type = 1

That is all there is too it. You can continue to add services and subscription to the same service plan by simply repeating the above steps from 2 through 4. To add a completely new service plan or package start at step 1 go to 4. Don’t forget to place the Serviceplan ID from the cc_ serviceplan table into the field “runservice” inside of the cc_card table for the card account you want to add the service plan to. If the “runservice” field inside of cc_card table is set to =0 then no services or subscription will be charged that card account.


Good luck

Best regards,
Sam


Attachments:
test-a2b-mysql-tables.sql.TXT [1.48 KiB]
Downloaded 462 times
File comment: This is the final file.You must have a string in your a2billing.conf file for this to work
a2billing_group_process.php.TXT [20.38 KiB]
Downloaded 420 times
File comment: Place this test-a2billing_group_process.php file under /var/lib/asterisk/agi-bin/libs_a2b/crontjob/
Set to run once a day after you run the MYSQL statements that will add the needed tables and fields.

test-a2billing_group_process.php.txt [20.4 KiB]
Downloaded 507 times


Last edited by Sam on Mon Aug 20, 2007 10:39 pm, edited 2 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 20, 2007 2:32 pm 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
Edited
The above text file has been corrected. Below is also Sql statements to add the needed tables and fields to your DB
Edited
--
-- A2Billing database script - Create tables for MYSQL
--

-- Usage:
-- mysql -u root -p"root password" < test-a2b-mysql-tables.sql


--
-- A2Billing database - Create database schema
--




CREATE TABLE `cc_service_stats` (
`id_card` int(11) unsigned NOT NULL,
`service_type` tinyint(1) unsigned NOT NULL default '0',
`id_service` int(11) unsigned NOT NULL,
`numberofrun` int(10) unsigned NOT NULL,
`datelastrun` timestamp NOT NULL default CURRENT_TIMESTAMP,
KEY `id_card` (`id_card`,`id_service`),
KEY `service_type` (`service_type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

ALTER TABLE `cc_charge` ADD `beforebal` decimal( 15,5 ) NOT NULL DEFAULT '0.00' AFTER `creationdate`;
ALTER TABLE `cc_subscription_fee` ADD `chargedaily` int(2) NOT NULL DEFAULT '1' AFTER `fee`;


CREATE TABLE `cc_serviceplan_group` (
`id_serviceplan` int(11) NOT NULL default '0',
`id_service` int(11) default NULL,
`service_type` tinyint(1) NOT NULL default '1',
`id_user` int(10) default NULL,
`timestamp` timestamp NULL default CURRENT_TIMESTAMP,
KEY `id_service_subscription` (`id_serviceplan`),
KEY `service_type` (`service_type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `cc_serviceplan` (
`id` int(10) NOT NULL auto_increment,
`serviceplan` varchar(50) default NULL,
`id_user` int(10) default NULL,
`timestamp` timestamp NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 30, 2007 10:43 am 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
Edited/added 8-30-2007


Ok sorry all, the code I posted is a little buggy I think. I went live 2 days ago.. And just incase there was issues with this grouping of services and subscriptoins, I made back up of my table cc_card. Thank GOODness. I was able to compare the back up and seen several records didnt get any amount deducted. This will be fixed shortly I hope. And i will repost fixed code.


Top
 Profile  
 
 Post subject: Recurring Service Not Functioning
PostPosted: Tue Nov 20, 2007 2:44 am 
Offline
User avatar

Joined: Sat Jun 02, 2007 5:59 am
Posts: 63
Location: Orlando, Fl
I am having some trouble with the recurring service feature. I have a single service set up to remove all of the credit of a single card and it is not working. I read the post about the updated batch process php. My file is current (A2B v1.3). I checked it against the information posted here. I also checked to see the last time the service ran and this is what I found: /tmp/cront_a2b_batch_process.log [] last modified: Wed, 31 Dec 1969 19:00:00 -0500

Can anyone recommend what I should do?

Thanks in advance!

Seth


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 20, 2007 4:50 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Lol. I didn't know that A2Billing what that old (wow! 1969) :lol:

Have you checked if the crontab has been properly configured?

Also, check the permission of the logfile. Try to set it at 777 to see if that is the issue. Can we see the content of your crontab? What cron service are you using?


Top
 Profile  
 
 Post subject: Re: Recurring Service Not Functioning
PostPosted: Tue Nov 20, 2007 8:54 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
smixon wrote:
/tmp/cront_a2b_batch_process.log [] last modified: Wed, 31 Dec 1969 19:00:00 -0500
Just in case it makes a difference: I don't run the changes Sam describes. My cront_a2b_batch_process.log shows the following:
Code:
[19/11/2007 00:20:01]:[a2billing_batch_process.php line:44[#### BATCH BEGIN ####]]

[19/11/2007 00:20:01]:[a2billing_batch_process.php line:80[ No Recurring service to run]]

[20/11/2007 00:20:01]:[a2billing_batch_process.php line:44[#### BATCH BEGIN ####]]

[20/11/2007 00:20:01]:[a2billing_batch_process.php line:80[ No Recurring service to run]]
So, yes, check your crontab. Also ensure emails from your cron jobs reach your inbox; I receive a daily report from a2billing_batch_process.php.


Top
 Profile  
 
 Post subject: Re: Recurring Service Not Functioning
PostPosted: Tue Nov 20, 2007 12:14 pm 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
smixon wrote:
I am having some trouble with the recurring service feature. I have a single service set up to remove all of the credit of a single card and it is not working. I read the post about the updated batch process php. My file is current (A2B v1.3). I checked it against the information posted here. I also checked to see the last time the service ran and this is what I found: /tmp/cront_a2b_batch_process.log [] last modified: Wed, 31 Dec 1969 19:00:00 -0500

Can anyone recommend what I should do?

Thanks in advance!

Seth



Hi Smixon,

Are you running my updates? If so I need to post to you the latest finish code. There were errors in the last code and it has been completely redone since my last post. I was so busy I didn’t get around to posting it yet. Even though lately I am no longer posting my work here I will still update this topic with the latest working copy that should be bug free. I am using it for a while now and it’s fantastic. I have not yet made reports of the logs it makes. This may yet need to be changed again and that is one of reason why I didn’t post it yet. I want to be able to compile the data being logged into a form easily understood by my clients.


Best regards,
Samuel Atkins


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 20, 2007 2:59 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
Sam, why aren't you posting updates and such here anymore?

someone piss you off or something? I know I go through spurts where I'm too busy in one section or another, but then I do end up back here when time permits.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 20, 2007 9:21 pm 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:13 pm
Posts: 123
Location: English Indiana, USA
LOL no. I am not pissed off. Even if so I wouldn’t stop posting just for that.
I have not been feeling so well and behind enough in my work that I simply don’t have time to post. Plus some of my work is being redone often as more code is added or modifications are made. I can’t keep up with trying to post my work and than all the changes made afterwords. I am not the one doing the PHP coding so if someone needs help I send them to my programmer who is at this moment very busy and too many jolly lookers-dreamers want to get something for nothing. He has made it clear enough, he prefers to deal with serious developers and not just any a2b spectators. If I get more time or find a coder who’s looking for work I might post some more code again.

I in a bit I should have several V-servers with A2b, all applications and plus needed components for card shop and fully Microsoft Access compatible with full admin access, to rent at about the price of a business phone line This includes enough bandwidth for 50 k minutes per month. Termination to about 1/3 of the US at 0.0039 cents a minute all on private network. Would even be happy to give this in exchange for extra support on a2b. I still don’t have every feature of A2b working yet as I set these up only as needed or requested.


Top
 Profile  
 
 Post subject: Cront Tab
PostPosted: Wed Nov 21, 2007 2:36 pm 
Offline
User avatar

Joined: Sat Jun 02, 2007 5:59 am
Posts: 63
Location: Orlando, Fl
Hi guys thank you for the replies. I am not extremely savvy at all of this. When you refer to the cront tab I am hoping that my webmin screen shot of the cront services is what you are referring to. I feel a little lame.

Thanks so much for the help!!!!

Happy Holidays!


Attachments:
ScreenHunter_05 Nov. 21 09.21.jpg
ScreenHunter_05 Nov. 21 09.21.jpg [ 94.88 KiB | Viewed 12496 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 21, 2007 5:39 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Yep. That look like. I have never used webmin so I can't give much instructions about it. But yep. Get in touch with someone who knows about webmin or read the manual, and then configure the cront job available in a2billing. Here is a list from the /your_agi_path/libs_a2billing/crontjob directory

- a2billing_alarm.php
- a2billing_check_account.php
- a2billing_autorefill.php
- a2billing_invoice_cront.php
- a2billing_batch_process.php
- a2billing_subscription_fee.php
- a2billing_bill_diduse.php
- currencies_update_yahoo.php


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2
Predictive Dialer


All times are UTC


Who is online

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