Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 500
   
8-30
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 7.5(1)
Chapter 8      Session Object
Notes On Message Filters
errorcode
An output parameter (return parameter in VB) that contains an error code from 
 in 
Return Values
Default CTI OS return values. See 
Chapter 3, “CIL Coding Conventions.”
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 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, …] …]