[asterisk-users] cdr viewer for csv
A J Stiles
asterisk_list at earthshod.co.uk
Thu Apr 24 07:59:26 CDT 2014
On Thursday 24 Apr 2014, binary dreamer wrote:
> already logrotate is doing the file split every month.
> how do you serve it in a webpage and which CGI script?
You need a web server. You say you already have nginx; I'm not familiar with
this, but it probably will do what you need. Read the documentation to find
out where CGI scripts should be placed by default. Note that most Linux
distributions standardise the locations of things like this across several
packages; so whichever webserver you installed, CGI scripts will always be in
the same folder. And if you installed from your distribution's repository,
this might not be in the same place mentioned in the documentation for the
"pristine" package. So when searching, be sure to mention your distribution
by name.
Simplest ever CGI script:
---------- >8 ----------
#!/bin/bash
echo "Content-type: text/plain"
echo ""
env
exit 0
---------- 8< ----------
Save this in your cgi-bin folder, give it 755 permissons (so anybody can read
and execute it), and call it up from a desktop machine on your LAN. Keep re-
reading the instructions until you get it working without a 500 error.
Now you just need to write a script in your favourite language to pull out the
bits you want and display the result. Don't forget to begin with a content-
type declaration followed by a blank line.
--
AJS
Note: Originating address only accepts e-mail from list! If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .
More information about the asterisk-users
mailing list