[asterisk-users] Reporting for Asterisk Call Center

A J Stiles asterisk_list at earthshod.co.uk
Tue Sep 13 03:30:29 CDT 2011


On Friday 09 September 2011, bilal ghayyad wrote:
> Hi All;
> 
> Anyone advise for a free (open source) reporting to be used for asterisk
> call center?
> 
> Regards
> Bilal

Problem is, reporting is such a nebulous thing, about the only thing that will 
give you the required level of "generality of purpose" is a programming 
language.  So you might find it simplest just to roll your own.

Assuming you have set up CDR using some kind of database backend, then all you 
really need to do is devise a set of queries which will provide the 
information you want to present in your reports; then write a script in your 
favourite language to make a CSV file  (which will load into any modern 
spreadsheet program)  and e-mail it to whoever needs it.  Lastly, put an entry 
in your crontab to run the report whenever required.

Note that OpenOffice.org calc will treat an entry in a CSV starting with an = 
sign as a formula, so you can insert things such as

"${name}",${ext},${answd},${busy},${unobtain},=C${row}+D${row}+E${row}

and then column F in each row will contain the total of columns C, D and E in 
that row  (assuming you are properly updating $row as you go along .....)  My 
own preference is to use the spreadsheet program to evaluate formulae rather 
than hard-code the answer into the spreadsheet.  That way, if you edit a cell, 
you will not throw everything else out.


I know from past experience that Microsoft Excel will happily accept CSV files 
with an XLS extension  (N.B. it might need \r\n for line endings);  however, I 
am unable to test whether or not it will accept formulae as above, as I do not 
have access to a machine with Windows and Excel.


-- 
AJS

-- 
AJS

Answers come *after* questions.



More information about the asterisk-users mailing list