
Description | Cautions | Example | Errors | See Also
Name: |
long ATDX_FRQOUT(chdev) | |
Inputs: |
int chdev |
|
Returns: |
percentage frequency out-of bounds | |
Includes: |
srllib.h | |
Category: |
Extended Attribute | |
The ATDX_FRQOUT( ) function returns percentage of time SIT tone was out of bounds as specified by the range in the DX_CAP structure.
Upon detection of a frequency within the range specified in the DX_CAP structure ca_upperfrq and lower ca_lowerfrq, use this function to optimize the ca_refctfrq parameter (which sets the percentage of time that the frequency can be out of bounds).
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( ). |
This function is only for use with non-DSP boards. If you call it on a DSP board, it will return zero.
/* 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:
break;
.
.
}
}
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