134 Voice API Programming Guide — June 2005
Send and Receive FSK Data
The following sample code illustrates the use of the dx_TxIottData() function to generate a CAS
tone and transmit an ADSI file:
/* Setup DX_IOTT to play from disk */
/* Setup DV_TPT for termination conditions */
/* Setup ADSI_XFERSTRUC to send CAS followed by ADSI FSK upon receipt of DTMF ‘A’ */
adsimode.cbSize = sizeof(adsimode);
adsimode.dwTxDataMode = ADSI_ALERT;
/* Clear digit buffer for impending ADSI protocol DTMFs */
if (dx_clrdigbuf(Voice_Device) == -1) {
/* Process error */
}
/* Send CAS followed by ADSI data when DTMF ‘A’ is received */
if (dx_TxIottData(Voice_Device, &IOTT, &TPT, DT_ADSI, &adsimode, EV_SYNC) == -1) {
/* Process error */
}