asterisk2billing.org http://forum.asterisk2billing.org/ |
|
automating data collection, call Reports http://forum.asterisk2billing.org/viewtopic.php?f=18&t=10737 |
Page 1 of 1 |
Author: | lukasztsg [ Thu Feb 27, 2014 12:23 pm ] |
Post subject: | automating data collection, call Reports |
HI all, At the end of each month I am finding myself login into A2Billing portal going to Call Reports->cdrs, picking a client, selecting dates and exporting as CSV. We have a lot of clients and the whole process is tedious. Would anyone be able to advise me on how can I automate it? Is there any API I could use? I have programming experience, not so much in PHP mostly Ruby but i can understand the code, and I am looking for some suggestions as of which direction I should go? Are there any ready solution for this? Where should I start looking if I would like to create the service that would connect to A2Billing and export cdrs automatically? I haven't done a lot of research yet, I just started to think about it and I am hoping that maybe someone would be able to save me some research time. Thank you for any suggestions. Lukasz. |
Author: | jroper [ Fri Feb 28, 2014 9:19 am ] |
Post subject: | Re: automating data collection, call Reports |
Hi It should be possible to create a MySQL query that selects all the CDR on a per customer basis and downloads them to a text file. It should be then quite straightforward to email them to you. This can all be done via a shell script and cronjob, although other programming languages can be used. Joe |
Author: | lukasztsg [ Sat Mar 08, 2014 3:01 pm ] |
Post subject: | Re: automating data collection, call Reports |
Hi Joe, Thank you for your replay. I will look in to this. I have looked at the code today and it seams that cc_call table is the main table for cdr's. Would you, or someone else, be able to confirm that cc_call table is all I need for what I have described earlier? I dont have access to the system at the moment and I would be able to thinker about it over the weekend and test it on Monday. Thank you, Lukasz. |
Author: | jroper [ Sat Mar 08, 2014 4:59 pm ] |
Post subject: | Re: automating data collection, call Reports |
Hi cc_call does contain the CDR, but you may have to be doing some inner joins to get customer and destination information. Joe |
Author: | bucasia [ Sun Mar 09, 2014 2:18 pm ] |
Post subject: | Re: automating data collection, call Reports |
Someone wrote this a while back that you may be able to use as a starting point - http://sysadminman.net/blog/2012/a2bill ... spend-3774 It doesn't extract the actual CDRs, but does do a monthly usage report that can be used to generate invoices externally. |
Author: | dcitelecom [ Thu Mar 20, 2014 2:47 pm ] |
Post subject: | Re: automating data collection, call Reports |
We simply do this in phpmyadmin. Export the cc_call table to csv. Match the a2billing account ID with a customer in our database and invoice. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |