Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference 425
transmit data on a specified channel — dx_TxIottData( )
#include "srllib.h"
#include "dxxxlib.h"
main()
{
DX_IOTT iott = {0};
char *devnamep = "dxxxB1C1";
char buffer[16];
ADSI_XFERSTRUC adsimode;
int chdev;
.
.
.
sprintf(buffer, "MENU.ADSI");
if ((iott.io_fhandle = dx_fileopen(buffer, _O_RDONLY|O_BINARY)) == -1) {
/* Perform system error processing */
exit(1);
}
if ((chdev = dx_open(devnamep, 0)) == -1) {
fprintf(stderr, "Error opening channel %s\n",devnamep);
dx_fileclose(iott.io_fhandle);
exit(2);
}
// source is a file
iott.io_type = IO_DEV|IO_EOT;
iott.io_bufp = 0;
iott.io_offset = 0;
iott.io_length = -1;
adsimode.cbSize = sizeof(adsimode);
adsimode.dwTxDataMode = ADSI_ALERT; // send out ADSI data with CAS
printf("Waiting for incoming ring\n");
dx_wtring(chdev, 2, DX_OFFHOOK, -1);
if (
dx_TxIottData(chdev, &iott, NULL, DT_ADSI, &adsimode, EV_SYNC)
< 0) {
fprintf(stderr, "ERROR: dx_TxIottData failed on Channel %s; error:
%s\n", ATDV_NAMEP(chdev), ATDV_ERRMSGP(chdev));
}
.
.
.
}
!
!!
! See Also
dx_RxIottData( )
dx_TxRxIottData( )