(Page 4 of 15 in this chapter) Version


briBlockCalls

Description

Blocks incoming and outgoing calls.

Prototype

DWORD briBlockCalls ( 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 BRI_CC_STATE_BLOCKING, which blocks both incoming and outgoing calls. briBlockCalls 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 BRI service generates a BRIEVN_CALLS_BLOCKED event when the port enters the blocking state. If the port is in the BRI_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 briBlockCalls. You must answer or reset the call. You will not get the BRIEVN_CALLS_BLOCKED event until you release the call.

The BRI service ignores incoming calls by sending a Disconnect message.

Note: No in-band tone (ring back or busy) is generated to the remote party by the BRI service.

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

Refer to Chapter 4 for a detailed explanation of call control.

See Also

briAcceptCall, briAnswerCall, briPlaceCall, briStartProtocol, briUnBlockCalls

Example


int myBlockCalls( CTAHD ctahd )
{
 CTA_EVENT event;

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

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


(Page 4 of 15 in this chapter) Version


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.