Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 500
   
4-23
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 7.5(1)
Chapter 4      Building Your Application
Connecting to the CTI OS Server
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.
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.
E_CTIOS_SESSION_NOT_DISCONNECTED - The Session is not disconnected (i.e. a previous 
Connect() method is in progress, or the Session is already connected). The application must call the 
Disconnect() method before attempting to establish another connection. The CIL may fire an 
OnConnection() event for the to previous call to the Connect() method if the connection was in 
progress, but will not fire one corresponding to this method call. 
E_CTIOS_UNEXPECTED - There was an unanticipated error. The connection failed. No events 
are fired. 
Note
Once the application receives a Connect return code of CIL_OK, it should not call Connect again on that 
session until it receives an OnConnectionClosed event after a call to Disconnect.
Configuring the Agent to Automatically Log In after Failover
If you are using CTI OS in an Unified Contact Center Enterprise (Unified CCE) environment, you can 
configure the agent to automatically log in again in the event of a failover.
To configure the agent to log back in automatically, add the CTIOS_AUTOLOGIN keyword with the 
value “1” to the Arguments instance used to configure the agent:
rArgs.SetValue(CtiOs_IKeywordIDs.CTIOS_AUTOLOGIN, “1”);
For more information on logging in an agent, see page 4-30.
Stopping the Failover Procedure
To stop the failover procedure, call the Disconnect(args) method, with the Arguments instance 
containing the CTIOS_FORCEDDISCONNECT keyword as a parameter.
How to Set the Connection Mode
After the session is created, you must specify the connection mode for the session. You must use one of 
two modes:
Agent mode
Monitor mode
Setting the Connection Mode in the OnConnection() Event Handler
To ensure that you only try to set the connection mode on valid connections, you should place the code 
to set the connection mode within the OnConnection() event handler. The OnConnection() event is 
generated by a successful Connect() method.