The Windows Telephony API may be used simultaneously by multiple applications. These applications may be designed to cooperate, or they may be totally independent applications, e.g., from independent vendors. The API defines a mechanism that allows applications to coordinate their telephony and phone activities while maintaining a high degree of flexibility.
The mechanism is based on the concept of ownership of a call. At any given time, one or more applications can be the owner of a call. While an app has ownership of a call, the app is allowed to manipulate the call in ways that affect the state of the call. An app that does not own a call is a monitor for the call and is prevented from doing this. It can only perform status and information query operations on that call.
Ownership of a call is assigned to apps according to the following rules:
An app that makes a call is the initial sole owner of that call.
Ownership of an incoming call will be assigned by the API to one app only - this avoids race conditions where depending on timings, different apps may seize control arbitrarily at different times leading to unpredictable results.
An app that is currently an owner of a call can indirectly pass ownership to another app. While handing off ownership of a call, the original owner app can specify the new media type of the call, together with the privileges to the call it wants to retain. The app may either remain co-owner of the call, become a monitor of the call, or get rid of the call altogether. The media type indirectly selects the target application for the handoff.
If a target application for the handoff is found, and if the target app is already co-owner of the call, then the target will see no effect whatsoever of the handoff; the app initiating the handoff is informed about the success of the handoff, and its privileges to the call are adjusted as requested.
If there is no target app for the selection and the call is active, then an error is returned. No handoff has taken place, and the app is still an owner of the call.
Handing off a call between apps never affects the state of the physical call as perceived by the switch.
An app that does not have (but desires) ownership of a call may request ownership. The app can select calls based on a number of selection criteria, ranging from all calls on a particular line or address (i.e., phone number assigned to the line), to calls related to a specified call (see further). The app can also specify whether it wants to monitor or own the calls.
Any app that asks for ownership will get it; any app that is offered ownership cannot refuse it.
The originally owning apps are informed about the existence of a new owner.
Note that with co-owned calls, no protection is offered to prevent the apps from interfering with each other.
Since media streams are not managed by the Windows Telephony API, call handoff does not handle the handoff of the call's media stream.