Cisco Cisco Computer Telephony Integration OS 8.5 Developer's Guide

Page of 640
 
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.0(0)
Private Sub tmrScreening_Timer()
‘After listening the conversation for 30 sec, drop monitoring session
‘Assemble arguments for stop  request
‘Agent to monitor
m_Args.AddItem "SMSessionKey", m_nSMSessionKey
‘Request silent monitor session to stop
m_SMManager.StopSilentMonitorRequest(m_Args, m_nSMSessionKey)
End Sub
Monitored Client Code Sample
Private Sub m_session_OnSilentMonitorStartRequestedEvent(By Val 
pIArguments As CTIOSCLIENTLib.IArguments)
     Dim strRequestInfo As String
    
     strRequestInfo =  pIArguments.DumpArgs
MsgBox “Request to Start Silent Monitor Received”,, strRequestInfo
End Sub
Private Sub m_session_OnSilentMonitorStopRequestedEvent(By Val 
pIArguments As CTIOSCLIENTLib.IArguments, bDoDefaultProcessing)
     Dim strRequestInfo As String
    
     strRequestInfo =  pIArguments.DumpArgs
MsgBox “Request to Stop Silent Monitor Received”,, strRequestInfo
End Sub
Shutting Down Silent Monitor Manager
Shutting down the Silent monitor object requires that the monitoring client call 
the StopSilentMonitorMode method when it is done monitoring an agent, and that 
the monitored client call the StopSilentMonitorMode method during cleanup. 
Each client must then remove the silent monitor manager from the Session object 
by calling SetMonitorCurrentSilentMonitor with a NULL pointer. Finally each 
client must destroy the silent monitor object using Session’s 
DestroySilentMonitorManager method. 
Following is a code sample for initiating and ending a silent monitor session: