Cisco Cisco Computer Telephony Integration Option 9.0 Guía Del Desarrollador

Descargar
Página de 640
 
4-79
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.0(0)
 
Chapter 4      Building Your Application
Enabling Silent Monitor in your Application
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
         nMode pIArguments.GetValueInt(“StatusCode)
If nMode = eSMStatusMonitorStarted Then strAgent =  
pIArguments.GetValueString(“MonitoredUniqueObjectID”)
            MsgBox “Silent Monitor Status”,, 
“Started Monitoring Agent: ” & strAgent
         Else
            MsgBox “Silent Monitor Status”,, 
“Request Failed with code = ” & nMode            
         End If
End Sub