Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 668
 
Chapter 4      Building Your Application
Enabling Silent Monitor in your Application
4-80
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1) 
m_Args.AddItem("MonitoringDeviceID", 1234)
 
‘Set the working mode to monitored
 
m_silentMonitor.StartSMMonitoredMode(args)
Initiating and Ending a Silent Monitor Session
Initiating a silent monitor session starts with the client, in monitoring mode, 
calling the StartSilentMonitorRequest method. This indicates that the CTI OS 
server should send an OnSilentMonitorStartRequestedEvent to a remote client in 
monitored mode. The remote client, upon receiving the 
OnSilentMonitorStartRequestedEvent, chooses whether or not accept the request. 
The remote client acknowledges its approval or rejection by sending a status 
report back to the monitoring client. The monitoring client will receive the 
acceptance or rejection via the OnSilentMonitorStatusReportEvent. When the 
session is accepted by the remote client it, will immediately start forwarding voice 
to the monitoring client. The silent monitoring session can only be terminated by 
the monitoring client by calling the StopSilentMonitorRequest method, CTI OS 
server will issue the OnSilentMonitorStopRequestedEvent to the remote client. 
The monitored client will stop sending audio immediately when 
OnSilentMonitorStopRequestedEvent is received by its SilentMonitorManager 
object.
Following are code samples for initiating and ending a silent monitor session: 
Monitoring Client Code Sample
Private Sub btnStartSM_OnClick()
Dim m_Args As New Arguments
‘Assemble arguments for start request
‘Agent to monitor
m_Args.AddItem "AgentID", “23840”
m_Args.AddItem "PeripheralID", “5000”
‘Request silent monitor session to start
m_SMManager.StartSilentMonitorRequest(m_Args, m_nSMSessionKey)
End Sub
Private Sub m_session_OnSilentMonitorStatusReportEvent(By Val 
pIArguments As CTIOSCLIENTLib.IArguments)
         Dim strAgent As String
         Dim nMode As Integer