Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide
4-22
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(3)
Chapter 4 Building Your Application
Connecting to the CTI OS Server
Note
The Arguments.setValue() methods return a boolean value to indicate whether the method succeeded
(true) or not (false).
(true) or not (false).
How to Connect the Session to the CTI OS Server
After successfully creating the Session instance, you must connect it to the CTI OS Server using the
Session.Connect() method, using the Arguments instance you constructed when setting connection
parameters, as described in the previous section.
Session.Connect() method, using the Arguments instance you constructed when setting connection
parameters, as described in the previous section.
The following line shows this in
Java:
int returnCode = session.Connect(rArgs);
For more information on the possible values and meanings of the int value returned by the Connect()
method in the Java CIL, see page 4-23.
method in the Java CIL, see page 4-23.
When successful, the Connect() method generates the OnConnection() event. Code within the
OnConnection() event sets the connection mode, as described in the next section.
OnConnection() event sets the connection mode, as described in the next section.
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 was 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.
6.