Dialogic 05-0867-005 Table Top Game User Manual


 
cc_MakeCall( ) request a connection to make an outgoing call
172
BRI only: Applications using the call waiting feature must use the
cc_MakeCall( ) function in asynchronous mode.
!
! !
!
Example
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include srllib.h
#include dtilib.h
#include cclib.h
void build_makecall_blk( MAKECALL_BLK *makecall_blk )
void main()
{
LINEDEV devhdl = 0;
CRN crn = 0;
char *devname = dtiB1T1;
MAKECALL_BLK makecall_blk;
if ( cc_Open(&devhdl, devname,0)<0)
{
printf(Error opening device: errno = %d\n, errno);
exit(1);
}
/* initialize the MAKECALL Block */
build_makecall_blk(&makecall_blk)
if ( cc_MakeCall(devhdl, &crn, ”9933000”, &makecall_blk, 30, EV_SYNC) <0)
procdevfail(devhdl);
.
.
.
.
.
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);
}
int callfail(CRN crn)
{
LINEDEV ld;
cc_CRN2LineDev(crn,&ld);
procdevfail(ld);
}
int procdevfail(LINEDEV handle)
{
int reason;
char *msg;
reason = cc_CauseValue(handle);
cc_ResultMsg(handle,reason,&msg);
printf(reason = %x - %s\n,reason,msg);
}