<span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Hi, </span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">this is my first post to mailing list, so sorry in case i'm doing something wrong.</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">when i want to count concurent calls from particular user, i dont use any cron jobs or counters </span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">in dialplan, </span>run query on cdr, something like:</div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br>
</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">SEELCT dst, calldate, IF(action = 'substract', @count := @count - 1, </span>@count := @count + 1)</div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "> </span>FROM</div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">(SELECT dst, calldate, 'substract' AS 'action'</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">FROM cdr</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">WHERE calldate between '2011.05.12' AND </span>'2011.05.13' AND</div>
<div><div> src = "500"</div>UNION </div><div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">SELECT dst, DATE_ADD(calldate, INTERVAL duration SECOND), 'add'</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">FROM cdr</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">WHERE calldate between '2011.05.12' AND </span>'2011.05.13' AND</div>
<div> src = "500")</div></div><div>JOIN (SELECT @count := 0)</div><div>ORDER BY calldate;</div><div><br></div>----- Original Message -----<br>From: Skyler<br>To: <a href="mailto:asterisk-users@lists.digium.com" style="color: rgb(42, 93, 176); ">asterisk-users@lists.digium.com</a><br>
Sent: Wednesday, May 11, 2011 19:57<br>Subject: [asterisk-users] concurrent call tracking<br><br><br>Hi all,<br><br><br><br> 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?<br>
<br><br><br> TIA,<br><br><br><br> Skyler</span>