lineCompleteCall
The lineCompleteCall
function 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.
LONG lineCompleteCall(
HCALL hCall, |
|
LPDWORD lpdwCompletionID, |
|
DWORD dwCompletionMode, |
|
DWORD dwMessageID |
|
); |
|
Parameters
hCall
A handle to
the call whose completion is requested. The application must be an owner of the
call. The call state of hCall must be busy, ringback.
lpdwCompletionID
A pointer to
a DWORD-sized memory location. The completion ID is used to identify individual
completion requests in progress. A completion ID becomes invalid and may be
reused after the request completes or after an outstanding request is canceled.
dwCompletionMode
The way in
which the call is to be completed. Note that dwCompletionMode is allowed
to have only a single flag set. This parameter uses the following
LINECALLCOMPLMODE_ constants:
LINECALLCOMPLMODE_CAMPON
Queues the
call until the call can be completed. The call remains in the busy state
while queued.
LINECALLCOMPLMODE_CALLBACK
Requests the
called station to return the call when it returns to idle.
LINECALLCOMPLMODE_INTRUDE
Adds the
application to the existing physical call at the called station (barge in).
LINECALLCOMPLMODE_MESSAGE
Leave a short
predefined message for the called station ("Leave Word Calling"). The
message to be sent is specified by dwMessageID.
dwMessageID
The message
that is to be sent when completing the call using LINECALLCOMPLMODE_MESSAGE.
This ID selects the message from a small number of predefined messages.
Return Values
Returns a
positive request ID if the function will be completed asynchronously, or a
negative error number if an error has occurred. The dwParam2 parameter
of the corresponding LINE_REPLY
LINEERR_COMPLETIONOVERRUN,
LINEERR_NOMEM, LINEERR_INVALCALLCOMPLMODE, LINEERR_NOTOWNER, LINEERR_INVALCALLSTATE,
LINEERR_OPERATIONUNAVAIL, LINEERR_INVALCALLHANDLE, LINEERR_OPERATIONFAILED,
LINEERR_INVALMESSAGEID, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALPOINTER,
LINEERR_UNINITIALIZED.
Remarks
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. When
the called station or network enters a state where the call can be completed as
requested, the application will be notified by a LINE_CALLSTATE message with
the call state equal to offering. The call's LINECALLINFO record
lists the reason for the call as CALLCOMPLETION and provide the completion ID
as well. It is possible to have multiple call completion requests outstanding
at any given time; the maximum number is device dependent. The completion ID is
also used to refer to each individual request so requests can be canceled by
calling lineUncompleteCall.
See Also