[asterisk-users] cdr viewer for csv
joshdmetzger at gmail.com
Thu Apr 24 07:37:09 CDT 2014
With such a low amount of calls per month and with the extreme memory
limitations, it might be easier to write a script to pull out the data and
generate a static html page. Run it daily / weekly / whenever you need it.
On Thu, Apr 24, 2014 at 8:28 AM, binary dreamer <dreamer.binary at gmail.com>wrote:
> already logrotate is doing the file split every month.
> how do you serve it in a webpage and which CGI script?
> On Thu, Apr 24, 2014 at 3:18 PM, A J Stiles <asterisk_list at earthshod.co.uk
> > wrote:
>> On Thursday 24 Apr 2014, binary dreamer wrote:
>> > hello everyone.
>> > I am running asterisk and all of my CDRs are in the default csv.
>> > the system is so limited to ram (only 256) and I cannot run MySQL or any
>> > other program to give CDRs a fancy view.
>> > at the moment the only other software running is nginx for a static
>> > with guidance on the system.
>> > I do now want to move to sql or similar databases because the machine
>> > cannot handle it (I have already tried and it wastes ram from calls).
>> > is there a way to present to a webpage the CDRs from the csv, please?
>> If you can't stretch to a separate machine to run a database (even a
>> will do for this) and you can't increase the RAM in your Asterisk
>> then you will have to resort to manipulating the CSV file.
>> Use a cron job to rotate the master CDR daily or weekly, to keep it from
>> becoming unmanageably large. This needs to be done at a time when you
>> are not
>> expecting any incoming calls. You really need to stop Asterisk while you
>> this and restart it afterwards. The whole operation (cp Master.csv
>> cdr_$DATE.csv; echo -n "" > Master.csv) should be over within a few
>> periods; so even if a call does come through in the meantime, Asterisk
>> to just pick it up as soon as it restarts.
>> Then write a simple CGI script to serve up the cdr*.csv files. As long
>> as you
>> send the appropriate content-type, then it ought just to open straight up
>> OpenOffice.org calc.
>> Note: Originating address only accepts e-mail from list! If replying
>> list, change address to asterisk1list at earthshod dot co dot uk .
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asterisk-users