Hi,
this is my first post to mailing list, so sorry in case i'm doing something
wrong.
when i want to count concurent calls from particular user, i dont use any
cron jobs or counters
in dialplan, run query on cdr, something like:
SEELCT dst, calldate, IF(action = 'substract', @count := @count - 1, @count
:= @count + 1)
FROM
(SELECT dst, calldate, 'substract' AS 'action'
FROM cdr
WHERE calldate between '2011.05.12' AND '2011.05.13' AND
src = "500"
UNION
SELECT dst, DATE_ADD(calldate, INTERVAL duration SECOND), 'add'
FROM cdr
WHERE calldate between '2011.05.12' AND '2011.05.13' AND
src = "500")
JOIN (SELECT @count := 0)
ORDER BY calldate;
----- Original Message -----
From: Skyler
To: [email protected]
Sent: Wednesday, May 11, 2011 19:57
Subject: [asterisk-users] concurrent call tracking
Hi all,
I would like to track/store concurrent call usage per user by
day/week/month and get server totals by day/week/month. Google comes up with
mostly info regarding concurrent call limits, though my goal is to calculate
actual concurrent channel usage and add it into reporting. I'm using * 1.6.2
+ mysql - realtime (no gui). Any suggestions / open-source / AGI on where to
start looking into implementing something like this?
TIA,
Skyler
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users