Cisco Cisco Computer Telephony Integration Option 8.5 개발자 가이드

다운로드
페이지 640
 
4-73
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.0(0)
 
Chapter 4      Building Your Application
Working with Skill Group Statistics
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 + "=" + CTIOS_SKILLGROUPSTATISTICS;
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);