(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 a protocol-specific CT Access call blocking parameter structure. Specify
NULL
to use default values. See the protocol-specific documentation for details.
Return Values
SUCCESS
CTAERR_INVALID_HANDLE
The NCC service is not open on the specified line handle.
CTAERR_INVALID_STATE
The current line state does not allow 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 are not blocked until there are no calls on the line (the line has returned to the idle state).
The method used to block calls is specified with the function invocation. 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 changes to blocking, the application receives
NCCEVN_CALLS_BLOCKED. The
value
returned with this event contains the chosen blocking method. The line remains in the blocking 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 does not receive the
NCCEVN_CALLS_BLOCKED
event until it releases all calls.
If the blocking request fails, the application receives
NCCEVN_BLOCK_FAILED
. The line remains in the current state.
Use the
nccUnBlockCalls
function to cancel a blocking request initiated using
nccBlockCalls
. You can cancel a blocking request any time before
NCCEVN_CALLS_BLOCKED
is received.
See Also
nccUnblockCalls
(Page 5 of 23 in this chapter)
Version
Want to send us feedback on our documentation? Email:
Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.