cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

How to get SkillGroupStatistics

356
Views
0
Helpful
1
Comments
This document was generated from CDN thread

Created by: Arthur Shats on 05-09-2012 02:33:18 PM
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.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 05-09-2012 04:34:38 PM
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.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 06-09-2012 09:51:46 AM
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).

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 05-09-2012 10:11:12 PM
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.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 06-09-2012 05:59:02 PM
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.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 07-09-2012 09:58:41 AM
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:nEvent, (IID:1154678 PrphID:5000 SG#:0 SGID:5007 SGPri:0 UniqObjID:skillgroup.5000.0.0 MsgID:eOnNewSkillGroupStatisticsEvent StatsHdlCallsTdy: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 StatsHdlCallsTdy: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

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 07-09-2012 09:31:41 AM
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?

.

Subject: RE: How to get SkillGroupStatistics
Replied by: David Lender on 07-09-2012 11:41:10 AM
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.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 07-09-2012 12:33:44 PM
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
UniqueObjectIDnull)
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.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 07-09-2012 12:59:41 PM
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.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 07-09-2012 01:11:32 PM
I don't see OnAgentStateChange event being triggered. I only see OnQueryAgentStateConf event.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 07-09-2012 01:16:41 PM
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.
.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 07-09-2012 04:35:04 PM
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
StatusBarMessageffline)

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

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

OnCtiOsFailure Event received
(SystemEventID:3
FailureCode:10
StatusBarMessagenline
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
AgentExtensionnull)
AgentID:1711151
AgentInstrument:723620
SkillGroups)
UniqueObjectID:agent.5022.1711151
MessageID:eSetAgentModeEvent
InternalCallsRcvdToday:0
InternalCallsRcvdTimeToday:0
InternalCallsRcvdSession:0
ClientAgentTemporaryID:agent.1347047355
ClassIdentifier:1
IsSupervisor:0
LastError4040:1)
ConnectionMode:1
Filter:filtertarget
=
agent.5022.1711151
CILConnectionID:16802
AutoLogin:0
SavedAgentState:9
WaitingforRecovery:0
SavedLoginInfo)
StatusSystemStatusCTIServer:1
StatusCtiServerDriver:1
StatusCentralController:1
StatusPeripherals5022:1))
CurrentProfile:Main
Contact
Center
LoginTime:0
IsAgentTeamMember:0
AgentAvailabilityStatus:-1
ICMAvailableTimeSession:0
RoutableTimeToday:0
ICMAvailableTimeToday:0
RoutableTimeSession:0
OriginatingClientID:gcci-2003svr-3144-3060
LoginNamenull)
BlockAllEvents:1
AgentCallMode:0
SilentMonitorTargetAgentUIDnull)
SilentMonitorCallUIDnull))

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
IncomingWrapupStringsstring0:Updating
string1:Filing
string2:Consulting
string3:Up
sale)
NotReadyReasonCodesAdmin
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)
LogoutReasonCodesDone
for
the
Day:21
System
Issue/Outages:13)
NotReadyReasonRequired:1
LogoutReasonRequired:0
AgentAvailabilityStatus:0
IsAuthenticated:0
SkillGroup[1]SkillGroupNumber:3657
SkillGroupID:9505
SkillGroupPriority:0
SkillGroupState:1)
SkillGroup[2]SkillGroupNumber:915
SkillGroupID:14834
SkillGroupPriority:0
SkillGroupState:1)
SkillGroup[3]SkillGroupNumber:932
SkillGroupID:14842
SkillGroupPriority:0
SkillGroupState:1)
SkillGroup[4]SkillGroupNumber: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.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 10-09-2012 12:55:31 PM
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.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 10-09-2012 09:31:23 AM
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.

