Cisco Cisco Computer Telephony Integration OS 8.5 Guida Dello Sviluppatore
Chapter 4 Building Your Application
Working with Events
4-62
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1)
Working with Events
Handling Events in Order
A desktop application using the CTI OS API must handle events in the order they
are sent by CTI OS.
are sent by CTI OS.
Warning
Because many events include agent state data and button enablement data
indicating valid agent state transitions, if events are handled out of order
agents may not be presented with valid options.
indicating valid agent state transitions, if events are handled out of order
agents may not be presented with valid options.
Coding Considerations for CIL Event Handling
The CTI OS CIL fires events to the application in a single thread. It is
recommended that the amount of time spent in a particular CIL event handler be
kept to a minimum so as to ensure timely delivery of subsequent CIL events. If a
screenpop based on a call event (such as the OnCallDelivered event or the
OnCallDataUpdate event) takes longer than a few seconds (for example, remote
database lookup), it is recommended to delegate this operation to a separate
thread or separate process so as not to block CTIOS event handling.
recommended that the amount of time spent in a particular CIL event handler be
kept to a minimum so as to ensure timely delivery of subsequent CIL events. If a
screenpop based on a call event (such as the OnCallDelivered event or the
OnCallDataUpdate event) takes longer than a few seconds (for example, remote
database lookup), it is recommended to delegate this operation to a separate
thread or separate process so as not to block CTIOS event handling.
Note
The order of arrival of CIL events is highly dependent upon the ACD that is in use
at the customer site. Therefore CIL event order is not guaranteed. Do not write
your event handling code in a manner that relies on a particular event order.
at the customer site. Therefore CIL event order is not guaranteed. Do not write
your event handling code in a manner that relies on a particular event order.
If an application calls a COM CIL API method from a COM CIL event callback
routine it must ensure that the method call is made on the same thread as the CIL
event callback. This rule applies to the following methods:
routine it must ensure that the method call is made on the same thread as the CIL
event callback. This rule applies to the following methods:
•
CComSession::SetCurrentCall
•
CComSession::SetAgent
This rule must be followed in order to guarantee that events are fired from the
COM CIL to the application in the proper sequence.
COM CIL to the application in the proper sequence.