132 Voice API Programming Guide — June 2005
Send and Receive FSK Data
10.8.5 Implementing Two-Way ADSI Using dx_TxRxIottData( )
After the two-way ADSI transmission is implemented using the dx_TxIottData( ) function,
additional ADSI FSK messages are typically sent to the CPE peripheral to configure the display
and soft keys. Since at this point the CPE peripheral has been configured to send data to the server,
the dx_TxRxIottData() function shou ld be used to send the data to the CPE and then quickly turn
around and be ready to receive data from the CPE.
To transfer ADSI FSK data using dx_TxRxIottData(), set the function parameters and configure
the structures as described below:
Set wType to DT_ADSI.
Configure DX_IOTT structures referenced by lpTxIott and lpRxIott with the appropriate
ADSI FSK data files. The application is responsible for constructing the messages and
checksums for each transmission.
Set the termination conditions for the transmit and receive portions of the function with the
DV_TPT structures referenced by lpTxTerminations and lpRxTerminations, respectively.
Set dwTxDataMode and dwRxDataMode within the ADSI_XFERSTRUC referenced by
lpParams to ADSI_NOALERT to transmit and receive FSK ADSI data without generation of
a CAS.
The following scenario illustrates the function calls that are required to send and receive FSK
ADSI data between the server and the CPE.
1. Prior to executing dx_TxIottData( ), clear the digit buffer for the desired voice channel using
dx_clrdigbuf( ).
2. Issue dx_TxRxIottData( ) with dwTxDataMode and dwRxDataMode within
ADSI_XFERSTRUC set to ADSI_NOALERT. This initiates the transmission of the data file
referenced in the DX_IOTT structure to the CPE. The server voice channel is placed
automatically in FSK ADSI data receive mode to receive data from the CPE.
3. After receiving the data file(s), the CPE responds with a DTMF ACK or NAK, indicating the
number of messages successfully received. (The application is responsible for determining
whether the message count acknowledgment matches the number of messages that were
transmitted and for re-transmitting any messages.)
4. The server voice channel is ready and waiting for data from the CPE.
5. The CPE sends FSK ADSI data to the server. When an ADSI FSK message is successfully
received or when the termination conditions set in lpRxTerminations are met, the
dx_TxRxIottData( ) function completes.
6. After completion of dx_TxRxIottData( ), the dx_getdig( ) function retrieves the DTMF ACK
sequence for the transmit portion of the function. When the DTMF string is received,
additional messages can be sent and received between the server and the CPE peripheral.
7. In another thread of execution at the server, the received message(s) are processed by the
application to determine the number of messages received and the integrity of the information.