Intel 05-1832-002 IP Phone User Manual


 
102 Voice API for Windows Operating Systems Library Reference — November 2003
ATDX_LONGLOW( ) — return duration of longer silence detected
.
/* open the channel using dx_open( ). Obtain channel device descriptor in
* chdev
*/
if ((chdev = dx_open("dxxxB1C1",NULL)) == -1) {
/* process error */
}
/* take the phone off-hook */
if (dx_sethook(chdev,DX_OFFHOOK,EV_SYNC) == -1) {
/* process error */
}
/* Set the DX_CAP structure as needed for call progress analysis. Perform the
* outbound dial with call progress analysis enabled
*/
if ((cares = dx_dial(chdev,"5551212",&capp,DX_CALLP|EV_SYNC)) == -1) {
/* perform error routine */
}
switch (cares) {
case CR_CNCT: /* Call Connected, get some additional info */
printf("\nDuration of short low - %ld ms",ATDX_SHORTLOW(chdev)*10);
printf("\nDuration of long low - %ld ms",
ATDX_LONGLOW(chdev)
*10);
printf("\nDuration of answer - %ld ms",ATDX_ANSRSIZ(chdev)*10);
break;
case CR_CEPT: /* Operator Intercept detected */
printf("\nFrequency detected - %ld Hz",ATDX_FRQHZ(chdev));
printf("\n%% of Frequency out of bounds - %ld Hz",ATDX_FRQOUT(chdev));
break;
case CR_BUSY:
.
.
}
}
!
!!
! See Also
dx_dial( )
ATDX_CPTERM( )
ATDX_SIZEHI( )
ATDX_SHORTLOW( )
DX_CAP data structure
call progress analysis in the Voice API Programming Guide
cadence detection in the Voice API Programming Guide