Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide
4-55
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(3)
Chapter 4 Building Your Application
Enabling Silent Monitor in Your Application
Monitored Mode
In this mode, the client sends audio and status reports on silent monitor session and receives requests for
start and stop silent monitor session. This mode is intended for client applications developed for Agent
desktop functionality. The StartSMMonitoredMode method on the SilentMonitorManager object selects
this mode.
start and stop silent monitor session. This mode is intended for client applications developed for Agent
desktop functionality. The StartSMMonitoredMode method on the SilentMonitorManager object selects
this mode.
Following is a code sample for specifying the mode for the client application:
Dim m_Args As New Arguments
‘Assemble arguments to set the work mode
m_Args.AddItem("HeartbeatInterval", 5)
m_Args.AddItem("HeartbeatTimeout", 15)
'Address or hostname of the silent monitor service
m_Args.AddItem("SMSAddr", "localhost")
'Port on which silent monitor service is listening
m_Args.AddItem("SMSListenPort", 42228)
'QoS setting when sending messages to the silent monitor service
m_Args.AddItem("SMSTOS", 0)
'Milliseconds between heartbeats
m_Args.AddItem("SMSHeartbeats", 5000)
'Number of missed heartbeats before the connection to the
'silent monitor service is considered disconnected
m_Args.AddItem("SMSRetries", 3)
‘Extension number of the IP Phone to monitor
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 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 receives the acceptance or rejection via the
OnSilentMonitorStatusReportEvent. When the session is accepted by the remote client, it immediately
starts forwarding voice to the monitoring client. The monitoring client can terminate the silent
monitoring session only by calling the StopSilentMonitorRequest method. CTI OS server issues the
OnSilentMonitorStopRequestedEvent to the remote client. The monitored client stops sending audio
immediately when OnSilentMonitorStopRequestedEvent is received by its SilentMonitorManager
object.
StartSilentMonitorRequest method. This indicates that the CTI OS server 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 receives the acceptance or rejection via the
OnSilentMonitorStatusReportEvent. When the session is accepted by the remote client, it immediately
starts forwarding voice to the monitoring client. The monitoring client can terminate the silent
monitoring session only by calling the StopSilentMonitorRequest method. CTI OS server issues the
OnSilentMonitorStopRequestedEvent to the remote client. The monitored client stops 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
'Agent to monitor
m_Args.AddItem("AgentID", "23840")
m_Args.AddItem("PeripheralID", "5000")
m_Args.AddItem("HeartbeatInterval", 5)
m_Args.AddItem("HeartbeatTimeout", 15)
'If MonitoringIPPort is not specified, port 39200 will be used by 'default.
m_Args.AddItem("MonitoringIPPort", 39200)