Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide
4-23
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(1)
Chapter 4 Building Your Application
Connecting to the CTI OS Server
•
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.
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.
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.
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 relogin in the event of a failover.
configure the agent to automatically relogin 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:
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.
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:
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.
to set the connection mode within the OnConnection() event handler. The OnConnection() event is
generated by a successful Connect() method.
Caution
The application should contain logic within the OnConnection() event handler to ensure it attempts
to set the connection mode only during the initial connection, and not in an OnConnection() event
due to failover.
to set the connection mode only during the initial connection, and not in an OnConnection() event
due to failover.