
Description | Cautions | Example | Errors | See Also
Name: |
long ATDX_CPTERM(chdev) | |
Inputs: |
int chdev |
|
Returns: |
last Call Analysis termination if successful | |
Includes: |
srllib.h | |
Category: |
Extended Attribute | |
The ATDX_CPTERM( ) function returns thelast result of Call Progress termination on the channel chdev. Call this function to determine the call status after dialing out with Call Analysis enabled.
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( ). |
Possible return values are the following:
CR_ERROR |
None.
/* Call Analysis with user-specified parameters */
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.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 analysis.
* Allow 3 rings before no answer.
*/
capp.ca_nbrdna = 3;
/* Perform the outbound dial with call 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 */
.
.
break;
.
.
case AT_FAILURE: /* Error */
}
}
This function will fail and return AT_FAILURE if an invalid channel device handle is specified in chdev.
Related to Call Analysis:
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation