[Freeswitch-users] cdr minutes of use per did
Avi Marcus
avi at avimarcus.net
Sun Jan 15 02:03:22 MSK 2012
It depends on how your cdr statistics are stored.. CSV file, sqlite, pgsql,
mysql.. for how easy it is to run a query.
And if you want just inbound or outbound "on" that DID.
Then just add that SQL query to a script and have a cron job run it..
e.g. if you use mysql in fusionpbx to store your cdrs (via xml_cdr posts) I
can run:
SELECT <http://dev.mysql.com/doc/refman/5.1/en/select.html>
SUM<http://dev.mysql.com/doc/refman/5.1/en/group-by-functions.html#function_sum>
(`billsec`)/60 FROM
`v_xml_cdr<https://sip.bestfone.com/mod/adminer/index.php?server=localhost&username=root&db=freeswitch&table=v_xml_cdr>
` WHERE `sip_to_user` = '$number'
AND<http://dev.mysql.com/doc/refman/5.1/en/logical-operators.html#operator_and>
`start_stamp` LIKE<http://dev.mysql.com/doc/refman/5.1/en/string-comparison-functions.html#operator_like>
'2011-11%'
= 831.4500 minutes for all of November 2011. (pgsql doesn't like using a
like like that on a time stamp field, it seems..)
Your query, and source info, will vary..
-Avi
On Sun, Jan 15, 2012 at 12:41 AM, Rodney <notlikeme75 at yahoo.com> wrote:
> does anyone have a cdr viewer or method that can help me determine the
> total minutes for all calls on a specified DID for the hour/day/month to
> date? I would like a method to generate such a report and maybe have it
> emailed on a 24 hour basis to the person in charge of the DID. the
> following I have seen in the past with any method to find the original
> program that would give an output like this.
> Calls by Day, DNIS -> DID ACCOUNT-> Friday, 8/19/11 (Eastern Standard
> Time)
> Daily Month to Date
> (Start of Month = Day 21) Day DNIS DNIS
> Group Total
> Calls Minutes
> of Use Average
> Hold Time
> (Minutes) Total
> Calls Minutes
> of Use Average
> Hold Time
> (Minutes) – No rows –
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120115/5aecc643/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list