Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 71
return the last result of call progress analysis termination — ATDX_CPTERM( )
CR_STOPD
Call progress analysis stopped due to dx_stopch( ).
CR_ERROR
Call progress analysis error occurred. Use ATDX_CPERROR( ) to return the type of error.
!
!!
! Cautions
None.
!
!!
! Errors
This function will fail and return AT_FAILURE if an invalid channel device handle is specified in
chdev.
!
!!
! Example
/* Call progress analysis with user-specified parameters */
#include <srllib.h>
#include <dxxxlib.h>
main()
{
int chdev;
DX_CAP capp;
.
.
/* 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 */
} else {
/* Clear DX_CAP structure */
dx_clrcap(&capp);
/* Set the DX_CAP structure as needed for call progress analysis.
* Allow 3 rings before no answer.
*/
capp.ca_nbrdna = 3;
/* Perform the outbound dial with call progress analysis enabled. */
if (dx_dial(chdev,"5551212",&capp,DX_CALLP|EV_SYNC) == -1) {
/* perform error routine */
}
}
.
.
/* Examine last call progress termination on the device */
switch (ATDX_CPTERM(chdev)) {
case CR_CNCT: /* Call Connected, get some additional info */
.
.
break;
case CR_CEPT: /* Operator Intercept detected */