Table of Contents Index NMS Glossary Previous Page Next Page (Page 6 of 69 in this chapter) Version


adiBlockCalls

Description

Blocks incoming calls.

Note: This function and all other ADI call control functions have been superseded by the NCC service. For more information, see the Natural Call Control Service Developer's Reference Manual.

Prototype

DWORD adiBlockCalls ( CTAHD ctahd )

ctahd CTA context handle returned by ctaCreateContext.

Return Values

Events

Details

This function causes the port attached to the specified CTA context to enter the call control state ADI_CC_STATE_BLOCKING, which blocks both incoming and outgoing calls. adiBlockCalls may be invoked from any call control state. An active call on the port attached to the specified CTA context will complete normally before the blocking command takes effect.

The ADI service generates an ADIEVN_CALLS_BLOCKED event when the port enters the blocking state. If the port is in the ADI_CC_STATE_IDLE call control state when the function is invoked, the port immediately enters the blocking state; otherwise, the blocked event is generated after the active call completes.

Note: You can receive an incoming call event after calling adiBlockCalls. You must answer or reset the call. You will not get the ADIEVN_CALLS_BLOCKED event until you release the call.

The blocking method is specified in the ADI_CALLCTL_PARMS blockmode field passed to adiStartProtocol. Depending upon the protocol, incoming calls are ignored by ringing forever, responded to as busy, or the actual line state is set to tell the remote end not to send calls (reverse-make-busy).

The port remains in the blocked state until the application invokes adiUnblockCalls.

For more information about controlling calls under specific TCPs, refer to the AG CAS for ADI Service Installation and Developer's Manual.

Note: This function is not available when using the NOCC protocol.

See Also

adiAnswerCall, adiPlaceCall, adiStartProtocol, adiUnBlockCalls

Example


int myBlockCalls( CTAHD ctahd )
{
 CTA_EVENT event;

    if( adiBlockCalls( ctahd ) != SUCCESS )
        return MYFAILURE;

    do 
    {
        myGetEvent( &event );           /* see ctaWaitEvent example */
        switch( event.id )
        {
            /* ... */
        }
    } while( event.id != ADIEVN_CALLS_BLOCKED );
    return SUCCESS;
}




Table of Contents Index NMS Glossary Previous Page Next Page (Page 6 of 69 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.