Cisco Cisco Computer Telephony Integration Option 9.0 Guida Dello Sviluppatore

Pagina di 500
   
4-33
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 7.5(1)
Chapter 4      Building Your Application
Logging In and Logging Out an Agent
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 
The following example demonstrates steps 4 through 7 in Java:
void OnGlobalSettingsDownloadConf(Arguments rArgs) {
 /* 4. Get the Arguments instance for the Login configuration 
 information from the event Arguments parameter.*/
 Arguments logInArgs = rArgs.getValueArray(CTIOS_LOGIN);
/* 5. Get the Arguments instance for the Connection Profile
from the Login Arguments instance. */
Arguments connectionProfilesArgs = logInArgs.GetValueArray(CTIOS_CONNECTIONPROFILES);
/* 6. Get the Arguments instance for the specific switch from the Connection
Profiles instance */
Arguments IPCCLogInArgs = connectionProfilesArgs.GetValueArray("IPCC/SoftACD")