Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 546
 
4-47
Cisco ICM Software CTI OS Developer’s Guide Release 6.0(0)
 
Chapter 4      Building Your Application
Working with Calls
How to Set the Current Call for the Session
To set the current call you use the SetCurrentCall() method for the Session. The 
following code fragment, which assumes you retrieved the Call object as 
described in the previous section, shows how to set the current call.
The following line shows this in Java:
m_Session.SetCurrentCall(ThisCall);
When Does the Application Receive the 
OnButtonEnablementChange() Event?
An application receives an OnButtonEnablementChange() event in the following 
situations:
When the Current Call is changed.
When the call which is the Current Call receives an event which includes a 
CTIOS_ENABLEMENTMASK argument. Usually the included enablement 
mask is changed from what it was set to, but occasionally it is the same. This 
mask is used to indicate which functions are allowed for this Call in its 
current state. 
For example, when a Call receives an OnCallDelivered() event with a 
Connection State of LCS_ALERTING, its enablement mask is changed to set 
the Answer bit. When this Call is answered, and it receives the 
OnCallEstablished() event, the mask no longer sets the Answer bit, but 
instead enables the Hold, Release, TransferInit and ConferenceInit bits.
What to do in the OnButtonEnablementChange() Event
To see if a button should be enabled, simply do a bitwise "AND" with the 
appropriate value listed in the Table included under the 
OnButtonEnablementChange event in Chapter 6.