Compartilhar via


Session Access

TAPI session or call controls are those operations needed to initiate, maintain, and terminate a communications session. For basic overview information on TAPI-supported operations, please see the Session Control Overview.

To locate the appropriate TSPI function corresponding to an operation referenced there, add the prefix "TSPI_" to the TAPI 2.2 function. For example, to request that a session be parked, a TAPI 2.2 application calls linePark. TAPI will then invoke the TSP's implementation of TSPI_linePark.

When a telephony service provider informs TAPI of a new incoming call in the LINE_NEWCALL callback message, TAPI should return its handle for the call. LINE_NEWCALL can fail due to finite-resource limitations. TAPI may run out of resources to handle a new call under very high traffic conditions. In such a case, TAPI returns NULL instead of a valid call handle, indicating that the newly offered call handle was not successfully received. The service provider can respond by dropping the call or by retrying the LINE_NEWCALL after a scheduling delay. In any case, the service provider must check for this NULL return and must never attempt to pass subsequent messages using the invalid call handle.

The telephony service provider is responsible for reporting on a variety of session information. Depending on the telephony environment, not all information about a call may be available at the time the call is initially offered. For example, if caller identifier is provided by the network between the first and second ring, the caller identifier is still unknown when the call is first offered. When it becomes known shortly thereafter, a LINE_CALLINFO callback message notifies TAPI about the change in party-identifier information of the call.