106 Voice API Programming Guide — June 2005

Recording and Playback

2. Have both MSI/SC stations listen to the ECR transmit of the opposite voice channel.

ms_listen (MS1, &CH2_ECR_TX);

ms_listen (MS2, &CH1_ECR_TX);

3. Have both voice channel devices listen to their corresponding MSI/SC station device.

dx_listen (CH1, &MS1_TX);

dx_listen (CH2, &MS2_TX);

4. Have each voice channel connect its echo canceller’s receive time slot to the opposite echo

canceller’s ECR transmit. These signals are used as echo reference signals.

dx_listenecr (CH1, & CH2_ECR_TX);

dx_listenecr (CH2, & CH1_ECR_TX);

Figure 17. ECR Bridge Example Diagram

Example
#include <stdio.h>
#include <windows.h> /* Windows applications only */
#include <srllib.h>
#include <dxxxlib.h>
#include <msilib.h>
#include <errno.h> /* Linux applications only */
main()
{
int chdev1, chdev2; /* Voice channel device handles */
int msdev1, msdev2; /* MSI/SC station device handles */
SC_TSINFO sc_tsinfo; /* TDM bus time slot information structure */
long scts; /* Pointer to TDM bus time slot */
long ms1txts, ms2txts, /* Transmit time slots of stations 1 & 2 */
ch1ecrtxts, ch2ecrtxts; /* Transmit time slots of echo-cancellers on voice channels 1 & 2 */
CH2
CH2_ECR_TX
EC
TX
RX
ECR
TX
ECR
RX
EC
ECR
TX
ECR
RX
RX
TX
CH1
CH1_ECR_TX
MS2_TX
MS1_TX
S
C
b
u
s
S
C
b
u
s