
Description | Cautions | Example | See Also
Name: |
long ATDX_CPERROR(chdev) | |
Inputs: |
int chdev |
|
Returns: |
Call Analysis error | |
Includes: |
srllib.h | |
Category: |
Extended Attribute | |
The ATDX_CPERROR( ) function returns the Call Progress error that caused dx_dial( ) to terminate when checking for operator intercept SIT tones.
When dx_dial( ) terminates due to a Call Analysis error, CR_ERROR is returned by ATDX_CPTERM( ).
If CR_ERROR is returned, use ATDX_CPERROR( ) to determine the Call Analysis error. One of the following values will be returned:
| |
| |
| |
| |
| |
| |
| |
|
The function parameter is defined as follows:
Parameter |
Description |
chdev |
specifies the valid channel device handle obtained when the channel was opened using dx_open( ). |
None.
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.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 analysis, using
* the default call 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
* .
* .
* .
*/
/*
* Close the opened Voice Channel Device
*/
if ( dx_close( dxxxdev ) != 0 ) {
perror( "close" );
}
/* Terminate the Program */
exit( 0 );
}
Related to Call Analysis:
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation