(Page 5 of 23 in this chapter)
Version
nccBlockCalls
Description
Blocks incoming calls.
Prototype
DWORD
nccBlockCalls
(
CTAHD
linehd
,
unsigned
blockmode
,
void
*
blockparms
)
linehd
NCC line handle opened using
ctaOpenServices
.
blockmode
Method to be used to block calls:
NCC_BLOCK_REJECTALL
NCC_BLOCK_OUT_OF_SERVICE
blockparms
Pointer to protocol-specific CT Access call blocking parameter structure. Specify
NULL
to use default values. See protocol-specific documentation for details.
Return Values
SUCCESS
CTAERR_INVALID_HANDLE
The NCC service is not opened on the specified line handle.
CTAERR_INVALID_STATE
The current line state does not allow for this function to be called.
Events
NCCEVN_BLOCK_FAILED
The request to block calls failed. The event
value
field contains the reason.
NCCEVN_CALLS_BLOCKED
The block calls request completed successfully. The line state has changed to Blocking.
Details
This function blocks calls on the specified line handle.
nccBlockCalls
may be invoked from the Active, Idle, or Out of Service line states. However, incoming calls will not be blocked until there are no calls on the line (i.e., the line has returned to Idle line state).
With the function invocation is specified the method to be used to block calls. Two methods are valid:
Method
Description
NCC_BLOCK_REJECTALL
Do not answer subsequent calls
NCC_BLOCK_OUT_OF_SERVICE
Place the line out of service
When the line state has changed to Blocking, the application receives
NCCEVN_CALLS_BLOCKED
.
value
returned with this event contains the chosen blocking method. The line will remain in the Blocking line state until the function
nccUnblockCalls
is invoked.
The application may receive
NCCEVN_INCOMING_CALL
after invoking
nccBlockCalls
and before receiving
NCCEVN_CALLS_BLOCKED
. The application must handle the incoming call (accept it, answer it, etc.). The application will not receive the
NCCEVN_CALLS_BLOCKED
event until it releases all calls.
If the blocking request fails for some reason, the application receives
NCCEVN_BLOCK_FAILED
. The line remains in the current state.
The
nccUnBlockCalls
function can be used to cancel a blocking request initiated using
nccBlockCalls
. A blocking request can be canceled any time before
NCCEVN_CALLS_BLOCKED
is received.
See Also
nccUnblockCalls
(Page 5 of 23 in this chapter)
Version
tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.