次の方法で共有


TSPI_lineAnswer (Windows Embedded CE 6.0)

1/6/2010

This function answers the specified offering call.

Syntax

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

Parameters

  • dwRequestID
    Identifier of the asynchronous request.
  • hdCall
    Service provider's handle to the call to be answered. The call state of hdCall can be offering or accepted.
  • lpsUserUserInfo
    Pointer to a null-terminated string containing user-user information to be sent to the remote party at the time of answering the call. If this pointer is NULL, it indicates that no user-user information is to be sent. User-user information is only sent if supported by the underlying network (as indicated in LINEDEVCAPS).
  • dwSize
    Size, in bytes, of the user-user information in lpsUserUserInfo. If lpsUserUserInfo is NULL, dwSize is ignored.

Return Value

Returns dwRequestID or an error number if an error occurs. The lResult actual parameter of the corresponding ASYNC_COMPLETION is 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 is invalid.

LINEERR_OPERATIONUNAVAIL

The operation is unavailable.

LINEERR_INVALCALLSTATE

The call state is invalid.

LINEERR_OPERATIONFAILED

The operation failed.

LINEERR_INUSE

The line is in use.

LINEERR_RESOURCEUNAVAIL

The resources are unavailable.

LINEERR_NOMEM

Not enough memory is available.

LINEERR_USERUSERINFOTOOBIG

The user user info is too big.

Remarks

When a new call arrives, the service provider sends TAPI a LINE_NEWCALL message to exchange handles for the call. The service provider follows this with a LINE_CALLSTATE message to inform TAPI and its client applications of the call's state. A client application typically answers the call using TSPI_lineAnswer. Typically, after the call is successfully answered, the call transitions to the connected state.

In some telephony environments (like ISDN) where user alerting is separate from call offering, TAPI and its client applications may have the option to first accept a call prior to answering, or instead to reject or redirect the offering call.

If a call is offered at the time another call is already active, the new call is connected to by invoking TSPI_lineAnswer. The effect this has on the existing active call depends on the line's device capabilities. The first call may be unaffected, it may automatically be dropped, or it may automatically be placed on hold. The appropriate LINE_CALLSTATE messages are used to report state transitions to TAPI about both calls.

Requirements

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

See Also

Reference

TSPI Line Device Functions