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 WINAPI lineAccept(
  HCALL 
hCall,
  LPCSTR 
lpsUserUserInfo,
  DWORD 
dwSize 
);

Parameters

hCall

Handle to the call to be accepted. The application must be an owner of the call. Call state of hCallmust be offering.

lpsUserUserInfo

Pointer to a string containing user-user information to be sent to the remote party as part of the call accept. This pointer can be left NULL if no user-user information is to be sent. User-user information is only sent if supported by the underlying network (see LINEDEVCAPS). The protocol discriminator member for the user-user information, if required, should appear as the first byte of the buffer pointed to by lpsUserUserInfo, and must be accounted for in the dwSizeparameter.

dwSize

Size, in bytes, of the user-user information in lpsUserUserInfo. If lpsUserUserInfois NULL, no user-user information is sent to the calling party and dwSizeis ignored.

Return Value

Returns a positive request identifier if the function is completed asynchronously, or a negative error number if an error occurs. The dwParam2parameter of the corresponding LINE_REPLYmessage is zero if the function succeeds, or it is a negative error number if an error occurs. The following table shows the return values for this function.

Value Description

LINEERR_INVALCALLHANDLE

The call handle is invalid.

LINEERR_RESOURCEUNAVAIL

The resource is unavailable.

LINEERR_INVALCALLSTATE

The call state is invalid.

LINEERR_NOTOWNER

The application is not the owner of the call.

LINEERR_UNINITIALIZED

The parameter is uninitialized.

LINEERR_INVALPOINTER

The pointer is invalid.

LINEERR_OPERATIONFAILED

The operation failed.

LINEERR_OPERATIONUNAVAIL

The operation is unavailable. With code division multiple access (CDMA), this function will fail if a call is currently in progress.

CDMA does not provide the necessary functionality to support the following TAPI functions:

Some cellular carriers provide equivalent functionality through the flash feature, which with TAPI 2.2 can be accessed with the lineGenerateDigitsfunction. Because the exact flash sequences are controlled by the cellular providers, the application must be completely aware of the necessary codes implemented by the cellular providers.

LINEERR_NOMEM

Not enough memory is available.

LINEERR_USERUSERINFOTOOBIG

The user-user information is too big.

Remarks

The lineAcceptfunction is used in telephony environments like Integrated Services Digital Network (ISDN) that allow alerting associated with incoming calls to be separate from the initial offering of the call. When a call comes in, it is first offered. For some small amount of time, the application may have the option to reject the call using the lineDropfunction, redirect the call to another station using the lineRedirectfunction, answer the call using the lineAnswerfunction, or accept the call using lineAccept. After a call has been successfully accepted by an application, alerting begins at both the called and calling device and the call state typically transitions to accepted.

Alerting is reported to the application by the LINE_LINEDEVSTATEmessage with the ringing indication.

The lineAcceptfunction may also be supported by non-ISDN service providers. The call state transition to accepted can be used by other applications as an indication that another application has claimed responsibility for the call and has presented the call to the user.

The application has the option to send user-user information at the time of the accept. Even if user-user information is sent, there is no guarantee that the network will deliver this information to the calling party. An application should consult a line's device capabilities to determine whether call accept is available.

Note:
This function is for TAPI version 2.0 and later.

Requirements

Header tapi.h
Library coredll.lib
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also