ThbTapiLine.CompleteCall
Unit: hbTapi

This method specifies how a call that could not be connected normally should be completed instead. The network or switch may not be able to complete a call because network resources are busy or the remote station is busy or doesn't answer. The application can request that the call be completed in one of a number of ways. The way in which the call is to be completed is specified by the CompletionMode parameter. This parameter uses one and only one of the LINECALLCOMPLMODE_ Constants:

Constants

Meainig

LINECALLCOMPLMODE_CALLBACK

Requests the called station to return the call when it returns to idle.

LINECALLCOMPLMODE_CAMPON

Queues the call until the call can be completed.

LINECALLCOMPLMODE_INTRUDE

Adds the application to the existing call at the called station (barge in).

LINECALLCOMPLMODE_MESSAGE

Leaves a short predefined message for the called station (Leave Word Calling). The message to be sent is specified separately.

The completion identifier (parameter CompletionID) is used to identify individual completion requests in progress. A completion identifier becomes invalid and can be reused after the request completes or after an outstanding request is canceled.

The application must be an owner of the call whose completion is requested and the call's state must be busy or ringback.

This function is considered complete when the request has been accepted by the network or switch; not when the request is fully completed in the way specified. After this function completes, the call typically transitions to idle. The call's info property lists the reason for the call as CALLCOMPLETION and provides the completion identifier as well.

Declaration

procedure ThbTapiLine.CompleteCall(Call: ThbTapiCall; var CompletionID: DWORD; CompletionMode, MessageID: DWORD);

Remarks

This function works in an asynchronous manner. See the SyncMode property to read more about the handling of asynchronous functions. Please refer to the section "lineCompleteCall" in TAPI's documentation for a more detailed information.

Errors

Using this function may cause an EhbTapiError exception . Possible errors are:

LINEERR_COMPLETIONOVERRUN, LINEERR_NOMEM, LINEERR_INVALCALLCOMPLMODE, LINEERR_NOTOWNER, LINEERR_INVALCALLSTATE, LINEERR_OPERATIONUNAVAIL, LINEERR_INVALCALLHANDLE, LINEERR_OPERATIONFAILED, LINEERR_INVALMESSAGEID, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALPOINTER, LINEERR_UNINITIALIZED.

See Also

ThbTapiLine.UncompleteCall