<div dir="ltr"><div>already logrotate is doing the file split every month.</div><div>how do you serve it in a webpage and which CGI script?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 24, 2014 at 3:18 PM, A J Stiles <span dir="ltr"><<a href="mailto:asterisk_list@earthshod.co.uk" target="_blank">asterisk_list@earthshod.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thursday 24 Apr 2014, binary dreamer wrote:<br>
> hello everyone.<br>
> I am running asterisk and all of my CDRs are in the default csv.<br>
> the system is so limited to ram (only 256) and I cannot run MySQL or any<br>
> other program to give CDRs a fancy view.<br>
> at the moment the only other software running is nginx for a static webpage<br>
> with guidance on the system.<br>
> I do now want to move to sql or similar databases because the machine<br>
> cannot handle it (I have already tried and it wastes ram from calls).<br>
><br>
><br>
> is there a way to present to a webpage the CDRs from the csv, please?<br>
<br>
</div></div>If you can't stretch to a separate machine to run a database (even a scrapper<br>
will do for this) and you can't increase the RAM in your Asterisk machine,<br>
then you will have to resort to manipulating the CSV file.<br>
<br>
Use a cron job to rotate the master CDR daily or weekly, to keep it from<br>
becoming unmanageably large. This needs to be done at a time when you are not<br>
expecting any incoming calls. You really need to stop Asterisk while you do<br>
this and restart it afterwards. The whole operation (cp Master.csv<br>
cdr_$DATE.csv; echo -n "" > Master.csv) should be over within a few ringing<br>
periods; so even if a call does come through in the meantime, Asterisk ought<br>
to just pick it up as soon as it restarts.<br>
<br>
Then write a simple CGI script to serve up the cdr*.csv files. As long as you<br>
send the appropriate content-type, then it ought just to open straight up in<br>
OpenOffice.org calc.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
AJS<br>
<br>
Note: Originating address only accepts e-mail from list! If replying off-<br>
list, change address to asterisk1list at earthshod dot co dot uk .<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br></div>