Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 508
   
8-30
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 8.0(1)
Chapter 8      Session Object
Notes On Message Filters
A Simple Example
The most basic event filter is for all events for a specific agent. CTI OS uniquely identifies an agent 
object by it’s UniqueObjectID (refer to CIL architecture chapter for explanation of the UniqueObjectID). 
To establish an event stream for a unique agent, the following syntax would be used:
sFilterExpression = “UniqueObjectID=agent.5000.22866”
In this example, the key is the UniqueObjectID, and the value is agent.5000.22866. This is not the same 
filter expression created when a CIL client connects to CTI OS in Agent Mode. When a CIL client 
connects to CTI OS in agent mode, the filter includes events for the agent as well as call events for the 
agent's extension.
General Form of Filter Syntax 
The event filter syntax can be expressed in the following general form:
key1=value1 [,value2, …] [; key2=valueA [,valueB, …] …]
In this form, the filter expression must start with a key name (key). Following the key must be an equal 
sign (=), and at least one value (value1) must be specified. Optionally, additional values (e.g. 
value2, …
) for the same key might be specified (optional parts of the expression are indicated with 
square brackets []). This will be interpreted as a logical OR among all of the values specified for that 
key, e.g. if any of those values is found, the condition will be satisfied.
For example, a filter expression with one key and multiple values might look like the following:
sFilterExpression = “AgentID=22866, 22867, 22868”
The interpretation of this filter is to match on any event with AgentID of 22866, 22867, or 22868. 
Combining Filters 
Multiple filters expressions (as described above) can be combined to create more complex expressions. 
The general form allows for any number of filters to be concatenated using the semicolon (;), which 
produces a logical AND effect. 
For example, a filter expression with multiple keys, each with multiple values might look like the 
following:
sFilterExpression = 
“AgentID=22866, 22867, 22868; SkillGroupNumber=20, 21”
The interpretation of this filter is to match on any event with AgentID of 22866, 22867, or 22868 and 
with SkillGroupNumber of 20 or 21.