Dialogic 05-0867-005 Table Top Game User Manual


 
opens a device cc_Open( )
177
Each BRI structure is composed of one D channel and two B (bearer) channels. A
BRI board device, such as briS1, is defined as a station and controls the D-channel
the same way as a PRI board device. A BRI time slot device, such as briS1T1, is
defined as a bearer channel under a station and is handled the same way as a PRI
line device.
!
! !
!
Cautions
Do not open a D or B channel more than once from the same process, or
unpredictable results could occur.
!
! !
!
Example
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include srllib.h
#include dtilib.h
#include cclib.h
void main()
{
LINEDEV devhdl = 0;
CRN crn = 0;
char *devname = briS1T1;
if ( cc_Open( &devhdl, devname, 0) <0)
{
printf(Error opening device: errno = %d\n, errno);
exit(1);
}
printf(Waiting for call\n);
if ( cc_WaitCall(devhdl, &crn, NULL, -1, EV_SYNC)<0)
procdevfail(devhdl);
if ( cc_AnswerCall(crn, 0, EV_SYNC)<0)
callfail(crn);
.
.
.
.
.
/* Drop the call */
if ( cc_DropCall(crn, NORMAL_CLEARING, EV_SYNC)<0)
callfail(crn);
if ( cc_ReleaseCall(crn)<0)
callfail(crn);
if ( cc_Close( devhdl)<0)
printf(Error closing device, errno = %d\n, errno);
}