Async Replies versus Events on New Call Handles

TSPI includes a number of operations that start the lifetime of a call handle. If the service provider returns SUCCESS for such an operation, it must fill in the opaque handle of type HDRVCALL, which it uses for the new call before it returns. The tapi32.dll never performs operations on the call before the matching ASYNC_COMPLETION has been received. If the service provider returns FAILURE, the handle automatically becomes invalid (that is, without TSPI_lineCloseCall). In effect, tapi32.dll treats the handle as "not yet valid" until the asynchronous completion.

The service provider must also treat the handle as "not yet valid" until after the matching ASYNC_COMPLETION is received. In other words, it must not issue any LINEEVENT functions for the new call or include it in call counts in messages or status data structures for the line.

The TAPI level also conforms to these life cycle restrictions; a new call handle is not returned or valid until the matching LINE_REPLY message, and no events for the new call are delivered to the application until after the LINE_REPLY message.

The TSPI operations to which this "start lifetime" principle applies are the following:

TSPI_lineCompleteTransfer
TSPI_lineForward
TSPI_lineMakeCall
TSPI_linePickup
TSPI_linePrepareAddToConference
TSPI_lineSetupConference
TSPI_lineSetupTransfer
TSPI_lineUnpark