Cisco Cisco Computer Telephony Integration Option 8.5 Entwickleranleitung

Seite von 546
 
4-45
Cisco ICM Software CTI OS Developer’s Guide Release 6.0(0)
 
Chapter 4      Building Your Application
Working with Calls
Note
IPCC requires a reason code to log out. Other switches may have 
different requirements.
Step 3
Log out the agent.
The following example demonstrates this task in Java:
/* 1. Create Arguments object*/
Arguments rArgs = new Arguments();
/* 2. Set log out values.*/
rArgs.SetValue(CTIOS_EVENTREASONCODE, 1);
/* 3. Log out the agent.*/
int returnValue = agent.Logout(rArgs);
Working with Calls
Handling Multiple Calls
It is critical that you design an Agent Mode desktop application to be able to store 
all the calls on the specific device, in order to do the following:
Apply incoming events to the correct call
Select the correct call on which to make method calls (i.e. telephony requests)
It is not necessary to maintain a set of Call Objects in order to do this. Instead, the 
application could store the string UniqueObjectID of each call (keyword 
CTIOS_UNIQUEOBJECTID). CTIOS_UNIQUEOBJECTID is always included 
in the args parameter for each call event. The actual Call Object can be obtained 
with the Session object's GetObjectFromObjectID() method in order to make a 
method call.