Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 508
   
4-79
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 8.0(1)
Chapter 4      Building Your Application
Building Supervisor Applications
Table 4-9
.Agent.SetAgent State Parameter (logout)
An agent involved in a call will not be logged out until the agent is disconnected from the call.  Both the 
out-of-the-box desktop and the combo desktop warn the supervisor of this behavior.  This can be done 
by checking the state of the currently monitored agent.  If the agent’s state is talking, hold, or reserved 
the monitored agent is involved in one or more calls and will not be logged out until the agent has been 
disconnected from all calls.  This is illustrated in SupervisorUIManager.m_btnMonLogoutAgentClick().
Successfully calling Agent.SetAgentState() should be followed by one or more 
SupervisorButtonChange and MonitoredAgentEvents reflecting the change in the monitored agent’s 
state.
Monitoring Calls
This section discusses step 4 in the flow of a supervisor application.  The methods and events listed 
below are used to monitor a call.
Methods Called
Agent.StartMonitoringCall()
Agent.SuperviseCall()
Events Processed
Events Processed
OnSupervisorButtonChange
AgentStateEvents
CallEvents
MonitoredCallEvents
MonitoredCallEvents
As stated in the “Monitoring Agents” section, calling Agent.StartMonitoringAgent() will trigger 
MonitoredCallEvents for the agent specified in Agent.StartMonitoringAgent().  The 
MonitoredCallEvents received by the supervisor desktop, inform the desktop of the state of the 
monitored agent’s calls.  The combo desktop uses these events to populate and update the monitored calls 
grid.  Please see the SupervisorUIManager and CallAppearanceHelper classes for further details.
Key
Value
SupervisorID
The ID of the supervisor who is 
making the agent ready.  This value is 
the value of the AgentID key 
associated with the current agent (the 
current agent is the agent passed into 
the call to Session.SetAgent() when 
first logging in the agent).
AgentState
The state to which to set the agent.  In 
this case, the state is ready (integer 
with value 3).
EventReasonCode
The value associated with this key is 
999.  The value 999 indicates to the rest 
of Unified CC that the agent was 
logged out by their supervisor.