cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
355
Views
10
Helpful
3
Replies

Find total agents and type connected to PG?

This came up on my project and can't think of a way to tackle this. Was hoping someone might have had a similar issue in the past.

We're trying to figure out how many agents are logged in at any one time to a PG. Now, as part of this, we also need to know if they are nailed up agents, call by call agents, or traditional agents. I can find the total logins via a Windows perfmon, but can't distinguish mobile agents. Ultimately, we want to know if we're getting close to the 2000 agent max but keeping in mind that no every agent counts as a 1 agent.

Anyone have any ideas?

david

3 Replies 3

Omar Deen
Spotlight
Spotlight

something this easy, or are you looking for counts? 

SELECT A.EnterpriseName, ART.Extension, P.PeripheralID, ART.PhoneType

FROM Agent A, Agent_Real_Time ART, Peripheral P

WHERE A.SkillTargetID = ART.SkillTargetID

AND A.PeripheralID = P.PeripheralID

ORDER BY P.PeripheralID

Per the database schema, Phone Type 0 are traditional agents, 1 is call-by-call, and 2 is nailed

Omar Deen
Spotlight
Spotlight

Here's a count version. It's messy and clunky - but it works. Swap out the PeripheralID for other CUCM PGs. IF you've come up with something cleaner - please post.. would be a nice query to have :)

SELECT COUNT(P.PeripheralID) AS [No. of Traditional Agents], P.PeripheralID AS [ID],

P.PeripheralName AS [Periph Name]

FROM Agent A, Agent_Real_Time ART, Peripheral P

WHERE A.SkillTargetID = ART.SkillTargetID

AND A.PeripheralID = P.PeripheralID

AND P.PeripheralID = '5000'

AND ART.PhoneType = '0'

GROUP BY P.PeripheralID, P.PeripheralName, ART.PhoneType

UNION

SELECT COUNT(P.PeripheralID) AS [No. of Call-by-Call Agents], P.PeripheralID AS [Periph ID],

P.PeripheralName AS [Periph Name]

FROM Agent A, Agent_Real_Time ART, Peripheral P

WHERE A.SkillTargetID = ART.SkillTargetID

AND A.PeripheralID = P.PeripheralID

AND P.PeripheralID = '5000'

AND ART.PhoneType = '1'

GROUP BY P.PeripheralID, P.PeripheralName, ART.PhoneType

UNION

SELECT COUNT(P.PeripheralID) AS [No. of Nailed Agents], P.PeripheralID AS [ID],

P.PeripheralName AS [Periph Name]

FROM Agent A, Agent_Real_Time ART, Peripheral P

WHERE A.SkillTargetID = ART.SkillTargetID

AND A.PeripheralID = P.PeripheralID

AND P.PeripheralID = '5000'

AND ART.PhoneType = '2'

GROUP BY P.PeripheralID, P.PeripheralName, ART.PhoneType

This looks promising, let me do some more testing and get back to you. Thank you!

david