114 Voice API for Windows Operating Systems Library Reference — November 2003
ATDX_TERMMSK( ) — return the reason for the last I/O function termination
tpt[2].tp_termno = DX_MAXSIL; /* Maximum Silence */
tpt[2].tp_length = 30; /* terminate on 3 sec silence */
tpt[2].tp_flags = TF_MAXSIL; /* Use the default flags */
tpt[3].tp_type = IO_EOT; /* last entry in the table */
tpt[3].tp_termno = DX_LCOFF; /* terminate on loop current drop */
tpt[3].tp_length = 10; /* terminate on 1 sec silence */
tpt[3].tp_flags = TF_LCOFF; /* Use the default flags */
/* Now record to the file */
if (dx_rec(chdev,&iott,tpt,EV_SYNC) == -1) {
/* process error */
}
/* Examine bitmap to determine if digits caused termination */
if((term =
ATDX_TERMMSK(chdev)
) == AT_FAILURE) {
/* Process error */
}
if(term & TM_MAXDTMF) {
printf("Terminated on digits\n");
.
.
}
}
!
!!
! See Also
• DV_TPT data structure to set termination conditions
• Event Management functions to retrieve termination events asynchronously (in the Standard
Runtime Library API Programming Guide and Standard Runtime Library API Library
Reference)
• ATEC_TERMMSK( ) in the Continuous Speech Processing API Library Reference