Subject: RE: How to get SkillGroupStatistics
Replied by: David Lender on 10-09-2012 10:57:27 AM
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.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 10-09-2012 11:39:33 AM
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.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 10-09-2012 11:58:01 AM
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.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 10-09-2012 01:04:04 PM
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.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 10-09-2012 03:47:03 PM
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.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 10-09-2012 05:17:27 PM
David, according to documentation, when setting EnableSkillGroupStatistics for an Agent application, I don't need to specify any arguments, not skillGroupNumber, nor periferalID and I would still be able to get the stats for all the groups under periferalID that I logged in with. I suppose you don't have to answer the question #2 from my post from 9/10/12 5:04pm. However, I would still like to know the answers to my other questions from that post about what TimerInterval is and how if possible to write data that's shown in the Log Window, the stats data for example, into a file.
Thanks.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 11-09-2012 11:38:18 AM
David, but when I did set SkillGroupNumber in the Arguments array for EnableSkillGroupStatistics call, I still got the stats for all groups, not just for the one I set in the Arguments array.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 11-09-2012 01:46:39 PM
In C++Phone sample agent desktop application, I am having a problem figuring out how to access the elements of the Arguments array that are returned in OnSkillGroupStatisticsUpdated event. This is what I have:
void CEventSink:nSkillGroupStatisticsUpdated(Arguments &rArguments) {
    string id=rArguments.GetValueString(CTIOS_UNIQUEOBJECTID);
    string grNum=rArguments.GetValueString(CTIOS_SKILLGROUPNUMBER);
    m_pDialog->AddLogMessage((char *) grNum.c_str());
    m_pDialog->AddLogMessage((char *) id.c_str()).
}
The above works. But but what if I want to access AgentsLoggedOn for a particular skillGroupNumber? How would I do that?
Thanks.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 11-09-2012 06:18:17 PM
David, I don't mean to question your authority on ths subject, but I tried many variations of the above GetValue calls, and it didn't even compile. I might be doing something wrong ofcourse, but when I tried this, it did compile and if I print it out it does give me the correct number:
rArguments.GetValueArray("Statistics").GetValueString("AgentsLoggedOn");
Am I doing it write?
Thanks.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 11-09-2012 11:20:11 AM
1.       The interval is specified in the CTIOS Server configuration see the CTIOS System Manager’s Guide

2.       If there is an error in how your arguments array for the SkillGroupNumber is defined you will get all skillgroups.  From the Developers guide section on EnableSkillGroupStatistics”
An optional input parameter containing a pointer or a reference to an Arguments array containing a

member that is a nested Arguments array with the keyword SkillGroupNumbers. Within this array,

each member has a string key of an integer starting with 1 and an integer value that is a skill group

number to be enabled. If the parameter is NULL or missing, statistics are enabled for all skill groups

to which the agent belongs.

3.       The C++ CIL creates a client log.  See Appendix B of the CTIOS Developers Guide

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 11-09-2012 03:30:11 PM
You check to see if the argument array’s SkillGroupNumber is the skillgroupnumber you are interested in.  Then you access the Statistics arguments array.

GetValue(“Statistics”)

Which returns the arguments array of statistics values:

StatisticsHdlCallsTdy:0 HdlCallsTlkTimeTdy:0 AGsLogdOn:1 AGsNotRdy:1 AGsRdy:0 AGsTlkgIn:0 AGsTlkgOut:0 AGsTlkgOthr:0 AGsWorkNotRdy:0 AGsWorkRdy:0 AGsBusyOthr:0 AGsRsvd:0 AGsHld:0 RCallsQNow:0 LngstRCallQNow:0)

AgentsLoggedOn is AGsLogdOn

So get the value

GetValue(“AGsLogdOn”)

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 12-09-2012 12:25:43 PM
isValid just checks whether or not the key exists in the arguments array.  It does not validate the data.  It is considered good practice because GetValue will fail if used with a key that does not exist.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 12-09-2012 01:23:43 PM
You can configure certain items on CTIOS Server that can affect whether or not a key exisits.  See the CTIOS System Manager’s Guide for more information.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 12-09-2012 08:50:43 AM
I did not code the entire statement for the GetValue calls.

I don’t think you can combine the GetValueArray and GetValueString in 1 statement and the value you are getting should be AGsLogdOn not AgentsLoggedOn.


Try getting the Statistics array first and print it out using dumpargs.  Just use GetValue(“statistics”)  and use IsValid first before you attempt to extract the Statistics arguments array.

