Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 500
   
4-26
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 7.5(1)
Chapter 4      Building Your Application
Connecting to the CTI OS Server
The filter String must contain at least one key, and there must be at least one value for that key. However, 
a key may take multiple values, and the filter String may contain multiple keys.
Multiple values for a single key must be separated by commas (,). Multiple keys must be separated by 
semicolons (;).
Note
Multiple keys in a single filter combine using a logical AND. That is, the filter is instructing CTI OS 
to send to this connection only events that meet all the criteria included in the filter.
For example, a filter String could be as follows:
S_MESSAGEID + "=" + CtiOs_Enums.EventID.eAgentStateEvent + ";" + S_AGENTID + "=5128";
This example works as follows:
The first key-value pair, 
S_MESSAGEID + "=" + CtiOs_Enums.EventID.eAgentStateEvent
, serves to 
request events with a message ID equal to eAgentStateEvent; that is, it requests agent state events.
The second key-value pair, 
S_AGENTID + "=5128"
, specifies that the request is for the agent with the 
ID 5128.
The result of the filter then is that the connection will receive agent state events for agent 5128.
Filter Keys
Filter keys can be any known key value used by CTI OS. These keys have corresponding fields in the 
CtiOs_IKeywords interface. 
Note
When constructing the filter String, use the fields that begin with “S_”, as these are the String values 
for the key.
For example, in 
Java:
String sFilter = S_AGENTID + "=5128,5129,5130";
In this example, S_AGENTID is the String representation of the key indicating an Agent ID.
Filtering for Events for Monitored Calls or Monitored Agents
If a client filter mode application wants to filter for events for monitored calls, the application should do 
the following:
Create the filter
Check events to verify that the CTIOS _MONITORED parameter is present and is TRUE
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.