Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 506
   
4-42
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(1)
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 not be able to make multiple 
duplicate requests before the first request has a chance to be sent down to the switch and the appropriate 
events be sent back to the application, since this will result 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, it should not allow the user to click the same button many times. In order to do this, it is 
recommended that a custom application disable a clicked button until such time as it should be 
re-enabled, indicating that it would be all right for the user to click it again. 
Some examples of when Sample softphones re-enable a button that has been 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.