Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 500
   
3-3
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 7.5(1)
Chapter 3      CIL Coding Conventions
CIL Error Codes
To determine the success or failure of the underlying telephony operation requested, the CTI 
programmer must wait for an event confirming the success or failure of the request. To generalize the 
message flow model, most requests made at the CTI OS CIL will be answered with a confirmation 
message and/or an event message. See the object interface reference in Chapters 8-12 for details on each 
particular request. This type of response is called asynchronous – it can arrive at any time after the 
request is made, but typically requests are services in sub-second timeframes. 
For each method request in the programmer’s interface sections of this document, the expected event 
sequence is described, so that programmers know which events to expect. In the event of a request 
failure, an eControlFailureConf message will be send to the client; the eControlFailureConf message 
will have a parameter called MessageType indicating which request failed, and a parameter called 
ErrorMessage, with a description of the failure cause. 
For example: when sending a MakeCall request, the method will typically return CIL_OK, which means 
that the method call was successful. If the underlying make call request is successful, the CIL will 
receive several follow-on events, such as eBeginCallEvent and eServiceInitiatedEvent. If the request 
fails, the CIL will receive the eControlFailureConf message.
A common mistake: developers who have not previously programmed with asynchronous events might 
mistake the error code returned from a method call for the actual result of the request. The correct 
semantics are to interpret the error code as being indicative of the result of the method call, and to 
interpret the follow-on events to determine the actual result of the requested operation. 
CIL Error Codes
Whenever a method call is invoked by a custom application using the CIL, an error code is returned. The 
error codes returned only indicate success or failure of the method call, as indicated in the previous 
section. 
The possible values of the error code returned from C++ and Java CIL methods are defined in 
.
Note
The numeric values listed in Table 3-2 are subject to change. It is recommended that you use the error 
code enumerations to check a given error code, rather than rely on a specific numeric value.
Table 3-2
CIL Error Codes
CIL Error Code
Numeric 
Value
Description
CIL_OK      
1
The method succeeded. The request to silent monitor the call was 
successfully initiated.
CIL_FAIL    
0
The method failed.
E_CTIOS_METHOD_NO_ 
IMPLEMENTED   
-99
There is no implementation available for this method.
E_CTIOS_INVALID_ 
PROPERTY
-100
One or more properties are invalid.
E_CTIOS_MODE_CONFLICT
-101
A conflict when setting session mode.
E_CTIOS_INVALID_ EVENTID
-102
The Event ID is not valid.
E_CTIOS_INVALID_ 
ARGUMENT
-103
The Argument is not valid.