Platform SDK: TAPI |
The TSPI_lineAccept function accepts the specified offered call. It can optionally send the specified user-user information to the calling party.
LONG TSPIAPI TSPI_lineAccept( DRV_REQUESTID dwRequestID, HDRVCALL hdCall, LPCSTR lpsUserUserInfo, DWORD dwSize );
Returns dwRequestID if the function is completed asynchronously or an error number if an error occurs. The lResult parameter of the corresponding ASYNC_COMPLETION is zero if the function succeeds or an error number if an error occurs. Possible return values are as follows:
LINEERR_INVALCALLHANDLE, LINEERR_OPERATIONFAILED, LINEERR_INVALCALLSTATE, LINEERR_RESOURCEUNAVAIL, LINEERR_NOMEM, LINEERR_USERUSERINFOTOOBIG, LINEERR_OPERATIONUNAVAIL.
The TSPI_lineAccept function is used in telephony environments (such as ISDN) that allow alerting associated with incoming calls to be separate from the initial offering of the call. When a call comes in, the call is first offered. For some small time duration, the client application may have the option to reject the call using TSPI_lineDrop, redirect the call to another station using TSPI_lineRedirect, answer the call using TSPI_lineAnswer, or accept the call using TSPI_lineAccept. After a call has been successfully accepted, alerting at both the called and calling device begins, and typically the call state transitions to the accepted state. The service provider must set the flag LINEADDRCAPFLAGS_ACCEPTTOALERT in the dwAddrCapFlags member of the LINEADDRESSCAPS data structure if the application must call TSPI_lineAccept for alerting to begin.
To TAPI, alerting is reported using the LINE_LINEDEVSTATE message with the ringing indication.
TSPI_lineAccept may also be supported by non-ISDN service providers. The call state transition to the accepted state can be used by other of the TAPI clients as an indication that some application has claimed responsibility for the call and has presented the call to the user.
The client application has the option to send user-user information at the time of the accept. Even if user-user information can be sent, often no guarantees are made that the network will deliver this information to the calling party. The client application may consult a line's device capabilities to determine whether call accept is available.
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 95 or later.
Version: Requires TAPI 1.3 or later.
Header: Declared in Tspi.h.
ASYNC_COMPLETION, LINE_CALLSTATE, LINE_LINEDEVSTATE, LINEADDRESSCAPS, LINEDEVCAPS, TSPI_lineAnswer, TSPI_lineDrop, TSPI_lineOpen, TSPI_lineRedirect