Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 490
   
4-51
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(3)
Chapter 4      Building Your Application
Working with Skill Group Statistics
Step 7
When the desktop application no longer requires the statistics for a certain skill group, the application 
can disable those statistics. 
a.
Create an instance of the Arguments class.
b.
Set values in the Arguments instance. You must provide the skill group number and the peripheral 
number for each skill group for which you want to receive statistics. Use the SetValue(keyword, int) 
method signature. 
For example, use SetValue(CTIOS_SKILLGROUPNUMBER, sgNumber) where sgNumber is an 
integer for the skill group for which you want to receive statistics, and 
SetValue(CTIOS_PERIPHERALID, sgNumber) where sgNumber is an integer for the skill group 
for which you want to stop receiving statistics.
c.
Use the Arguments instance as a parameter for the session’s DisableSkillGroupStatistics() method.
The following example demonstrates this task in Java:
/* 1. Create session.*/
CtiOsSession rSession = new CtiOsSession();
/* 2. Add event listener.*/
rSession.AddEventListener(this, 
 CtiOs_Enums.SubscriberList.eSessionList);
rSession.AddEventListener(this, 
 CtiOs_Enums.SubscriberList.eSkillGroupList);
/* 3. Set Connection values.*/
Arguments rArgs = new Arguments();
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_CTIOSA, “CTIOSServerA”);
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_PORTA, 42408);
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_CTIOSB, “CTIOSServerB”);
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_PORTB, 42408);
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_HEARTBEAT, 100);
/*4. Connect to server.*.
int returnCode = session.Connect(rArgs);
/*5. Set the message filter. */
String filter = S_FILTERTARGET + "=" + "SkillGroupStats";
rArgs = new Arguments();
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_FILTER, filter);
returnCode = session.SetMessageFilter(rArgs);
/*6. Enable statistics. */
rArgs = new Arguments();
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_SKILLGROUPNUMBER, sgNumber);
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_PERIPHERALID, peripheralID);
rSession.EnableSkillGroupStatistics(rArgs);
Accessing Skill Group Statistics
Overview
Once the application is set up to receive skill group statistics, as described in the preceding section, you 
access skill group statistics through an event handler. The name of the event depends on the language of 
the application:
In Java, eOnNewSkillGroupStatisticsEvent()