Partager via


TSPI_lineRedirect

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

LONG TSPIAPI TSPI_lineRedirect(
  DRV_REQUESTID dwRequestID,  
  HDRVCALL hdCall, 
  LPCWSTR lpszDestAddress,  
  DWORD dwCountryCode 
);

Parameters

  • dwRequestID
    Identifier of the asynchronous request.
  • hdCall
    Hhandle to the call to be redirected. The call state of hdCall can be offering.
  • lpszDestAddress
    Pointer to a null-terminated Unicode string that specifies the destination address. This follows the standard link 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. This parameter is not validated by TAPI when this function is called.

Return Values

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_NOMEM Not enough memory is available.
LINEERR_INVALCALLSTATE The call state is invalid.
LINEERR_OPERATIONUNAVAIL The operation is unavailable.
LINEERR_INVALCOUNTRYCODE The country/region code is invalid.
LINEERR_OPERATIONFAILED The operation failed.
LINEERR_INVALADDRESS The address is invalid.
LINEERR_RESOURCEUNAVAIL The resource is unavailable.

Remarks

The service provider does not redirect the call if it returns LINEERR_INVALADDRESS.

When this function is invoked, the service provider deflects the 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 called station; redirection can be done on a call-by-call basis by a client application, for example driven by caller ID information. It differs from call transfer in that transferring a call requires that the call first be answered.

After a call is successfully redirected, the call typically transitions to idle. The service provider indicates the new state using a LINE_CALLSTATE message.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Tapicomn.h.
Link Library: Coredll.lib.

See Also

TSPI_lineAccept | TSPI_lineDrop | TSPI_lineGetDevCaps

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.