Cisco Cisco Computer Telephony Integration Option 8.5 開発者ガイド

ページ / 508
   
4-33
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 8.0(1)
Chapter 4      Building Your Application
Logging In and Logging Out an Agent
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, in order to handle duplicate log 
in attempts correctly, you must request global configuration settings, then extract the custom settings 
from the event. You would 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.
The following example demonstrates steps 1 through 3 in Java:
/* 1. Create Arguments object*/
Arguments rArgs = new Arguments();
/* 2. Set the desktop type.*/
rArgs.SetValue(“CTIOS_DESKTOPTYPE”,    
 CtiOs_Enums.DesktopType.eAgentDesktop);
/* 3. Request desktop settings. This should cause CTI OS to send the 
OnGlobalSettingsDownloadConf event.*/
int returnValue = session.RequestDesktopSettings(rArgs);
Step 4
In the OnGlobalSettingsDownloadConf() event, get the Arguments instance for Login configuration 
from the event Arguments parameter. Use the S_LOGIN key from the CtiOs_IKeywordIDs interface.
Step 5
Get the Arguments instance for the correct switch from the Login Arguments instance. The example 
below uses the “IPCC/SoftACD” login configuration information, the key for which is established by 
the CTI OS Server installation.
Step 6
Get the Integer instances for the custom values you established for the key in the CTI OS Server registry.
Step 7
For convenience, get the int values for those Integers to test with, as described in the section