For working with GetValue helper methods, see the section on Helper Classes in the CTIOS Developers Guide.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 12-09-2012 09:39:43 AM
Actually you DO need to use AgentsLoggedOn.

Here is my event handler in VB.NET

Private Sub m_session_OnSkillGroupStatisticsUpdated(ByVal pIArguments As Cisco.CTIOSCLIENTLib.Arguments) Handles m_session.OnSkillGroupStatisticsUpdated
        Dim statArgs As New Cisco.CTIOSCLIENTLib.Arguments
        Dim numAgents As Integer
        Dim strAgents As String

        LogEvent("OnSkillGroupStatisticsUpdated", pIArguments)
        Log("Stats: " + pIArguments.GetValue("Statistics").DumpArg())
        Log("Test1")
        statArgs = pIArguments.GetValueArray("Statistics")
        Log("Test2")
        Log("Statargs:" + statArgs.DumpArgs())
        If statArgs.IsValid("AgentsLoggedOn") Then
            Log("Valid")
        Else
            Log("NotValid")
        End If
        Log("numAgents: " + Str(statArgs.GetValueInt("AgentsLoggedOn")))
        numAgents = statArgs.GetValueInt("AgentsLoggedOn")
        Log("numAgents: " + Str(numAgents))

    End Sub

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: Arthur Shats on 12-09-2012 11:06:02 AM
David, when you do statArgs.IsValid("AgentsLoggedOn") , you are checking if AgentsLoggedOn element of Statistics array is valid, right? Why is it important to check for validity of an element? Is it just good practice or there could be some garbage in that element? What could be an example of invalid AgentsLoggedOn?
Thanks.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 12-09-2012 12:45:41 PM
So, I can only see two ways the key may not exist: either I misstyped it or later versions of the CTI OS would change/remove the key. Is there any other reason why the key may not exist?

Subject: RE: New Message from David Lender in Computer Telephony Integration Object
Replied by: David Lender on 12-09-2012 01:30:43 PM
Per Chapter 11 of the CTIOS Developer;s Guide

Not all the statistics values listed in Table 11-1 are present in every system configuration. Whether a
particular statistic value is available depends on both the protocol version of CTI Server with which CTI
OS connects and on the peripheral on which the agent resides.The statistics listed in Table 11-2 are
available in Protocol Version 8 of CTI Server.

So you will have to check to see if the statistic exists.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 12-09-2012 03:32:19 PM
David what's the correlation between "AgentsLoggedOn", S_AGENTSLOGGEDON and CTIOS_AGENTSLOGGEDON ?

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 12-09-2012 05:22:43 PM
They all mean the same thing.

Subject: RE: New Message from David Lender in Computer Telephony Integration Object
Replied by: David Lender on 13-09-2012 10:58:16 AM
To enable skillgroup statistics for a single skill only, specify the skillgroupnumber and skillgroup priority like this:

Private Sub Enable_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Enable.Click
        Dim myskillArgs, skillArgs As New Cisco.CTIOSCLIENTLib.Arguments

        Log("Sending EnableSkillGroupStatistics")
        skillArgs.AddItem("1", 1)   ' 1 is skillgroupnumber
        skillArgs.AddItem("2", 0)  ' 0 is skillgroup priority
        myskillArgs.AddItem("SkillGroupNumbers", skillArgs)
        m_Agent.EnableSkillGroupStatistics(myskillArgs)

    End Sub

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 21-09-2012 10:07:15 AM
David,
I think I've cleared up my confusion that I mentioned in my post above. So, please disregard my post above. What I'd still like to confirm is that OnSkillGroupStatistiscsUpdated event is triggered for each SkillGroup. That's what I see happening in the Log Window --- the print statement that I put in OnSkillGroupStatisticsUpdated function is printed once for each SkillGroup. So if I have 5 SkillGroups, I see OnSkillGroupStatisticsUpdated being executed 5 times (ones for each group), then it waits for 10 seconds (that's my time interval) and then it executes 5 times again and so on. Is that how it's supposed to work: OnSkillGroupStatisticsUpdated event is triggered for each SkillGroup?
Thanks.

