Platform SDK: TAPI |
The TSPI_lineRedirect function redirects the specified offering call to the specified destination address.
LONG TSPIAPI TSPI_lineRedirect( DRV_REQUESTID dwRequestID, HDRVCALL hdCall, LPCWSTR lpszDestAddress, DWORD dwCountryCode );
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. Possible return values are as follows:
LINEERR_INVALCALLHANDLE, LINEERR_NOMEM, LINEERR_INVALCALLSTATE, LINEERR_OPERATIONUNAVAIL, LINEERR_INVALCOUNTRYCODE, LINEERR_OPERATIONFAILED, LINEERR_INVALADDRESS, LINEERR_RESOURCEUNAVAIL.
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.
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 95 or later.
Version: Requires TAPI 1.3 or later.
Header: Declared in Tspi.h.
ASYNC_COMPLETION, LINE_CALLSTATE, TSPI_lineAccept, TSPI_lineDrop, TSPI_lineGetDevCaps