Event-Driven Environment

Like all Win32 applications, Win32 Telephony applications operate in the event-driven model. In telephony, the most important events are call-state transitions. The service provider and TAPI dynamic-link library report call states to applications for particular calls. Interested applications, which know the previous state of the call, could infer call-state transitions from call states.

All running applications receive information—call-state messages—about all the calls in which they are interested. At times, several applications will have interest in the same call or calls, as monitors or owners of those calls. Incoming call-state events often cause applications to take actions on calls, and because those actions sometimes involve a shared call, one application must react to the knowledge that another has taken a certain step. Examples include the case where one application shows interest in owning (having control of) a call currently owned by your application, or drops a call co-owned by your application.

The telephony system was designed to minimize race situations—in which the timing of competing function calls from different applications makes a difference.