(Page 14 of 15 in this chapter) Version
briStopProtocol
Description
- Stops the execution of the ISDN protocol.
Prototype
- DWORD briStopProtocol ( CTAHD ctahd )
- ctahd CTA context handle returned by ctaCreateContext.
Return Values
Events
Details
- This function stops a protocol previously started with briStartProtocol.
- You may stop the running protocol from any state. If the protocol is in the middle of a call, the call will be released, the outgoing line will be set to the BRI_CC_STATE_DISCONNECTED state, and the incoming signaling will be ignored.
- If an orderly shutdown is required, you can block calls (briBlockCalls), and when receipt of a BRIEVN_CALLS_BLOCKED event indicates that the CTA context has entered the blocked state, you can then stop the protocol.
- The protocol may not be restarted until the DONE event is returned.
See Also
- briBlockCalls, briStartProtocol
Example
int myStopProtocol( CTAHD ctahd )
{
CTA_EVENT event;
if( briStopProtocol( ctahd ) != SUCCESS )
return MYFAILURE;
while( 1 )
{
myGetEvent( &event ); /* see ctaWaitEvent example */
switch( event.id )
{
case BRIEVN_STOPPROTOCOL_DONE:
if( event.value == CTA_REASON_FINISHED)
return SUCCESS; /* stopped normally */
else
return MYFAILURE; /* API error */
break;
}
}
}
(Page 14 of 15 in this chapter) Version
tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights
reserved.