ISDN Software Reference for Linux and Windows
412
The following code samples demonstrate the use of the Dialogic API at variousstages of the NCAS call scenario.1. Opening a D channel line level device:
LINEDEV D_chan_dev1_hdl;
.
.
rc = cc_Open( &D_chan_dev1_hdl, "dtiB24", 0);
.
2. Setting up the MAKECALL_BLK for an NCAS call:
MAKECALL_BLK *makecallp;
.
.
// initialize makecall block
makecallp->isdn.BC_xfer_cap = BEAR_CAP_UNREST_DIG;
makecallp->isdn.BC_xfer_mode = ISDN_ITM_PACKET;
makecallp->isdn.BC_xfer_rate = PACKET_TRANSPORT_MODE;
makecallp->isdn.usrinfo_layer1_protocol = NOT_USED;
makecallp->isdn.usr_rate = NOT_USED;
makecallp->isdn.destination_number_type = NAT_NUMBER;
makecallp->isdn.destination_number_plan = ISDN_NUMB_PLAN;
makecallp->isdn.destination_sub_number_type = OSI_SUB_ADDR;
makecallp->isdn.destination_sub_phone_number[0] = 1234
makecallp->isdn.origination_number_type = NAT_NUMBER;
makecallp->isdn.origination_number_plan = ISDN_NUMB_PLAN;
makecallp->isdn.origination_phone_number[0] = 19739903000
makecallp->isdn.origination_sub_number_type = OSI_SUB_ADDR;
makecallp->isdn.origination_sub_phone_number[0] = 5678
makecallp->isdn.facility_feature_service = ISDN_SERVICE;
makecallp->isdn.facility_coding_value = ISDN_SDN;
// or ISDN_ACCUNET, please check with your service provider
makecallp->isdn.usrinfo_bufp = NULL;
makecallp->isdn.nsfc_bufp = NULL;
.
.