Cisco Cisco Computer Telephony Integration OS 8.5 Developer's Guide

Page of 546
 
Chapter 3      CIL Coding Conventions
Obtaining Objects from UniqueObjectIDs
3-16
Cisco ICM Software CTI OS Developer’s Guide Release 6.0(0)
The CTI OS server enables certain types of monitor mode applications that track 
the pre-call notification event (eTranslationRouteEvent or eAgentPrecallEvent) 
and seek to match the call data with the arrival of an eCallBeginEvent. 
To do so, the application will receive the pre-call notification (for calls routed by 
ICM (either pre-route, post-route, or translation route), and create a record 
(object) using the ICMEnterpriseUniqueID field as the unique key. Later, when 
the call arrives at the ACD, and is queued or targeted (by the ACD) for a specific 
agent, the application can match the saved record (object) with the incoming call 
by the ICMEnterpriseUniqueID field. The following events will contain the 
ICMEnterpriseUniqueID that can be used to associate a call with the saved call 
information:
eCallBeginEvent 
eCallDataUpdateEvent
eSnapshotCallConf
eCallEndEvent
Obtaining Objects from UniqueObjectIDs
Client applications written to take advantage of the CIL can use the 
UniqueObjectID to obtain a pointer (in C++ or COM for C++) or a reference (in 
Visual Basic or Java) to the underlying object.
The CIL Session object provides access to the object collections via several 
methods, including GetObjectFromObjectID. GetObjectFromObjectID takes as a 
parameter the string UniqueObjectID of the desired object, and returns a pointer 
to the object. Since this mechanism is generic, and does not contain specific 
information about the object type retrieved, the pointer (or reference) returned is 
a pointer or reference to the base class: a CCtiosObject* in C++, an Object in 
Visual Basic, or an IDispatch* in COM for C++. 
Note
The GetObjectFromObjectID method will perform an AddRef() on the pointer 
before it is returned to the programmer. 
C++ example:
string sUniqueObjectID = “call.5000.101.23901”;
Ccall * pCall = NULL;