« Back to CTIOS Toolkit Questions

RE: How to get SkillGroupStatistics

Combination View Flat View Tree View
Threads [ Previous | Next ]
Showing 1 - 20 of 87 results.
of 5
I'd like to modifying CTI Toolkit C++Phone sample so it would receive SkillGroupStatistics, but having problems and would like somebody's help.
I am setting the filter using the keyword S_FILTERTARGET and value "OnSkillGroupStatisticsUpdated". I also enable skill group statistics using EnableSkillGroupStatistics(..). I do all this in OnLogin() function in exercise2Dlg.cpp (let me know if this this the wrong place). I also updated EventSink.cpp by adding OnSkillGroupStatisticsUpdated(Argumetns &rArguments) event where I print m_pDialog->LogEvent("OnSkillGroupStatisticsUpdated", rArguments).
The code compiles and builds with no errors, but the OnSkillGroupStatisticsUpdated event is not being triggered --- I don't see my printout in the log. So one of my questions is what triggers this event and how do I trigger it?
I may be setting up the filter incorrectly, but I tried different ways and still nothing, so if it's wrong, please let me know what the filter should be set to inorder to get SkillGroupStatistics.
But what I am suspicious about is the m_ctiSession->AddAllInOneEventListener((IAllInOne *) m_pEventSkink) function where m_pEventSink is initialized as new CEventSink(m_ctiSession, m_ctiAgent, this). This seems to set listener for the agent and I need listener for the whole SkillGroup. Should this listener funcition be changed (or a a new one added, so not to break the exising code) so I can eventually receive SkillGroupStatistics? I am not at all an expert in CTI or C++, so if new listener or CEventSink is needed, if someone shows me the syntax, it would be much appreciated.
Thanks much.

I am not a C++ programmer, but I know that you do not set a filter for an agent mode application. The CTI Toolkit C++ Phone is an agent mode sample application. The AddAllInOneEventListener will include all events including the onSkillGroupStatisticsUpdated event.

You only have to call Session.EnableSkillGroupStatistics and based on the polling interval configured in CTIOS Server you should receive statistics. I think you are using EnableSkillGroupStatistics in the right place.

And then handle the new statistics event in OnSkillGroupStatisticsUpdated which you need to add an event handler to in the EventSink.cpp

Check to see if the Out of Box CTIOS Agent desktop is displaying skillgroup statistics to ensure your CTIOS Server is configured correctly.

If you indeed want a monitor mode application (in which case you do not Login an agent and only receive events) see the sample filter in the CTIOS developer’s guide.

Thank you David.
I believe our Agent desktop does display skillgroup statistics, but I will double check tomorrow. I am only looking for a few parameters like total agents logged in, total agents on ready, total calls in a queue, etc. So, if our Agent desktop does display skillgroup statistics, I am going to remove setting the filter; I will leave the listener the way it is; I am already using EnableSkillGroupStatistics; and I do have OnSkillGroupStatisticsUpdated in the EventSink.cpp. What I still don't understand is what would trigger the OnSkillGroupStatisticsUpdated event? Does the fact that I set EnableSkillGroupStatistics inside OnLogin() mean that OnSkillGroupStatisticsUpdated event is triggered when I click Login button?
Thank you.

Actually I think enableSkillGroupStatistics has to be invoked AFTER the agent is already logged in. Check your ctios client and server logs to see if the enableSkillGroupStatistics method call is accepted by CTIOS server.

The enableSkillGroupStatistics tells the CTIOS Server to send the onSkillGroupStatisticsUpdated event asynchronously based on the interval defined in the CTIOS Server registry (see the CTIOS System Managers Guide).

David,
I removed setting the filter, but have hard time figuring out where to put enableSkillGroupStatistics other than in onLogin(). You say it has to be envoked AFTER login, but where exactly? After I click Login button, I only have Get Data, Set Data, Get Context buttons that are active. Should it be in one of those? Other buttons are not active.
And another thing I noticed. When I execute C++Phone sample program, before I click on Connect button, I see that Connection and Agent State fields display Online and Unknown respectively. After I click on Connect button, those fields say Connected and Unknown respectively. After I click on Login button, those fields say Offline and Logout respectively. Why does it say Offline and Logout if I just logged in?
Thanks much.

