Cisco Cisco Computer Telephony Integration Option 8.5 개발자 가이드

다운로드
페이지 640
 
4-47
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.0(0)
 
Chapter 4      Building Your Application
Logging In and Logging Out an Agent
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")