Subject: RE: How to get SkillGroupStatistics
Replied by: David Lender on 24-09-2012 04:15:31 PM
What you described sounds like it is working as expected.

Subject: RE: How to get SkillGroupStatistics
Replied by: arthur_sh (simulated) on 04-10-2012 04:34:02 PM
After
modifying C++Phone sample program to receive skillGroupStatistics, I see that
when .exe runs, the memory usage keeps increasing suggesting there is a memory
leak somewhere. If I remove all code in OnSkillGroupStatisticsUpdated(Arguments
& rArguments) { //nothing here }, I don’t see the memory usage increase,
but when I add code to access elements from rArguments object, I see memory
usage keeps increasing and never decrease. For example, I added the following:


Arguments &stats =
Arguments::CreateInstance(); 

stats = rArguments.GetValueArray("Statistics"); 

int agentsLoggedIn = stats.GetValueInt("AgentsLoggedOn");



And running the program with above
code, makes memory increase every time OnSkillGroupStatisticsUpdated event is
executed. I understand it may do some memory manipulations so memory usage
would increase, but once the event finished executing, it should clear the
memory and I should see memory usage decrease. However, I only see memory
increasing. I am using toolkit version 7.5.1. Is there a bug or am I doing
something wrong?
Thanks.
 

Subject: RE: How to get SkillGroupStatistics
Replied by: David Lender on 08-10-2012 09:17:39 AM
The Release method decrements the reference count for the data item. It is necessary to call Release when
you are finished with a data item that had its reference count incremented via CreateInstance or AddRef;
otherwise, a memory leak occurs.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 08-10-2012 10:57:41 AM
David,
If you suggest after doing
Arguments &stats = Arguments::CreateInstance();
I should call   stats.Release();
Then I am doing it, but the memory usage still increases. It seems to be possible to check for for the rcode returned by .Release(), so I did
unsigned long rcode = stats.Release(),
and when I print the rcode, it's 2. I don't know what 2 means, but I know 1 is OK, 0 is failed. So I don't know if .Release() works. Am I doing the right thing?
Thanks. 

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 08-10-2012 11:23:19 AM
If you check the Release documentation in the Developer’s Guide it says:

C++: The current reference count after the Release() call.

So 2 is the reference count.

All the release does is remove a reference count, so it would appear you have 2 other references to stats.
Release all other references, or call Release until the reference count is 0.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 08-10-2012 02:57:03 PM
David,
I am doing Arguments &stats = Arguments::CreateInstance()  for every skillGroup in the OnSkillGroupStatisticsUpdated event and I call stats.Release() for every skillGroup after I am done. Instead of finding where I didn't release 'stats', I removed one of the stats.Release() calls for one of the skillGorups. So now when I call stats.Release() in other skillGroups, I should see the reference count to be 3, but I still see the count as 2. How do you explain this?
Thanks.

Subject: RE: How to get SkillGroupStatistics
Replied by: David Lender on 09-10-2012 10:52:54 AM
I do not know why removing the release does not change your reference count.  Have you tried calling Release an extra time to see if the count moves to 1 and ultimately to 0?  Sorry I have no other ideas.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 09-10-2012 01:49:44 PM
David,
If add two extra stats.Release(), the reference count does go back to 0, but when OnSkillGroupStatisticsUpdated event is executed the next time around, the reference count is back at 2. So I keep releasing it until the count is 0, but the memory usage still keeps increasing and never decrease.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 09-10-2012 02:15:00 PM
David,
According to the docs, Release() should be called after CreateInstance() and after GetValueArray(). So if in my code I use  
Arguments &stats = Arguments::CreateInstance();
stats = rArguments.GetValueArray("Statistics");
does it mean two objects were created with above lines and therefore I have to call stats.Release() twice? Even if this is true, I still can't explain why I have to Release() 3 times, not 2, because this is the only place where I careate 'stats' object.
Thanks.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 09-10-2012 02:19:19 PM
I don’t have any other ideas about your memory leak other than getting the reference count to 0.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 09-10-2012 02:31:00 PM
But decreasing reference count to 0 doesn't fix the memory leak. Could it be a bug in the C++Phone sample or in the version of SDK I am using (v7.5.1) ?
Thanks.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 09-10-2012 02:51:12 PM
The latest 7.5(x) release as of this writing is 7.5(10).  You could try to see if an upgrade fixes your issue.  The C++ phone sample does not have a memory leak.  I have used it with v8.5(3).

I also recall there was a memory leak found in older versions of CTIOS C++ Cil:

From a Service Request regarding the memory leak issue:

There is a known bug ddts CSCsq63700<http://wwwin-metrics.cisco.com/cgi-bin/ddtsdisp.cgi?id=CSCsq63700> in GetElement (which DumpArgs likely uses) in version
7.2(3) and earlier.  This is fixed in version 7.5(2) and 7.2(6)   Please upgrade to one of
these fixed versions or later and retest your scenario(s).

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 11-10-2012 01:41:18 PM
David,
When we upgrade from 7.5(1) to 7.5(10), is it enough to install 7.5(10) maintenance update, or do we have to do full 7.5(10) install?
I found two sites for the 7.5(10) maintenance upgrade that are pointing to different files (names are different and size slitely different):
[url=http://www.cisco.com/cisco/software/release.html?mdfid=273556284&softwareid=280840587&release=8.5(4)&relind=AVAILABLE&rellifecycle=&reltype=latest]http://www.cisco.com/cisco/software/release.html?mdfid=273556284&softwareid=280840587&release=8.5(4)&re...
and another one
[url=http://www.cisco.com/cisco/software/release.html?mdfid=268439689&flowid=5214&softwareid=280840583&release=8.5(4)&relind=AVAILABLE&rellifecycle=&reltype=latest]http://www.cisco.com/cisco/software/release.html?mdfid=268439689&flowid=5214&softwareid=280...

Which one we should use for the 7.5(10) maintenance upgrade, or if there is another site all together, please let me know.
If we need to do full 7.5(10) install instead of the maintenance upgrade, could you tell me the link where to get it?
Thanks.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 11-10-2012 01:59:42 PM
There is no such thing as a full install for 7.5(10) it is just a maintenance release.
7.5(10) is missing a couple of include files if you encounter that I can email them to you.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 11-10-2012 02:04:08 PM
Could you provide the correct link to download 7.5(10) maintenance release? I mentioned above, I found two links pointing to two different 7.5(10) files.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 11-10-2012 03:31:51 PM
Also,
please email me the .h files that are missing in 7.5(10): CTIOSKeyStrings.h and CTIOSKeyStringsAbbrev.h. I am only afraid that there could be more, but for now it only complains about these two. I don't want to publish here my email address, do you have ability to find it based on my name or id ?
thanks.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 19-10-2012 12:46:06 PM
David,
According to the docs (chapter 11), "AgentsAvail" is part of SkillGroupStatistics and is available in Protocol Version 8 of CTI Server. When I call DumpArgs(), 'AgentsAvail' is not listed. I am not sure how to find out what Protocol Version we have, but I am sure we didn't change it from the default. We are using 7.5(1) and 7.5(6). Do you know what the default Protocol Version would be and if this is the reason why I can't get 'AgetnsAvail' ?
Thanks.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 19-10-2012 01:23:04 PM
What version of CTI Server protocol is defined for your CTIOS Server configuration?  I think it should be 13 or higher for CTIOS 7.5(x).

AgentsAvail should be in the statistics array.  You can check to see if it is configured in the Statistics registry on the CTIOS Server.

See chapter 10  Automatic Skill Group Statistics Grid Configuration

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 19-10-2012 01:23:52 PM
Can you get the AgentsAvail statistic in the out of box CTIOS Agent Desktop?

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 19-10-2012 02:11:50 PM
No, out of the box Agent Desktop doesn't have 'AgentsAvail'.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 19-10-2012 03:37:08 PM
Definitely check the CTIOS Server registry for the skillgroupstatistics grid configuration.  If the problem persists, open a TAC case against the CTIOS Agent Desktop.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 22-10-2012 03:18:36 PM
David,
Is there a simple method to find out how many skill groups a given agent is subsribed to? I found that there is GetAllSkillGroups, but it seems complicated since it returns "a pointer to an Arguments array where each member has a string key that is the UniqueObjextID of a skill group and a value that is a reference to a CilRefArg that is a pointer to the skill group object". I am not even sure this is the correct method to use to get the number of skill groups an agent is subsribed to. Could you shed some light on what I should use to get the total# of skill groups?
thanks.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 22-10-2012 04:01:07 PM
To get the number of skillgroups you invoke the GetAllSkillGroups on the session object which returns an array of skillgroups.  You then use the length of the array to determine how many skillgroups the agent is subscribed to.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 22-10-2012 05:50:07 PM
David,
In the agent desktop, I suppose I have to be logged in order to call GetAllSkillGroups(), so I added m_pCtiSession-->GetAllSkillGroups()  in the OnSkillGroupStatisticsUpdated event (but I am calling it only once). However, it returned duplicate groups, such as this:
(skillgroup.5022.3657.0:skillgroup.5022.3657.0 skillgroup.5022.915.0:skillgroup.5022.915.0)  where 3657 and 915 are my skillGroups. But why do they appear twice?
Thanks.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 23-10-2012 10:38:15 AM
I do not know.  Do they have different priorities?  Is there anything else different about the duplicate Skillgroup objects?

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 23-10-2012 12:46:24 PM
1. Priorities were 0 for all groups when we were on 7.5(6); now we upgraded to 7.5(10) and DumpArgs don't display priorities anymore, so I assume they are still 0. I don't see any difference between the groups besides the difference in IDs.
2. Also, I notice that GetAllSkillGroups() returns all 7 groups I am setup for; then I logout/disconnect/exit the app and start over and this time GetAllSkillGroups() returns only 2 groups; then I exit out and start over the app again and it returns only 1 group.  Why does it behave like that?
3. Another thing: maybe in VB, GetAllSkillGroups() returns array of skillgroups like you said, but according to the docs, in C++ and Java/.NET, it returns an array of Arguments, so I can't simply take the length of it like in VB. 
4. And the last observation: I see that in 7.5(10) the array that holds skillgroup statistics is called 'Stats', not 'Statistics' as in 7.5(1) or 7.5.(6); also the names of the the variables in that array changed as well, 'AgentsLoggedOn' in 7.5(6) became 'AGsLogdOn' in 7.5(10).  I noticed this when I was doing DumpArgs. Is this change just for displaying purposes? My code still refers to 'Statistics' and to 'AgentsLoggedOn', but I am running 7.5(10). All seems to work fine, but I am curious if I should change the naming in my code?
Thanks.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 23-10-2012 01:47:15 PM
1.        What happens when you display the skillgroups in the CTIOS Agent Desktop?

2.        The GetAllSkillGroups returns the skillgroups that it has seen in onskillgroupupsdated events.  Are you enabling skillstats on all the skills?

3.       Use the numElements method of the Arguments array

4.       DumpArgs was modified to assist with reducing the size of CTIOS Server and Client logs so yes it is just for displaying purposes.  In fact, you cant use DumpArgs on an array of callvariables unless you have the tracing set high enough.  This information is in the CTIOS 9.0 Developer’s Guide secton on Logging and states:
For CTIOS server versions 7.5(10), 8.0(3) and later the default trace level will not print the call variable in
CTIOS sever logs. This has been done as an enhancement to reduce the log size in these two versions and

1.       above. To get the call variable in CTIOS logs you need to set the trace level to 0x400000.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 24-10-2012 01:45:35 PM
David,
I am enabling stats for all skillgroups. Using numElements did return the number of skillGroups even though when I print out the groups, they appear to be duplicated. However this total number may be different every time I start the C++Phone app (if I am lucky, I may get the correct total number from the 1st time, but most of the time I am not lucky). I noticed that on the CTIOS Agent Desktop, the list of skil groups doesn't appear at once, there is some delay and I see only few groups appear at first, then I wait a bit, then few more appear until all are displayed. I don't know why such a delay, but it means I have to call GetAllSkillGroups more than once, so I put the call into OnSkillGroupStatisticsUpdated event and now it's going to be called every time for every skillGroup which is not efficient.
Another problem is when I call .Release() after calling GetAllSkillGroups, it gives me a reference count of 2 and since I am callling it for every skill group, the reference count keeps growing by 1 every time OnSkillGorupStatisticsUpdated event is executed. Here is the code:
Arguments &groups = Arguments::CreateInstance();
groups = m_pCtiSesson->GetAllSkillGroups();
int totalGroups = groups.NumElements();
unsigned long errCode = groups.Release();
If I call errCode=groups.Release() 3 times so it returns 0, the app crashes when onSkillGroupStatisticsUpdated event is executed 2nd time. It seems to crash on the line groups=m_pCtiSession->GetAllSkillGroups().  Looks like .Release() affects something it shouldn't because calling it once or none at all, doesn't make the app crash.
Any thoughts about all this?
Thanks.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 24-10-2012 02:14:15 PM
Try calling the GetSkillGroups from the agent object rather than the GetAllSkillGroups from the session object.  From the CTIOS Developer’s guide section on Agent object GetSkillGroups:

“If skillgroupstats is enabled, the GetSkillGroups method allows a client to retrieve a list that contains references
to all the skill group objects to which the agent belongs. To retrieve skill groups enable skill group statistics,
and turn off agent event minimization by setting its value to 0 on the CTI OS server in the registry key, for
example:
HKLM\SOFTWARE\Cisco
Systems,Inc.\Ctios\<Customer-Instancename>\CTIOS1\Server\Agent\MinimizeAgentStateEvents
The skill group information is available on the agent state change event if the minimization is turned off.”

There is a C++ sample under GetSkillGroups in the developer’s guide.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 25-10-2012 11:19:38 AM
David,
In the 7.5(1) guide I read that To retrieve skill groups WITHOUT enabling skill group statistics, turn off agent event minimization by setting its value to 0 on the CTIOS server in the registry key. I DO enable skill group statistics, so I don't have to make changes on the server. Am I reading it right? 

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 25-10-2012 12:24:15 PM
The latest documentation says both.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 10-12-2012 04:02:35 PM
David,
If I print out rArgumens in OnConnection Event, the EvtTime parameter displays, I assume, a number of seconds of some sort. What's the starting point for the count of seconds? I am actually looking for a way to convert this time to a readable format.
Thanks,
Arthur. 
 

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 11-12-2012 09:05:55 AM
Since it is time of day it is the number of seconds since midnight.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 11-12-2012 09:20:19 AM
David,
I connected around 10am EST, so the EvtTime should show a number around 36000, but it shows 18629898.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 11-12-2012 09:49:18 AM
The time is in milliseconds not seconds.  The evttime for 10am would be 36,000,000   18,692,898 would be around 5am I think.  Is your server set to EST?

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 11-12-2012 12:00:01 PM
Thanks David.  Miliseconds makes sence now.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 11-12-2012 04:41:05 PM
David,
Is it a problem if  EnableSkillGroupStatistics is called more than once? I call it from OnQueryAgentStateConf handler and notice that this handler is executed more than once and hence would be the call to EnableSkillGroupStatistics. Would calling EnableSkillGroupStatistics more than once cause any problems?
thanks,
Arthur.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 12-12-2012 08:21:55 AM
I am not aware of any issue calling the request more than once,  but maybe you should place the request somewhere where it will be called once.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 12-12-2012 12:22:30 PM
David,
I am running C++Phone sample application. When connection failure occurs, it automatically reconnects to a backup server, but I don't think the agent is re-logged in. I believe you mentioned somewhere that reconnection is configured by default and I don't have to do anything in the code to insure this kind of failover happens. But what if I want the app to re-login after failover? Would setting CTIOS_AUTOLOGIN to 1 for the agent object inside OnLogin() event insure re-login happens after failover? 
Thanks,
Arthur.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 12-12-2012 12:50:58 PM
Yes, See Chapter 4  of the CTIOS Developer Guide section on Configuring the Agent to Automatically Log In after Failover:

If you are using CTI OS in an Unified Contact Center Enterprise (Unified CCE) environment, you can
configure the agent to automatically relogin in the event of a failover.
To configure the agent to log back in automatically, add the CTIOS_AUTOLOGIN keyword with the
value “1” to the Arguments instance used to configure the agent:
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_AUTOLOGIN, “1”);

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 18-12-2012 10:11:26 AM
David,
I am using C++Phone sample which is an Agent Desktop app. I believe it's been mentioned that in the Agent Desktop in order to get skillGroupStatistics, the agent needs to be logged in. However, in the event of failover, the agent is not relogged in, but I am still getting the statistics. How do you explain this?
Thanks.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 18-12-2012 10:22:39 AM
It would appear the statistics EnableSkillGroupStatistics request is cached between CTIOS Servers.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 18-12-2012 11:20:28 AM
Here is a bit more info. I have to say that I call EnableSkillGroupStatistics inside OnQueryAgentStateConf event which is triggered at some point after server fails over. But since the app isn't getting logged in after failing over, the call to EnableSkillGroupStatistics doesn't do anything, so the fact that I still get stats after failover is (as you said) because of cashing. Right?
Thanks.
 

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 20-12-2012 04:47:32 PM
David,
In C++Phone sample program, is there a limit of how much data could be written into a log window? If yes, how much and what would happen if limit is reached, is it going to crash or just stop writing to a log or else? Doing m_edtLogWindow.SetWindowText(“”) would clear the screen log, but do I have to clear some buffer, if yes, how do I do it?
Arthur.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 21-12-2012 09:06:56 AM
The C++ sample is provided as is.  What you are asking are MS Windows programming questions better suited to Microsoft.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 18-01-2013 09:40:17 AM
David,
While running C++Phone sample app, I sometimes see failure events in the log window like the followin:
OnCtiOsFailure Event received
 (PGStatus:0
 SysEvtID:3
 SysEvtArg1:5022
 FailCode:10
 MsgID:eCTIOSFailureEvent
 ICMCCTime:1358522430
 StatusBarMsgnline
 AllOnlineForPeriph:1)
How do I tell what actually failed?
Thanks.

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 18-01-2013 09:47:46 AM
FailCode: 10 means eServerConnectionStatus. (see OnCTIOSFailure in the CTIOS Developer’s Guide.)  Since AllOnlineForPeriph = 1 then nothing failed it is a server status message only.

During the login process it is common to see the onCTIOSTailureEvent which can be ignored.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 18-01-2013 10:19:49 AM
Yes, I do see this failure events during login, but I am more concerned when I see these long after the login. So, are you saying that every so often a server just sends out status msgs informing that all is OK or not?

Subject: RE: New Message from Arthur Shats in Computer Telephony Integration Object
Replied by: David Lender on 18-01-2013 10:46:46 AM
Yes, you can get AllOnlineForPerihperal system events.   Its only an error if there is a different SystemEventID.  See the enums in the onCTIOSFailure event in the developer guide to determine if something is offline or online.

Subject: RE: How to get SkillGroupStatistics
Replied by: Arthur Shats on 18-01-2013 10:55:53 AM
OK. It's just that today alone I see 14 CtiOsFailure events and it's not even afternoon yet.
Comments
Community Member

Hello,

Every so often I get FailCode 11 from OnCtiOsFailure Event with a msg 'The service requires a resource that is out of service'. After that I get OnConnectionClosed Event.  Any idea what this err means and what could have caused it? Here is the full err:

OnCtiOsFailure Event received

                (PrphID:5022

                FailCode:11

                PrphErrCode:0

                AGID:1714221

                Msk:0x1400000

                UniqObjID:agent.5022.1714221

                MsgID:eControlFailureConf

                MsgTyp:eSetAgentStateRequest

                ErrMsg:The

                service

                requires

                a

                resource

                that

                is

                out

                of

                service.

                EvtTyp:2

                FiltTgt:agent.5022.1714221

                TgtCILClntID:ACDPC-1908-2164

                BlkAllEvts:1)

Thank you,

Arthur.