Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 668
 
Chapter 8      Session Object
Notes On Message Filters
8-42
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1) 
Notes On Message Filters
A message filter is a condition that an event must meet in order to be sent to the 
client. It consists of a keyword/value pair, as explained in the following sections.
Message Filter Syntax
The CTI OS Server’s event filter mechanism enables the rapid creation of 
powerful CTI integration applications. The event filter allows the developer to 
create a custom event notification stream using a simple filter expression. The 
filter expression is sent from the Client Interface Library (CIL) to the CTI OS 
server to request an event stream. The CTI OS server’s event filter parses the filter 
expression
, and registers the CIL client for all events that match any of the filter’s 
conditions.
To set a filter expression, the Session object’s SetMessageFilter() method is used:
‘put filter expression in here
Dim sFilterExpression As String 
‘call SetMessageFilter
m_session.SetMesageFilter sFilterExpression
The general form for a filter expression is key=value. 
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 the same filter expression which is implicitly 
created when a CIL client connects to CTI OS in Agent Mode.