I would invoke it after the first agent state change event received after the login (you will have to set a flag to determine if you have requested enableSkillGroupStatistics before.

I do not know why it would say logout. Are you really logged in correctly? Do you see the agent state event in the Log Window?

.

In your CTIOS Client log, You should see similar to the following log entries:

09/07/12 09:45:13.892 9192 CTIOSSoftphone Thd(10172) CCtiOsSession::MakeRequest(eEnableSkillGroupStatisticsRequest)
09/07/12 09:45:13.893 9192 CTIOSSoftphone Thd(10172) CCtiOsSession::MakeRequest: (UniqObjID:agent.5000.41001 ClassId:1)

…

09/07/12 09:45:17.902 9192 CTIOSSoftphone Thd(5884) CCtiOsSession:emoticonnEvent, (IID:1154678 PrphID:5000 SG#:0 SGID:5007 SGPri:0 UniqObjID:skillgroup.5000.0.0 MsgID:eOnNewSkillGroupStatisticsEvent StatsemoticonHdlCallsTdy:0 HdlCallsTlkTimeTdy:0 AGsLogdOn:2 AGsNotRdy:2 AGsRdy:0 AGsTlkgIn:0 AGsTlkgOut:0 AGsTlkgOthr:0 AGsWorkNotRdy:0 AGsWorkRdy:0 AGsBusyOthr:0 AGsRsvd:0 AGsHld:0 RCallsQNow:0 LngstRCallQNow:0) TimerIntv:10)
09/07/12 09:45:17.904 9192 CTIOSSoftphone Thd(5884) [skillgroup.5000.0.0] eOnNewSkillGroupStatisticsEvent : (IID:1154678 PrphID:5000 SG#:0 SGID:5007 SGPri:0 UniqObjID:skillgroup.5000.0.0 MsgID:eOnNewSkillGroupStatisticsEvent StatsemoticonHdlCallsTdy:0 HdlCallsTlkTimeTdy:0 AGsLogdOn:2 AGsNotRdy:2 AGsRdy:0 AGsTlkgIn:0 AGsTlkgOut:0 AGsTlkgOthr:0 AGsWorkNotRdy:0 AGsWorkRdy:0 AGsBusyOthr:0 AGsRsvd:0 AGsHld:0 RCallsQNow:0 LngstRCallQNow:0) TimerIntv:10)


Event though the documentation says OnSkillGroupStatisticsUpdated , try using OnNewSkillGroupStatisticsEvent in your EventSink.cpp

I tried this by modifying the VB.NET sample ctiosphone and I found you have to use agent.enableskillgroupstatistics rather than session.enableskillgroupstatistics and you do use the OnSkillGroupStatisticsUpdated event.

David,
I did make a change to use EnableSkillGroupStatistics for an agent instead of a session, although I am still calling it from onLogin(). I am getting this OnCtiOsFalure event now:
"(PeripheralID:5022
PeripheralType:17
SkillGroupNumber:915
SystemEventID:14
FailureCode:8
UniqueObjectIDemoticonnull)
MessageID:eCTIOSFailureEvent
ClassIdentifier:1
ErrorMessage: SYSTEM
ERROR:
Can't
process
request
eEnableSkillGroupStatisticsRequest.
Object
[]
was
not
found
and
unable
to
create
object.
CILConnectionID:16729
OriginatingClientID:gcci-2003svr-2908-2032)"
The UniqueObjectID is null, but I thought it's comprised of skillGroupNumber and peripheralID which I do provide. So why is it null?

Thanks.

You have to login first. I just added a button to enableskillstats and do it after login, but you could just add it to the onAgentStateChange event as long as you only do it once.

I don't see OnAgentStateChange event being triggered. I only see OnQueryAgentStateConf event.

You can use the onQueryAgentStateConf event handler to enableskillstats. If you click the Ready or NotReady buttons when enabled you should see an onAgentStateChange event.
.

I did put the agent's EnableSkillGroupStatistics into OnQueryAgentStateConf event in EventSink.cpp and the the error of missing UniqueObjectID went away. But I still don't see the stats I am looking for. What bothers me is (as I mentioned in the post above from 9/6/12 9:59pm) that after I click Login button Status window has Connection field showing Offline and Agent State field shows Logout. Login, Logout, Ready, Not Ready buttons are all inactive. Here is the chain of events:
After I execute the sample program (I have host,ports, agent ID, passwords, the Connection and Agent State fields show Connected and Unknown respectively. The Log Window shows OnCoonection event received and tells me "You can Login now!". Then I press Login button, after which Connection and Agent State fields show Offline and Logout respectively. The Log Window shows the following trace:
Requesting SetAgent
OnCtiOsFailure Event received
(SystemEventID:12
FailureCode:10
StatusBarMessageemoticonffline)

OnCtiOsFailure Event received
(SystemEventID:8
FailureCode:10
StatusBarMessageemoticonffline)

OnCtiOsFailure Event received
(SystemEventID:1
FailureCode:10
StatusBarMessageemoticonffline)

OnCtiOsFailure Event received
(SystemEventID:3
FailureCode:10
StatusBarMessageemoticonnline
AllOnlineForPeriph:1)

OnSetAgentModeEvent Event received
(PeripheralID:5022
PeripheralType:0
AgentState:eUnknown
AvailTimeToday:0
LoggedOnTimeToday:0
NotReadyTimeToday:0
AgentOutCallsToday:0
AgentOutCallsTalkTimeToday:0
AgentOutCallsTimeToday:0
AgentOutCallsHeldToday:0
AgentOutCallsHeldTimeToday:0
HandledCallsToday:0
HandledCallsTalkTimeToday:0
HandledCallsTimeToday:0
IncomingCallsHeldToday:0
IncomingCallsHeldTimeToday:0
InternalCallsHeldToday:0
InternalCallsHeldTimeToday:0
AvailTimeSession:0
LoggedOnTimeSession:0
NotReadyTimeSession:0
AgentOutCallsSession:0
AgentOutCallsTalkTimeSession:0
AgentOutCallsTimeSession:0
AgentOutCallsHeldSession:0
AgentOutCallsHeldTimeSession:0
HandledCallsSession:0
HandledCallsTalkTimeSession:0
HandledCallsTimeSession:0
IncomingCallsHeldSession:0
IncomingCallsHeldTimeSession:0
InternalCallsSession:0
InternalCallsTimeSession:0
InternalCallsRcvdTimeSession:0
InternalCallsHeldSession:0
InternalCallsHeldTimeSession:0
InternalCallsToday:0
InternalCallsTimeToday:0
HandledCallsAfterCallTimeSession:0
HandledCallsAfterCallTimeToday:0
MRDID:0
ICMAgentID:0
AgentMode:2
MaxTaskLimit:0
NumTasks:0
AgentExtensionemoticonnull)
AgentID:1711151
AgentInstrument:723620
SkillGroupsemoticon)
UniqueObjectID:agent.5022.1711151
MessageID:eSetAgentModeEvent
InternalCallsRcvdToday:0
InternalCallsRcvdTimeToday:0
InternalCallsRcvdSession:0
ClientAgentTemporaryID:agent.1347047355
ClassIdentifier:1
IsSupervisor:0
LastErroremoticon4040:1)
ConnectionMode:1
Filter:filtertarget
=
agent.5022.1711151
CILConnectionID:16802
AutoLogin:0
SavedAgentState:9
WaitingforRecovery:0
SavedLoginInfoemoticon)
StatusSystememoticonStatusCTIServer:1
StatusCtiServerDriver:1
StatusCentralController:1
StatusPeripheralsemoticon5022:1))
CurrentProfile:Main
Contact
Center
LoginTime:0
IsAgentTeamMember:0
AgentAvailabilityStatus:-1
ICMAvailableTimeSession:0
RoutableTimeToday:0
ICMAvailableTimeToday:0
RoutableTimeSession:0
OriginatingClientID:gcci-2003svr-3144-3060
LoginNameemoticonnull)
BlockAllEvents:1
AgentCallMode:0
SilentMonitorTargetAgentUIDemoticonnull)
SilentMonitorCallUIDemoticonnull))

Requesting Agent Login
OnQueryAgentStateConf Event received
(PeripheralID:5022
AgentState:eLogout
NumSkillGroups:4
MRDID:1
ICMAgentID:15042
AgentMode:0
MaxTaskLimit:0
NumTasks:0
AgentExtension:723670
AgentID:1711151
AgentInstrument:723670
EnablementMask:0x1000000
UniqueObjectID:agent.5022.1711151
MessageID:eQueryAgentStateConf
IsSupervisor:1
IncomingWrapupStringsemoticonstring0:Updating
string1:Filing
string2:Consulting
string3:Up
sale)
NotReadyReasonCodesemoticonAdmin
Time:7
Back
Office:9
Break
-
Scheduled:2
Break
-
Unscheduled:3
Chat/RM:12
Done
for
the
Day:21
Email:11
eQueries:15
Generic
Not
Ready:1
Lunch:4
Meeting:6
Outbound/Call
backs:10
Projects:8
Research:16
Social
Media:17
System
Issue/Outages:13
Training/Coaching:5
Wrap-up:14)
LogoutReasonCodesemoticonDone
for
the
Day:21
System
Issue/Outages:13)
NotReadyReasonRequired:1
LogoutReasonRequired:0
AgentAvailabilityStatus:0
IsAuthenticated:0
SkillGroup[1]emoticonSkillGroupNumber:3657
SkillGroupID:9505
SkillGroupPriority:0
SkillGroupState:1)
SkillGroup[2]emoticonSkillGroupNumber:915
SkillGroupID:14834
SkillGroupPriority:0
SkillGroupState:1)
SkillGroup[3]emoticonSkillGroupNumber:932
SkillGroupID:14842
SkillGroupPriority:0
SkillGroupState:1)
SkillGroup[4]emoticonSkillGroupNumber:934
SkillGroupID:14843
SkillGroupPriority:0
SkillGroupState:1))

OnButtonEnablementChange Event received
(EnablementMask:0x1000000
UniqueObjectID:agent.5022.1711151
MessageID:eQueryAgentStateConf)

OnButtonEnablementChange Event received
(PeripheralID:5022
FailureCode:70
PeripheralErrorCode:10154
AgentID:1711151
EnablementMask:0x1400000
UniqueObjectID:agent.5022.1711151
MessageID:eControlFailureConf
MessageType:eSetAgentStateRequest
ErrorMessage:IPCC
Error
[10154]An
attempt
has
been
made
to
log
in
to
a
CTI
PORT
device
for
a
non-mobile
agent
or
an
invalid
CTI
PORT
for
a
mobile
agent.Agent
login
is
not
allowed
due
to
an
incorrect
device.
EventType:2
FilterTarget:agent.5022.1711151
TargetCILClientID:gcci-2003svr-3144-3060)

OnCtiOsFailure Event received
(PeripheralID:5022
FailureCode:11
PeripheralErrorCode:10154
AgentID:1711151
EnablementMask:0x1400000
UniqueObjectID:agent.5022.1711151
MessageID:eControlFailureConf
MessageType:eSetAgentStateRequest
ErrorMessage:IPCC
Error
[10154]An
attempt
has
been
made
to
log
in
to
a
CTI
PORT
device
for
a
non-mobile
agent
or
an
invalid
CTI
PORT
for
a
mobile
agent.Agent
login
is
not
allowed
due
to
an
incorrect
device.
EventType:2
FilterTarget:agent.5022.1711151
TargetCILClientID:gcci-2003svr-3144-3060
BlockAllEvents:1)

OnConnectionClosed Event received
()
The Login, Logout, Ready and Not Ready buttons are all not active. As you see there is a PORT error which looks like a problem. Do you know what it means and how to remedy this?
What is even more weird is I click Disconnect, then I retype a port field or any field for that matter, then click Connect again, the Connection field says Connected, but Agent State still says Logout, the Login button is active and there is the same trace about the PORT error.
Any ideas? Thanks much.

My post above appeared twice when I submitted it. Don't know why. So I deleted one entry. Hope the above post from 9/7/12 8:35pm still visible to everyone. It's about PORT error. Help anybody? David?
Thanks much.

The sample does not handle a mobile agent login. Try logging in an agent that is not a mobile agent. Verify that you can login the agent with the out of box CTIOS Agent Desktop.

For logging in a mobile agent, see the description of the agent.login method in the CTIOS Developer's Guide.

David, THANK YOU!
It worked! We do use mobile agent in real life, so I set it up and now I see the stats, the port error went away and all looks good. I am going to sift through the output to see if it has all we need, but looks like this is it. Thanks again David.

In a real Agent Desktop app we set AgentCallMode to 3 which is call-by-call. That's what I use in the sample. But I read that there is another setting -- 4, which is nailed-up.What's the difference between these two? Thanks.

Nailed up means there is 1 call to the agent when they log in and the call stays active through multiple customer calls. Call by call means the remote agent is called for each new call customer call.

Few more questions in addition to the one above.
1. In the argument list returned by OnSkillGroupStatisticsUpdated event, there is a TimerInterval argument showing 10. Does it mean that the stats update every 10 seconds or whenever new event is triggered like someone logged in/out, new call picked up, agents changing status? Am I right?
2. When setting up EnableSkillGroupStatistics, I set only one skillGroupNumber and periferalID, but I do get the stats for other skillGroups as well. Why is that?
3. All the data that's written into Log Window, is it possible to store in a file on a server where the application runs? If yes, what do I use to write into a file?
Thanks.

I removed setting SkillGroupNumber, leaving only periferalID when calling EnableSkillGroupStatistics and I still get statistics for ALL the skillGroups. I suppose that's the way it should be on the Agent Desktop --- if not setting skillGroupNumber, you get the stats for all groups under the periferalID. Is that right?
Thanks.

Showing 1 - 20 of 87 results.
of 5
David Lender (474)
Shannon McCoy (91)
Arthur Shats (57)
Christopher Nagel (47)
GEOFFREY THOMPSON (40)