Partager via


lineRedirect (Compact 2013)

3/26/2014

This function redirects the specified offering call to the specified destination address.

Syntax

LONG WINAPI lineRedirect(
  HCALL hCall,
  LPCSTR lpszDestAddress,
  DWORD dwCountryCode 
);

Parameters

  • hCall
    Handle to the call to be redirected. The application must be an owner of the call. The call state of hCall must be offering.
  • lpszDestAddress
    Pointer to the destination address. This follows the standard dialable number format.
  • dwCountryCode
    Country/region code of the party the call is redirected to. If a value of zero is specified, a default is used by the implementation.

Return Value

Returns a positive request identifier if the function is completed asynchronously, or a negative error number if an error occurs. The dwParam2 parameter of the corresponding LINE_REPLY message 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_INVALADDRESS

The address is invalid.

LINEERR_NOTOWNER

The application is not the owner of this call.

LINEERR_INVALCALLHANDLE

The handle to the call is invalid.

LINEERR_OPERATIONUNAVAIL

The operation is unavailable.

LINEERR_INVALCALLSTATE

The call state is something other than offering.

LINEERR_OPERATIONFAILED

The operation failed.

LINEERR_INVALCOUNTRYCODE

The country/region code 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

Call redirect allows an application to deflect an offering call to another address without first answering the call. Call redirect differs from call forwarding in that call forwarding is performed by the switch without the involvement of the application; redirection can be done on a call-by-call basis by the application, for example, driven by caller ID information. It differs from call transfer in that transferring a call requires the call first be answered.

After a call has been successfully redirected, the call typically transitions to idle.

Besides redirecting an incoming call, an application may have the option to accept the call using the lineAccept function, reject the call using the lineDrop function, or answer the call using the lineAnswer function. The availability of these operations is dependent on device capabilities.

Requirements

Header

tapi.h

Library

TAPI32.dll

See Also

Reference

TAPI Line Device Functions
lineAccept
lineAnswer
lineDrop
LINE_REPLY