(Page 43 of 80 in this chapter)
adiReleaseCall
Description
- Performs one of the following actions:
· initiates connection teardown;
· abandons call placement;
· acknowledges a network disconnect event.
Prototype
- DWORD adiReleaseCall( CTAHD ctahd)
- ctahd Context handle returned by adiOpenPort.
Return Values
Events
Details
- adiReleaseCall 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, AG Access sends a ADIEVN_CALL_DISCONNECTED event to the application and prevents it from issuing DSP-related functions. Any active DSP-related functions are terminated with the reason code set to CTA_REASON_RELEASED. The internal resources remain allocated to the call until the application acknowledges the network disconnect by invoking adiReleaseCall. AG Access then resets the call control state to idle (ADI_CC_STATE_IDLE) and generates an ADIEVN_CALL_RELEASED event. The application is then eligible to receive or place another call.
- The application can disconnect a call by invoking adiReleaseCall in the placing call state (ADI_CC_STATE_PLACING_CALL), in the connected state (ADI_CC_STATE_CONNECTED), or in the answering state (ADI_CC_STATE_ANSWERING_CALL). In any case, a call released event is generated after the network release procedure completes and AG Access resets the call control state to idle.
Note: ADIEVN_CALL_DISCONNECTED is not generated if release is initiated by the application.
Note: This function is not available when using the NOCC protocol.
See Also
- adiAnswerCall, adiPlaceCall, adiRejectCall
Example
void myReleaseCall( CTAHD ctahd )
{
ADI_EVENT event;
adiReleaseCall( ctahd );
do
{
myGetEvent( &event ); /* see adiFetchAndProcess example */
} while( event.id != ADIEVN_CALL_RELEASED );
/* Can now place another call and/or wait for an incoming call. */
}
(Page 43 of 80 in this chapter)
Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights
reserved.