Руководство Разработчика для Cisco Cisco Computer Telephony Integration Option 8.5
4-26
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
Filter String Syntax
The filter String you create to specify events to monitor must adhere to a specific syntax to accurately
instruct the CTI OS Server to send the correct events.
instruct the CTI OS Server to send the correct events.
The general syntax for the filter String is as follows:
“key1=value1, value2, value3;key2=value4, value5, value6”
Note
The filter String may also contain an asterisk (*), which is used as a wildcard to indicate any possible
value. In addition, you can use a prefix to * to narrow the results. For example, using 10* matches
1001, 1002, 10003. However, CTI OS ignores any characters that follow the asterisk. For example,
using 10*1 matches both 1001and 1002.
value. In addition, you can use a prefix to * to narrow the results. For example, using 10* matches
1001, 1002, 10003. However, CTI OS ignores any characters that follow the asterisk. For example,
using 10*1 matches both 1001and 1002.
The filter String must contain at least one key, and there must be at least one value for that key. However,
a key can take multiple values, and the filter String can contain multiple keys.
a key can take multiple values, and the filter String can contain multiple keys.
Multiple values for a single key must be separated by commas (,). Multiple keys must be separated by
semicolons (;).
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.
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 s does the
following:
following: