
Description | Cautions | Example | See Also
Name: |
long ATDX_FRQHZ(chdev) | |
Inputs: |
int chdev |
|
Returns: |
first tone frequency in hz | |
Includes: |
srllib.h | |
Category: |
Extended Attribute | |
The ATDX_FRQHZ( ) function returns the frequency of the first SIT tone in Hz after dx_dial( ) terminated due to an Operator Intercept.
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.
This example illustrates the use of ATDX_FRQHZ( ), ATDX_FRQHZ2( ), and ATDX_FRQHZ3( ).
/* 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("\nFirst frequency detected - %ld Hz",ATDX_FRQHZ(chdev));
printf("\nSecond frequency detected - %ld Hz", ATDX_FRQHZ2(chdev));
printf("\nThird frequency detected - %ld Hz", ATDX_FRQHZ3(chdev));
printf("\nDuration of first frequency - %ld ms", ATDX_FRQDUR(chdev));
printf("\nDuration of second frequency - %ld ms",
ATDX_FRQDUR2(chdev));
printf("\nDuration of third frequency - %ld ms", ATDX_FRQDUR3(chdev));
break;
case CR_BUSY:
break;
.
.
}
}
Related to Call Analysis:
SIT Tone Detection:
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation