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]>' 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
Not exactly what you are asking, but it works for us.
On 11/7/2011 10:49 AM, obi-wan wrote:
is there a command i can place in root's crontab on my 4.2.1 sipXecs
server to automatically generate CDR reports.? _i would like to auto
generate the CDR graphics in PDF and send to my internet web site to
display Call Status for previous days and times.?
thanks in advance...
obi-wan <mailto:[email protected]>
_______________________________________________
sipx-users mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-users/
_______________________________________________
sipx-users mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-users/