cc_GetNonCallMsg( ) retrieves call data for a GLOBAL or NULL CRN event
136
if(cc_GetNonCallMsg(devhndl, &nullDataBlk) == 0)
{
int i;
printf(“Sapi = 0x%x.\n”,nullDataBlk.sapi);
printf(“CES = 0x%x.\n”,nullDataBlk.ces);
printf(“Raw IE data length = %d.\n”,nullDataBlk.length);
printf(“IE data =:\n”);
for(i = 0; i < nullDataBlk.Iength; i++)
{
printf("0x%02x ", (unsigned char)nullDataBIk.data[i]);
}
}
else
tx_message("GetNonCallMsg failure" ,brd,devindx+1);
return( 0 );
}
void main()
{
LINEDEV devhdl = 0;
CRN crn = 0;
char devname = "briS1"; /* Device name for BRI station one */
char dnis_buf[CC_ADDRSIZE];
char infbuf[MAXLEN_IEDATA]; /* buffer raw information in CCITT format */
iIt i; /* for loop counter to print out information buffer
contents */
/* open the ISDN line device */
if ( cc_Open( &devhdl, devname,0)<0)
{
printf("Error opening device: errno = %d\n", errno);
exit(1);
}
if ( sr_enbhdlr( devhdl, CCEV_INFONULL, (HDLR)callinfoNullHdlr ) == -1 )
{
printw( "dtiEnable for CCEV_CALLINFO failed: %s\n",
ATDV_ERRMSGP( SRL_DEVICE ) );
return( 1 );
}
.
.
.
.
.
/* close the ISDN line device */
if ( cc_Close( devhdl)<0)
printf("Error closing device, errno = %d\n", errno);
} /* end main */