Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 506
   
4-54
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(1)
Chapter 4      Building Your Application
Enabling Silent Monitor in Your Application
Creating a Silent Monitor Object
The first step towards setting up a silent monitor session is creating a SilentMonitorManager using the 
Session object CreateSilentMonitorManager method. Then, set the new manager object to be the current 
silent monitor manager using the Session object SetCurrentSilentMonitor method.
The following VB 6.0 code sample demonstrates how to create a SilentMonitorManager object with 
COM CIL and make it the current manager in the Session object:
Dim errorcode As Long
Dim m_nSMSessionKey As Integer
Dim m_SMManager As CTIOSCLIENTLib.SilentMonitorManager
Dim m_Args As New Arguments
‘Create the silent monitor manager
Set m_SMManager = m_session.CreateSilentMonitorManager(m_Args)
'Make the object the current manager 
errorcode = m_Session.SetCurrentSilentMonitor(m_SMManager)
Setting the Session Mode
After you set this new object as the current object, set the manager’s work mode to Monitoring for the 
monitoring client and Monitored for the monitored client. The following sections provide code 
examples. See also 
for syntax of the 
StartSMMonitoringMode and SMMonitoredMode methods.
Monitoring Mode
In this mode, the client receives audio confirmation and session status events for a specific silent monitor 
session. This mode is intended for use by client applications developed for Supervisor desktop 
functionality. The StartSMMonitoringMode 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)
‘Port number where audio will be listened for
m_Args.AddItem("MediaTerminationPort", 4000)
‘Set the working mode to monitoring
m_SMManager.StartSMMonitoringMode(args)