Intel 05-1832-002 IP Phone User Manual


 
68 Voice API for Windows Operating Systems Library Reference — November 2003
ATDX_CPERROR( ) — return the call progress analysis error
CR_OVRLPERR
overlap in selected SIT tones
CR_TMOUTOFF
timeout waiting for SIT tone to terminate (exceeds a ca_mxtimefrq parameter)
CR_TMOUTON
timeout waiting for SIT tone to commence
CR_UNEXPTN
unexpected SIT tone (the sequence of detected tones did not correspond to the SIT sequence)
CR_UPFRQERR
invalid upper frequency selection. This value must be nonzero for detection of any SIT.
!
!!
! Example
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
main()
{
int dxxxdev;
int cares;
/*
* Open the Voice Channel Device and Enable a Handler
*/
if ( ( dxxxdev = dx_open( "dxxxB1C1", NULL) ) == -1 ) {
perror( "dxxxB1C1" );
exit( 1 );
}
/*
* Take the phone off-hook
*/
if ( dx_sethook( dxxxdev, DX_OFFHOOK, EV_SYNC ) == -1 ) {
printf( "Unable to set the phone off-hook\n" );
printf( "Lasterror = %d Err Msg = %s\n",
ATDV_LASTERR( dxxxdev ), ATDV_ERRMSGP( dxxxdev ) );
dx_close( dxxxdev );
exit( 1 );
}
/*
* Perform an outbound dial with call progress analysis, using
* the default call progress analysis parameters.
*/
if((cares = dx_dial( dxxxdev,",84",(DX_CAP *) NULL, DX_CALLP )) == -1 ) {
printf( "Outbound dial failed - reason = %d\n",
ATDX_CPERROR( dxxxdev ) );
dx_close( dxxxdev );
exit( 1 );
}
/*
* Continue Processing
* .
* .
* .
*/