Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 500
   
5-41
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 7.5(1)
Chapter 5      CTI OS ActiveX Controls
The Silent Monitor StandAlone ActiveX Control
Deployment
The StandAlone Com Object is a COM dll that needs to be registered on the client system via the 
Regsvr32 Silentmonitorctl.dll. In addition, ccnsmt.dll and the two standard CTI OS COM dlls 
(CTIOSClient.dll and Arguments.dll) are also required.
Sample Usage in Visual Basic 6.0
The following sample code assumes a VB 6.0 form with 4 buttons (Connect, Disconnect, 
StartMonitoring and StopMonitoring. If the parameters are based on edit fields, the source code below 
is all that is needed to silent monitor via CTI OS. It is important to note, that this control does not require 
supervisor privileges or even any login. The only event handler shown below (OnSessionDisconnected) 
is the one for a timed out Silent Monitor session. Other event handlers.
Dim WithEvents SilentMonitorCtl As SILENTMONITORCTLLib.SilentMonitor
Dim m_Args As New Arguments
Const CIL_OK = 1
Private Sub btnConnect_Click()
    m_Args.clear
   m_Args.AddItem “CtiosA”, “localhost”
   m_Args.AddItem “portA”, “42028”
    Dim nRetVal As Long
    SilentMonitorCtl.Connect m_Args, nRetVal
    If nRetVal <> CIL_OK Then
       MsgBox "Connect returned error " + Str(nRetVal)
    End If
End Sub
Private Sub btnDisconnect_Click()
    Dim nRetVal As Long
    SilentMonitorCtl.Disconnect
End Sub
Private Sub btnStartMonitoring_Click()
     m_Args.clear
     m_Args.AddItem “AgentId”, “1000”
OnCtiOsFailure
A CtiosFailure event was received. This could 
be Silent Monitor specific error code.
OnCallRTPStartedEvent, 
OnCallRTPStoppedEvent
RTP events have been received signaling the 
start and stop of the RTP streams.
OnSilentMonitorStatusReport 
Event
This event is used to report status from a 
monitored client to the monitoring 
application.
OnStartSilentMonitorConf, 
OnStopSilentMonitorConf
These confs acknowledge that CTI OS 
handled the StartMonitoring and 
StopMonitoring request, respectively.
OnSilentMonitorSession 
Disconnected
Indicates that the Silent Monitor session has 
timed out on the monitoring side.
Table 5-9
SilentMonitor Com Object Events
Event
Description