
Description | Cautions | Example
Name: |
long ATDX_CRTNID(chdev) | |
Inputs: |
int chdev |
|
Returns: |
identifier of the tone that caused the most recent Call Analysis termination, if successful | |
Includes: |
srllib.h | |
Category: |
Extended Attribute | |
The ATDX_CRTNID( ) function returns the last Call Progress termination of the tone that caused the most recent Call Analysis termination of the channel device. See the Voice Software Reference: Voice Features Guide for a description of PerfectCall Call Analysis.
The function parameter is defined as follows:
Parameter |
Description |
chdev |
specifies the valid Dialogic device handle obtained when a board or channel was opened using dx_open( ). |
Possible return values are the following:
| |
| |
| |
| |
| |
| |
| |
| |
|
None.
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
main()
{
DX_CAP cap_s;
int ddd, car;
char *chnam, *dialstrg;
chnam = "dxxxB1C1";
dialstrg = "L1234";
/*
* Open channel
*/
if ((ddd = dx_open( chnam, NULL )) == -1 ) {
/* handle error */
}
/*
* Delete any previous tones
*/
if ( dx_deltones(ddd) < 0 ) {
/* handle error */
}
/*
* Now enable Enhanced call progress with above changed settings.
*/
if (dx_initcallp( ddd )) {
/* handle error */
}
/*
* Set off Hook
*/
if ((dx_sethook( ddd, DX_OFFHOOK, EV_SYNC )) == -1) {
/* handle error */
}
/*
* Dial
*/
printf("Dialing %s\n", dialstrg );
car = dx_dial(ddd,dialstrg,(DX_CAP *)&cap_s,DX_CALLP|EV_SYNC);
if (car == -1) {
/* handle error */
}
switch( car ) {
case CR_NODIALTONE:
switch( ATDX_DTNFAIL(ddd) ) {
case 'L':
printf(" Unable to get Local dial tone\n");
break;
case 'I':
printf(" Unable to get International dial tone\n");
break;
case 'X':
printf(" Unable to get special eXtra dial tone\n");
break;
}
break;
case CR_BUSY:
printf(" %s engaged - %s detected\n", dialstrg,
(ATDX_CRTNID(ddd) == TID_BUSY1 ? "Busy 1" : "Busy 2") );
break;
case CR_CNCT:
printf(" Successful connection to %s\n", dialstrg );
break;
default:
break;
}
/*
* Set on Hook
*/
if ((dx_sethook( ddd, DX_ONHOOK, EV_SYNC )) == -1) {
/* handle error */
}
dx_close( ddd );
}
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation