Cisco Cisco Computer Telephony Integration OS 8.5 Guide Du Développeur
4-39
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1)
Chapter 4 Building Your Application
Connecting to the CTI OS Server
•
Ignore 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.
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.
mode and to set the event filter.
Note
You should always include the OnCtiOsFailure() event in the message
filter, so that the application can detect when a system component is
comes on- or offline.
filter, so that the application can detect when a system component is
comes on- or offline.
Caution
A Monitor Mode application that monitors any Call-related events must also
monitor the OnCallEnd() event, as described on page 4-63.
monitor the OnCallEnd() event, as described on page 4-63.
The following example, which assumes the Session object has been created,
demonstrates this task in Java:
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: