Cisco Cisco Computer Telephony Integration OS 8.5 Developer's Guide

Page of 490
   
4-42
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(3)
Chapter 4      Building Your Application
Making Requests
Making Requests
Telephony requests are made through either an Agent object or a Call object by calling the appropriate 
API methods listed in Chapters 9 and 10. It is important to ensure that a user cannot make multiple 
duplicate requests before the first request has a chance to be sent to the switch and the appropriate events 
sent back to the application, because this results in either multiple failures or unexpected results.
Preventing Multiple Duplicate Requests
Since it is important for a custom application to prevent a user from making a number of duplicate 
requests, the user should not be able to click the same button multiple times. It is recommended that a 
custom application disable a clicked button until it is all right for the user to click it again. 
Some examples of when Sample softphones re-enable a button that was clicked and disabled are listed 
below:
re-enable Connect/LoginBtn when:
LoginDlg canceled
ControlFailure or CTIOSFailure when login is in progress
In ProcessOnConnectionClosed()
re-enable Logout/DisconnectBtn when:
Logout ReasonCodes are required & Dlg pops up, but user clicks Cancel
re-enable NotReadyBtn when:
NotReady ReasonCodes are required & Dlg pops up, but user clicks Cancel
re-enable DialBtn, TransferBtn or ConferenceBtn when:
DialPad was closed with Cancel rather than Dial, depending on which was originally clicked
re-enable TransferBtn & ConferenceBtn when
received ControlFailure with MessageType parameter set to eConsultationCallRequest
re-enable EmergencyBtn when
received ControlFailure with MessageType parameter set to eEmergencyCallRequest
re-enable SupervisorAssistBtn when
received ControlFailure with MessageType parameter set to eSupervisorAssistRequest
re-enable any AgentStateBtn when
received ControlFailure with MessageType parameter set to eSetAgentStateRequest & 
lastAgentStateBtnClicked was the appropriate one
re-enable any of the buttons when
received OnButtonEnablementMaskChange indicating the button should be enabled.