Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide
4-45
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(3)
Chapter 4 Building Your Application
Working with Agent Statistics
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.eAgentList);
/* 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.*.
returnCode = rSession.Connect(rArgs);
public void OnConnection(Arguments rArgs) {
/*5. Set agent for the session. */
returnCode = rSession.SetAgent(agent);
/* 6. Log in the agent.*/
Arguments rArgs = new Arguments();
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_AGENTID, “275”);
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_PERIPHERALID, “5002”);
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_AGENTINSTRUMENT, “5002”)
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_AGENTPASSWORD, “********”);
returnCode = agent.Login(rArgs);
/* 7. Enable Agent statistics. */
if (returnCode == CIL_OK) {
agent.EnableAgentStatistics(new
Arguments());
}
}
How to Set Up a Monitor-Mode Application to Receive Agent Statistics
To set up a Monitor-mode application to receive agent statistics, follow the instructions below.
Note
The agent to monitor must be logged in Agent mode before a Monitor-mode application can receive
statistics for that agent.
statistics for that agent.
CTI OS has a limitation in providing monitor-mode support to build agent desktop call-control
applications, as well as having the ability to rely on button enablement messages.
applications, as well as having the ability to rely on button enablement messages.
Step 1
Create an instance of the Session class, as described on page 4-20.
Step 2
Subscribe for events for the session, as described on page 4-21.
Note
You must register to receive agent events; therefore, in the AddEventListener() method you
must use as a parameter the field
must use as a parameter the field
CtiOs_Enums.SubscriberList.eAgentList
.