Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 500
   
4-32
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions
Cisco CTI OS Release 7.2(1)
Chapter 4      Building Your Application
Logging In and Logging Out an Agent
Step 5
Enter 1 in the Value data field to set the value to true, or 0 to set it to false.
Step 6
Repeat steps 2 through 5 for the value custom_RejectIfAgentLoggedIn.
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
Then, 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