(Page 11 of 15 in this chapter) Version


briReleaseCall

Description

Performs one of the following actions:

Prototype

DWORD briReleaseCall ( CTAHD ctahd)

ctahd CTA context handle returned by ctaCreateContext.

Return Values

Events

Details

This function is primarily used to release a connected call or to acknowledge a network disconnection. It may also be used to abandon outbound call placement.

Whenever the network disconnects a call, the BRI service sends a BRIEVN_CALL_DISCONNECTED event to the application.

After the application invokes briReleaseCall, the BRI service resets the call control state to Idle (BRI_CC_STATE_IDLE) and generates BRIEVN_CALL_RELEASED. The application is then eligible to receive or place another call.

The application can disconnect a call by invoking briReleaseCall in the placing call state (BRI_CC_STATE_PLACING_CALL), in the connected state (BRI_CC_STATE_CONNECTED), or in the answering state (BRI_CC_STATE_ANSWERING_CALL). In any case, a call released event is generated after the network release procedure completes and the BRI service resets the call control state to Idle.

BRIEVN_CALL_DISCONNECTED is not generated if release is initiated by the application.

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

See Also

briAcceptCall, briAnswerCall, briPlaceCall, briRejectCall

Example


void myReleaseCall( CTAHD ctahd )
{
 CTA_EVENT event;

    briReleaseCall( ctahd );

    do 
    {
        myGetEvent( &event );           /* see ctaWaitEvent example */
    } while( event.id != BRIEVN_CALL_RELEASED );

/* Must stop the media functions (DTMF, play/record message, fax...)*/
    /* Can now place another call and/or wait for an incoming call. */
}



(Page 11 of 15 in this chapter) Version


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