Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 500
   
4-58
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions
Cisco CTI OS Release 7.2(1)
Chapter 4      Building Your Application
Enabling Silent Monitor in Your Application
Determining if the Current Agent is Being Silently Monitored
If an application needs to determine if the current agent is currently being silently monitored, then 
compare the current agent unique object id against the silent monitor target agent unique id carried in 
the SilentMonitorStartedEvent.
Code Sample for Determining if the Current Agent is the Target of a Silent Monitor Call
Note
The parameter args carries the payload of an OnSilentMonitorStartedEvent
.
public
 
bool
 IsCurrentAgentTargetAgent(Arguments args)
{
bool
 isTarget = 
false
 ;
if
 ( m_ctiSession != 
null
 )
{
Agent rAgent = m_ctiSession.GetCurrentAgent() ;
if
 ( rAgent != 
null
 )
{
     
string
 curAgentUID ;
                 rAgent.GetValueString(Enum_CtiOs.CTIOS_UNIQUEOBJECTID, 
                                       
out
 curAgentUID) ;
if
 ( curAgentUID != 
null
 )
{
  
string
 targetAgentUID ;               
                                args.GetValueString(
Enum_CtiOs.CTIOS_SILENTMONITOR_TARGET_AGENTUID, 
                        
out
 targetAgentUID) ;
if
 ( targetAgentUID != 
null
 )
{
isTarget = curAgentUID == targetAgentUID; 
}
}
}
}
return
 isTarget ;
}
Ending a CCM Based Silent Monitor Request
CCM Based silent monitoring is stopped using the SuperviseCall method associated with the 
supervisor's Agent object. To stop silent monitor, the SupervisoryAction parameter must be set to 
eSupervisorClear.  The AgentReference parameter must be set to the unique object ID of the agent 
currently silent monitored.  The AgentCallReference parameter must be set to the unique object ID of 
the call that resulted from the initiation of silent monitor (Agent.SuperviseCall(eSupervisorMonitor)). 
The application receives the SilentMonitorStopRequestedEvent event when the stop silent monitoring 
request is processed. 
 illustrates the message flow.