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 completes the transfer of the specified call to the party connected in the consultation call.

Syntax

LONG WINAPI lineCompleteTransfer(
  HCALL 
hCall,
  HCALL 
hConsultCall,
  LPHCALL 
lphConfCall,
  DWORD 
dwTransferMode 
);

Parameters

hCall

Handle to the call to be transferred. The application must be an owner of this call. The call state of hCallmust be onHold or onHoldPendingTransfer.

hConsultCall

Handle to the call that represents a connection with the destination of the transfer. The application must be an owner of this call. The call state of hConsultCallmust be connected, ringback, busy, or proceeding.

lphConfCall

Pointer to a memory location where an hCallhandle can be returned. If dwTransferModeis LINETRANSFERMODE_CONFERENCE, the newly created conference call is returned in lphConfCalland the application becomes the sole owner of the conference call. Otherwise, this parameter is ignored by TAPI.

dwTransferMode

Specifies how the initiated transfer request is to be resolved. This parameter uses one of the LINETRANSFERMODEconstants.

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 handle to the call to be transferred is invalid.

LINEERR_NOTOWNER

The application is not the owner of this call.

LINEERR_INVALCALLSTATE

The call state of hCallis not onHold or onHoldPendingTransfer.

LINEERR_INVALCONSULTCALLHANDLE

The handle to the call that represents a connection with the destination of the transfer.

LINEERR_OPERATIONFAILED

The operation failed.

LINEERR_OPERATIONUNAVAIL

The operation is unavailable because this function is not supported by code division multiple access (CDMA).

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_INVALTRANSFERMODE

The transfer mode is invalid.

LINEERR_RESOURCEUNAVAIL

The resources are unavailable.

LINEERR_INVALPOINTER

The pointer is invalid.

LINEERR_UNINITIALIZED

A parameter is uninitialized.

LINEERR_NOMEM

Not enough memory is available.

Remarks

The LINE_REPLY message sent in response to a call to the lineCompleteTransferfunction is based on the status of the call specified by the hCallparameter.

This operation completes the transfer of the original call, hCall, to the party currently connected by hConsultCall. The consultation call is typically dialed on the consultation call allocated as part of the lineSetupTransferfunction, but it can be any call to which the switch is capable of transferring hCall.

The transfer request can be resolved either as a transfer or as a three-way conference call. When resolved as a transfer, the parties connected by hCalland hConsultCallare connected to each other, and both hCalland hConsultCallare typically cleared from the application's line and transition to the idle state. The application's call handle remains valid after the transfer has completed. The application must deallocate its handle with the lineDeallocateCallfunction.

When resolved as a conference, all three parties enter into a conference call. Both existing call handles remain valid but transition to the conferenced state. A conference call handle is created and returned, and it transitions to the connected state.

If the lineGetConfRelatedCallsfunction is called immediately after lineCompleteTransferwith the result that the calls are conferenced, lineGetConfRelatedCallsmay not return a complete list of related calls. This is because TAPI waits to receive a LINE_CALLSTATE message indicating that the call has entered LINECALLSTATE_CONFERENCED before it considers the call to actually be part of the conference. That is, it waits for the service provider to confirm the conferenced state. After the application has received the LINE_CALLSTATE message, lineGetConfRelatedCallsreturns complete information.

It can also be possible to perform a blind transfer of a call using lineBlindTransfer.

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