
Description | Cautions | Example | Errors | See Also
Name: |
long ATDX_ANSRSIZ(chdev) | |
Inputs: |
int chdev |
|
Returns: |
answer duration in 10 ms units if successful | |
Includes: |
srllib.h | |
Category: |
Extended Attribute | |
The ATDX_ANSRSIZ( ) function returns the duration of the answer that occurs when dx_dial( ) with Basic Call Analysis enabled is called on a channel. An answer is considered the period of non-silence that begins after cadence is broken and a connection is made. This measurement is taken before a connect event is returned. The duration of the answer can be used to determine if the call was answered by a person or an answering machine. This feature is based on the assumption that an answering machine typically answers a call with a longer greeting than a live person does.
See the Voice Software Reference: Voice Features Guide for information about how cadence detection parameters affect a connectand are used to distinguish between a live voice and a voice recorded on an answering machine.
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.
/* Call Analysis with user-specified parameters */
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
main()
{
int cares, 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 */
}
/* Set the DX_CAP structure as needed for call analysis. Perform the
* outbound dial with call analysis enabled
*/
if ((cares = dx_dial(chdev,"5551212",&capp,DX_CALLP|EV_SYNC)) == -1) {
/* perform error routine */
}
switch (cares) {
case CR_CNCT: /* Call Connected, get some additional info */
printf("\nDuration of short low - %ld ms",ATDX_SHORTLOW(chdev)*10);
printf("\nDuration of long low - %ld ms",ATDX_LONGLOW(chdev)*10);
printf("\nDuration of answer - %ld ms",ATDX_ANSRSIZ(chdev)*10);
break;
case CR_CEPT: /* Operator Intercept detected */
printf("\nFrequency detected - %ld Hz",ATDX_FRQHZ(chdev));
printf("\n%% of Frequency out of bounds - %ld Hz",ATDX_FRQOUT(chdev));
break;
case CR_BUSY:
.
.
}
}
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