Cisco Cisco Computer Telephony Integration OS 8.5 Guide Du Développeur
4-22
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 8.0(1)
Chapter 4 Building Your Application
Connecting to the CTI OS Server
Dealing with Connection Failures
This section contains the following information:
•
•
•
•
Also see
Connection Failure Events
If the Connect() method does not succeed, one of the following events is generated:
•
OnConnectionRejected() event indicates that an unsupported version mismatch has been found.
•
OnCTIOSFailure() indicates that the CTI OS Server requested in the Connect() method is down. If
an OnConnectionFailure() event is generated, the application is in Failover and the CIL continues
to attempt to connect until the connection succeeds or until the application calls Disconnect(). The
Arguments parameter for the event includes the following keywords:
an OnConnectionFailure() event is generated, the application is in Failover and the CIL continues
to attempt to connect until the connection succeeds or until the application calls Disconnect(). The
Arguments parameter for the event includes the following keywords:
–
FailureCode
–
SystemEventID
–
SystemEventArg1
–
ErrorMessage
For more information on the contents of the OnConnectionFailure() event, see the description in
Chapter 6.
Chapter 6.
Connection Attempt Error Codes in Java and .NET CIL
The following field values may be returned by the Connect() method. See the documentation for the
CtiOs_Enums.CilError interface in the CIL JavaDoc for information on these fields.
CtiOs_Enums.CilError interface in the CIL JavaDoc for information on these fields.
•
CIL_OK - The connection process has successfully begun. The CIL will either fire the
OnConnection() event to indicate that the CIL successfully connected or will fire the
OnConnectionFailure() event and go into failover mode. If the latter occurs, the CIL will continue
to attempt to connect, alternating between hosts CTIOS_CTIOSA and CTIOS_CTIOSB, until the
connection succeeds, at which point the CIL will fire the OnConnection() event.
OnConnection() event to indicate that the CIL successfully connected or will fire the
OnConnectionFailure() event and go into failover mode. If the latter occurs, the CIL will continue
to attempt to connect, alternating between hosts CTIOS_CTIOSA and CTIOS_CTIOSB, until the
connection succeeds, at which point the CIL will fire the OnConnection() event.
•
E_CTIOS_INVALID_ARGUMENT - A null Arguments parameter was passed to the Connect()
method. The connection failed. No events are fired.
method. The connection failed. No events are fired.
•
E_CTIOS_MISSING_ARGUMENT - The Arguments parameter did not contain values for both
CTIOS_CTIOSA and CTIOS_CTIOSB. At least one of these values must be provided. The
connection failed. No events are fired.
CTIOS_CTIOSA and CTIOS_CTIOSB. At least one of these values must be provided. The
connection failed. No events are fired.
•
E_CTIOS_IN_FAILOVER - A previous connection attempt failed and the CIL is currently in
failover and attempting to establish a connection. This continues until a connection is established,
at which point the CIL will fire an OnConnection() event indicating that the previous Connect()
method has succeeded. To attempt to connect again with different parameters, the application must
first use the Disconnect() method.
failover and attempting to establish a connection. This continues until a connection is established,
at which point the CIL will fire an OnConnection() event indicating that the previous Connect()
method has succeeded. To attempt to connect again with different parameters, the application must
first use the Disconnect() method.