Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function accepts the specified offered call. It can optionally send the specified user-user information to the calling party.

Syntax

LONG TSPIAPI TSPI_lineAccept(
  DRV_REQUESTID 
dwRequestID, 
  HDRVCALL 
hdCall, 
  LPCSTR 
lpsUserUserInfo, 
  DWORD 
dwSize 
);

Parameters

dwRequestID

Identifier of the asynchronous request.

hdCall

Handle to the call to be accepted. The call state of hdCallcan be offering.

lpsUserUserInfo

Pointer to a null-terminated Unicode string containing user-user information to be sent to the remote party as part of the call accept. This pointer is NULL if no user-user information is to be sent. User-user information is only sent if supported by the underlying network. See LINEDEVCAPS.

dwSize

Size, in bytes, of the user-user information in lpsUserUserInfo. If lpsUserUserInfois NULL, dwSizeis ignored.

Return Value

Returns dwRequestIDif the function is completed asynchronously or an error number if an error occurs. The lResultparameter of the corresponding ASYNC_COMPLETIONis zero if the function succeeds or an error number if an error occurs. The following table shows the return values for this function.

Value Description

LINEERR_INVALCALLHANDLE

The handle to the call was invalid.

LINEERR_OPERATIONFAILED

The operation failed.

LINEERR_INVALCALLSTATE

The call state is invalid.

LINEERR_RESOURCEUNAVAIL

The resource is unavailable.

LINEERR_USERUSERINFOTOOBIG

The user user info is too big.

LINEERR_NOMEM

Not enough memory is available.

LINEERR_OPERATIONUNAVAIL

The operation is unavailable.

Remarks

The TSPI_lineAcceptfunction 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 the TSPI_lineDropfunction, redirect the call to another station using the TSPI_lineRedirectfunction, answer the call using the TSPI_lineAnswerfunction, 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 dwAddrCapFlagsmember of the LINEADDRESSCAPSdata structure if the application must call TSPI_lineAcceptfor alerting to begin.

To TAPI, alerting is reported using the LINE_LINEDEVSTATE message with the ringing indication.

TSPI_lineAcceptmay also be supported by non-ISDN service providers. The call state transition to the accepted state can be used by other 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.

Requirements

Header tapicomn.h
Library coredll.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also