release all Dialogic ISDN resources cc_ReleaseCallEx( )
187
!
! !
!
Termination Events
• CCEV_RELEASECALL - indicates that all Dialogic ISDN resources have
been released for the call.
• CCEV_RELEASECALLFAIL – indicates that the cc_ReleaseCallEx( )
function failed.
!
! !
!
Cautions
The cc_ReleaseCallEx( ) function is not supported for LINUX applications.
!
! !
!
Example
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include "srllib.h"
#include "dtilib.h"
#include "cclib.h"
/* GLOBAL VARIABLES */
LINEDEV ldev = 0;
CRN crn = 0;
char *devname = "dtiB1T1"; /* device name for ISDN board 1 timeslot 1 */
void main()
{
int rc;
int srlmode = SR_STASYNC; /* mode for SRL initialization (disabling the internal SRL
event thread) */
.
.
.
/* open the ISDN line device */
if ( cc_Open( &ldev, devname,0)<0)
{
printf("Error opening device: errno = %d\n", errno);
exit(1);
}
/* disable the internal SRL thread in order to use sr_waitevt() for event processing */
if ( sr_setparm( SRL_DEVICE,SR_MODELTYPE,&srlmode) == -1 )
{
printf( "sr_setparm of SRL failed\n" );
}
/* set the event handlers */
sr_enbhdlr( EV_ANYDEV, EV_ANYEVT, (HDLR)defaultHandler);
/* wait for an incoming call */
if ((rc = cc_WaitCall(ldev, &crn, NULL, EV_ASYNC)) < 0)
{
rc = cc_CauseValue(ldev);
printf("ERROR in cc_WaitCall(), error code = %x (%s) \n",
rc, cc_ResultMsg(rc));