Intel 05-1832-002 IP Phone User Manual


 
282 Voice API for Windows Operating Systems Library Reference — November 2003
dx_listenecr( ) — enable echo cancellation resource mode
!
!!
! Example
#include <stdio.h>
#include <windows.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <msilib.h>
main()
{
int msdev1, chdev2; /* MSI/SC Station, and Voice Channel device handles */
SC_TSINFO sc_tsinfo; /* Time slot information structure */
long scts; /* TDM bus time slot */
/* Open MSI/SC board 1 station 1 device */
if ((msdev1 = ms_open("msiB1C1", 0)) == -1) {
/* Perform system error processing */
exit(1);
}
/* Open board 1 channel 2 device */
if ((chdev2 = dx_open("dxxxB1C2", 0)) == -1) {
/* Perform system error processing */
exit(1);
}
/* Fill in the TDM bus time slot information */
sc_tsinfo.sc_numts = 1;
sc_tsinfo.sc_tsarrayp = &scts;
/* Get TDM bus time slot connected to transmit of MSI/SC station 1 on board 1 */
if (ms_getxmitslot(msdev1, &sc_tsinfo) == -1) {
printf("Error message = %s", ATDV_ERRMSGP(msdev1));
exit(1);
}
/* Connect the echo-reference receive of voice channel 2 on board 1 to
the transmit signal of msdev1 */
if (dx_listenecr(chdev2, &sc_tsinfo) == -1) {
printf("Error message = %s", ATDV_ERRMSGP(chdev2));
exit(1);
}
/* Continue
.
.
.
/* Then perform xx_unlisten()s and dx_unlistenecr(), plus all xx_close()s */
return(0);
}
!
!!
! See Also
dx_getxmitslotecr( )
dx_listen( )
dx_listenecrex( )
dx_unlistenecr( )
xx_getxmitslot( ), where xx refers to the type of device such as ag_ (analog), dt_ (digital
network interface), dx_ (voice), fx_ (fax), and ms_ (modular station interface)