Cisco Cisco Computer Telephony Integration OS 8.5 Developer's Guide
3-3
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(3)
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 are 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.
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 are 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.
The expected event sequence is described for each method request in the programmer’s interface sections
of this document so that programmers know which events to expect. In the event of a request failure, an
eControlFailureConf message is sent to the client; the eControlFailureConf message has a parameter
called MessageType indicating which request failed, and a parameter called ErrorMessage, with a
description of the failure cause.
of this document so that programmers know which events to expect. In the event of a request failure, an
eControlFailureConf message is sent to the client; the eControlFailureConf message has 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 typically returns CIL_OK, which means that
the method call was successful. If the underlying make call request is successful, the CIL receives
several follow-on events, such as eBeginCallEvent and eServiceInitiatedEvent. If the request fails, the
CIL receives the eControlFailureConf message.
the method call was successful. If the underlying make call request is successful, the CIL receives
several follow-on events, such as eBeginCallEvent and eServiceInitiatedEvent. If the request fails, the
CIL receives the eControlFailureConf message.
A common mistake is that developers who have not previously programmed with asynchronous events
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.
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.
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. We recommend that you use the error code
enumerations to check a given error code, rather than rely on a specific numeric value.
enumerations to check a given error code, rather than rely on a specific numeric value.
Table 3-2
CIL Error Codes
CIL Error Code
Numeri
c Value
c Value
Description
CIL_OK
1
The method succeeded. The request to silent monitor the call
was successfully initiated.
was successfully initiated.
CIL_FAIL
0
The method failed.
E_CTIOS_METHOD_NO
_ IMPLEMENTED
_ IMPLEMENTED
-99
There is no implementation available for this method.
E_CTIOS_INVALID_
PROPERTY
PROPERTY
-100
One or more properties are invalid.
E_CTIOS_MODE_CONF
LICT
LICT
-101
A conflict when setting session mode.
E_CTIOS_INVALID_
EVENTID
EVENTID
-102
The Event ID is not valid.