On Mon, Nov 7, 2011 at 7:27 PM, Matthew Kitchin (public/usenet) <
[email protected]> wrote:

>  I do it, but it may not be the most elegant way.
> I have different files for each extension I run a report for. Here is one:
>
> psql -H -d SIPXCDR -U postgres -c "select caller_aor,callee_aor,start_time
> AT TIME ZONE 'GMT' as "Start_Time",end_time AT TIME ZONE 'GMT' as
> "End_Time",end_time-start_time as "Duration" from cdrs where (caller_aor
> like '%<sip:[email protected]> <sip:[email protected]>' or  callee_aor like '%
> [email protected]>' or callee_aor like '%[email protected]>') and
> start_time > current_date - 7;"
>
> I then have a seperate script for each user that wants the reports. Here
> is one:
> ../sendEmail -f [email protected] -t [email protected] -u
> Call Reports -m These are the call reports you requested -s
> smtp-relay.hardware:25 -a tmp/0143.html tmp/0194.html tmp/0920.html
> tmp/0939.html tmp/0958.html tmp/0972.html tmp/1156.html tmp/1161.html
> tmp/1162.html tmp/1182.html tmp/1187.html tmp/4501.html tmp/4504.html
> tmp/4506.html tmp/4507.html tmp/4508.html tmp/4511.html tmp/4512.html
> tmp/4513.html tmp/4514.html tmp/4519.html
>

I'd try to integrate jasper server reports in the way opennms does, that is
to connect to config database directly, then you could setup schedulers to
generate reports: http://www.opennms.org/wiki/JasperServer_Integration

George
_______________________________________________
sipx-users mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-users/

Reply via email to