Cisco Cisco Computer Telephony Integration OS 8.5 Developer's Guide
4-26
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(1)
Chapter 4 Building Your Application
Connecting to the CTI OS Server
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.
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.
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 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:
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.
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.
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.
filter.