Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 490
   
4-27
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(3)
Chapter 4      Building Your Application
Connecting to the CTI OS Server
Creates the filter
Checks events to verify that the CTIOS _MONITORED parameter is present and is TRUE
Ignores events if the CTIOS_MONITORED parameter is missing or FALSE
How to Select Monitor Mode
To select Monitor mode for the connection:
Step 1
Specify the filter String. See the previous section for filter details.
Step 2
Create an Arguments instance and add an item with CtiOs_IKeywordIDs.CTIOS_FILTER as the 
keyword and the filter String as the value.
Step 3
Use the CtiOsSession.SetMessageFilterArgs(args) method to select Monitor mode and to set the event 
filter.
Note
Always include the OnCtiOsFailure() event in the message filter so that the application can 
detect when a system component is online or offline.
Caution
A Monitor Mode application that monitors any Call-related events must also monitor the 
OnCallEnd() event, as described on page 4-43.
The following example, which assumes the Session object has been created, demonstrates this task in 
Java:
/* 1. Constructing message filter string /
String filter = "messageid=" + eAgentStateEvent + "," + eAgentInfoEvent + “,” + 
eCTIOSFailureEvent;
/* 2. Create the Arguments object*/
Arguments rArgs = new Arguments();
/* 3. Add the filter to the Arguments instance.*/
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_FILTER, filter);
/* 3. Set the message filter.*/
int returnValue = session.SetMessageFilter(rArgs);
When successful, the SetMessageFilter() method generates the following events:
With Unified CC only, OnQueryAgentStateConf() for each team and each agent logged in
OnSnapshotDeviceConf() for each device
OnSnapshotCallConf
()
OnMonitorModeEstablished()
How to Deal with Failover In Monitor Mode
The CTI OS CIL does not support failover for Monitor Mode. Agents in Monitor Mode cannot recover 
their state after a failover. Furthermore, after a failover, the CTI OS CIL may leak Call objects.