Voice API for Windows Operating Systems Library Reference — November 2003 43
connect analog receive channel to TDM bus time slot — ag_listen( )
/* Open board 1 channel 1 devices */
if ((chdev = dx_open("dxxxB1C1", 0)) == -1) {
/* process error */
}
/* 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 voice channel 1 on board 1 */
if (dx_getxmitslot(chdev, &sc_tsinfo) == -1) {
printf("Error message = %s", ATDV_ERRMSGP(chdev));
exit(1);
}
/* Connect the receive of analog channel 1 on board 1 to TDM bus
time slot of voice channel 1 */
if (ag_listen(chdev, &sc_tsinfo) == -1) {
printf("Error message = %s", ATDV_ERRMSGP(chdev));
exit(1);
}
}
!
!!
!See Also
dx_getxmitslot( )
dt_getxmitslot( ) in the Digital Network Interface Software Reference
fx_getxmitslot( ) in the Fax Software Reference
ag_unlisten( )