Cisco Cisco Computer Telephony Integration Option 9.0 开发者指南

下载
页码 490
   
4-33
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(3)
Chapter 4      Building Your Application
Logging In and Logging Out an Agent
How to Prevent Another Agent Log In with Incorrect Credentials
In order to prevent another agent log in with incorrect credentials, use the SendIdentifyClientRequest 
method to identify and detect the log in request.
Set the Method Argument to Nil. To invoke this method, use the session object. 
The following examples demonstrate the method in:
C++: int SendIdentifyClientRequest()
.NET: CilError SendIdentifyClientRequest()
Java: int SendIdentifyClientRequest()
Following is an example of how to use the method: 
if (CIL_OK != SessionObj.SendIdentifyClientRequest())
{
    LOG(CRITICAL, "CCtiOsSession::SetAgent(...), SendIdentifyClientRequest: authentication 
will fail, aborting..");
    ReportError(CIL_FAIL);
    return CIL_FAIL;
}
How to Get Registry Configuration Values to Your Desktop Application
To get CTI OS registry configuration values to your desktop application to handle duplicate log in 
attempts correctly, you must request global configuration settings, then extract the custom settings from 
the event. You typically do this task before attempting to log in an agent, in the OnConnection() event.
Step 1
Create an instance of the Arguments class.
Step 2
In the Arguments instance, set the value for the CTIOS_DESKTOPTYPE key to either:
CtiOs_Enums.DesktopType.eAgentDesktop
CtiOs_Enums.DesktopType.eSupervisorDesktop
Note
Although the Arguments object must have one of these fields as a value for the 
CTIOS_DESKTOPTYPE key, this version of CTI OS does not utilize the desktop type 
parameter when sending global configuration data to a desktop application. Regardless of 
which field you use in defining the Arguments object, CTI OS returns all global 
configuration data with the OnGlobalSettingsDownloadConf() event. The desktop type 
indicators, through currently required, are reserved for future use.
Step 3
Request desktop settings for the session using the RequestDesktopSettings() method. This results in a 
OnGlobalSettingsDownloadConf() event.