A D/42-xx board begins to synchronize with the PBX immediately after the D/42 firmware (D4X.FWL) is downloaded to the board (assuming that the board is physically connected to the PBX). This process can take up to 60 seconds to complete. During this time period, the D/42-xx board should not receive any calls from the PBX. Before any other functions are accessed, your application should ensure that the D/42-xx board is synchronized by opening the board device and calling the d42_brdstatus( ) function. Failure to ensure that the connection is established (synchronized) may result in unpredictable results.
After synchronization is complete, the dx_open( ) function is used to open the channel by using a valid device name to identify the channel you wish to open.
Examplevoid main(void)
{
int devh;
int rc = 0;
char buffstatus;
char bufferp[49];
/* open the channel */
if ((devh = dx_open("dxxxB1C1",NULL)) == -1)
{
/* process error */
exit(1);
}
/* Open Board Device */
if ( (devh = dx_open("dxxxB1C1",NULL))==-1)
{
printf("Error dx_open( )\n");
exit(-1);
} /* End dx_open */
/* Get the board status Information */
if ( (rc = d42_brdstatus(devh, &buffstatus, bufferp)) == -1)
{
printf("Error d42_brdstatus( )\n");
dx_close(devh);
exit(-1);
} /* End d42_brdstatus*/
printf("Board Status = %X\n",buffstatus);
/* wait for 60 seconds for switch */
Sleep(60000L);
dx_close(devh);
exit(0);
}
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation