[asterisk-users] concurrent call tracking

Arunas Junevicius arunas.junevicius at agon.lt
Thu May 12 06:47:36 CDT 2011


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: asterisk-users at lists.digium.com
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110512/dbadd932/attachment.htm>


More information about the asterisk-users mailing list