Voice API Programming Guide — June 2005 105
Recording and Playback
ECR mode is activated using the dx_listenecrex() function. For technical information on ECR
functions, see the Voice API Library Reference.
Note: dx_listen() may precede or follow the dx_listenecr( ) or dx_listenecrex() functio n. If multiple
dx_listen( ) and dx_listenecr( ) or dx_listenecrex( ) function calls are issued against a single
channel, the echo cancellation operates on the last two issued. Successive dx_listenecr() or
dx_listenecrex() functions can be issued without requiring any dx_unlistenecr( ) between them.
While a channel is in ECR mode, a number of standard voice operations are not available. The
unavailable operations include the following:
•play
•record (8 kHz PCM record is the only supported record encoding when a channel is in the ECR
mode. Any such 8 kHz PCM record is a recording of the echo-canceled signal.)
•dial
•tone generation
•R2/MF
•transaction record
If a channel is actively performing any of the above operations, a dx_listenecr() or
dx_listenecrex() function is not performed, and the function returns an error to the application.
Conversely, if a channel is in ECR mode, a request for any of these operations is not honored,
except for the record noted. A channel may be returned to SVP mode dynamically via the
dx_unlistenecr() function.
8.12.4 Echo Cancellation Resource Application ModelsTwo application models are provided in this section to illustrate building an echo-canceled
connection via the TDM bus:
•How to Set Up the ECR Bridge
•How to Set Up an ECR Play Over the TDM bus
8.12.4.1 How to Set Up the ECR Bridge
This application model uses two Modular Station Interface (MSI/SC) station devices connected via
the TDM bus to two voice channel devices. The voice channel devices are operating in ECR mode.
Two telephones (Figure17, “ECR Bridge Example Diagram”, on page 106) are connected to the
MSI/SC stations for providing input and for listening to the echo-canceled output of each voice
device.
Perform the following to set up an ECR bridge:
1. Get TDM bus transmit time slots of both MSI/SC devices and the ECR transmit time slots of
the two voice channel devices.
ms_getxmitslot (MS1, &MS1_TX);
ms_getxmitslot (MS2, &MS2_TX);
dx_getxmitslotecr (CH1, &CH1_ECR_TX);
dx_getxmitslotecr (CH2, &CH2_ECR_TX);