Dialogic 05-0867-005 Table Top Game User Manual


 
cc_MakeCall( ) request a connection to make an outgoing call
174
printf(The call is conducted on channel %d\n, chanId.channel);
.
.
.
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);
}
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.channel_id.channel = NO_BCHAN;
makecall_blk->isdn.channel_id.channel_mode = PREFFERED;
}