Dialogic 05-0867-005 Table Top Game User Manual


 
request a connection to make an outgoing call cc_MakeCall( )
173
void build_makecall_blk( MAKECALL_BLK *makecall_blk )
{
memset(makecall_blk,0xff,sizeof(MAKECALL_BLK));
makecall_blk->isdn.BC_xfer_cap = BEAR_CAP_SPEECH;
makecall_blk->isdn.BC_xfer_mode = ISDN_ITM_CIRCUIT;
makecall_blk->isdn.BC_xfer_rate = BEAR_RATE_64KBPS;
makecall_blk->isdn.facility_coding_value = ISDN_CPN;
makecall_blk->isdn.destination_number_type = NAT_NUMBER;
makecall_blk->isdn.destination_number_plan = ISDN_NUMB_PLAN;
makecall_blk->isdn.origination_number_type = ISDN_NOTUSED;
makecall_blk->isdn.origination_number_plan = ISDN_NOTUSED;
makecall_blk->isdn.origination_phone_number[0] = '\0';
makecall_blk->isdn.facility_feature_service = ISDN_SERVICE;
makecall_blk->isdn.usrinfo_layer1_protocol = ISDN_UIL1_G711ULAW;
makecall_blk->isdn.usr_rate = ISDN_NOTUSED;
makecall_blk->isdn.usrinfo_bufp = NULL;
makecall_blk->isdn.nsfc_bufp = NULL;
makecall_blk->isdn.destination_sub_number_type = OSI_SUB_ADDR;
makecall_blk->isdn.destination_sub_phone_number[0] = 1;
makecall_blk->isdn.destination_sub_phone_number[1] = 2;
makecall_blk->isdn.destination_sub_phone_number[2] = 3;
makecall_blk->isdn.destination_sub_phone_number[3] = '\0';
makecall_blk->isdn.u.bri.channel_id.channel = NO_BCHAN;
makecall_blk->isdn.u.bri.channel_id.channel_mode = PREFFERED;
}
Call Waiting Example (Windows Only):
#include <windows.h>
#include <stdio.h>
#include <errno.h>
#include srllib.h
#include dtilib.h
#include cclib.h
/** Function prototypes **/
void build_makecall_blk( MAKECALL_BLK *makecall_blk );
int callfail(CRN crn);
int procdevfail(LINEDEV handle);
void main( )
{
CRN crn = 0;
CHAN_ID chanId;
LINEDEV devhdl = 0;
char *devname = dtiB1;
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);
cc_GetChanId(&crn, &chanId);