Intel 05-1832-002 IP Phone User Manual


 
88 Voice API for Windows Operating Systems Library Reference — November 2003
ATDX_FRQHZ( ) — return the frequency of the first SIT sequence
.
/* 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("\nFirst frequency detected - %ld Hz",
ATDX_FRQHZ(chdev)
);
printf("\nSecond frequency detected - %ld Hz",
ATDX_FRQHZ2(chdev)
);
printf("\nThird frequency detected - %ld Hz",
ATDX_FRQHZ3(chdev)
);
printf("\nDuration of first frequency - %ld ms", ATDX_FRQDUR(chdev));
printf("\nDuration of second frequency - %ld ms", ATDX_FRQDUR2(chdev));
printf("\nDuration of third frequency - %ld ms", ATDX_FRQDUR3(chdev));
break;
case CR_BUSY:
break;
.
.
}
}
!
!!
! See Also
dx_dial( )
ATDX_CPTERM( )
DX_CAP data structure
call progress analysis topic in the Voice API Programming Guide
ATDX_FRQHZ2( )
ATDX_FRQHZ3( )
ATDX_FRQDUR( )
ATDX_FRQDUR2( )
ATDX_FRQDUR3( )