
Description | Cautions | Example | Errors | See Also
Name: |
int dx_blddtcad(tid,freq1,fq1dev,freq2,fq2dev,ontime, | |
Inputs: |
unsigned int tid |
|
unsigned int freq1 |
| |
unsigned int fq1dev |
| |
unsigned int freq2 |
| |
unsigned int fq2dev |
| |
unsigned int ontime |
| |
unsigned int ontdev |
| |
unsigned int offtime |
| |
unsigned int offtdev |
| |
unsigned int repcnt |
| |
Returns: |
0 if success | |
-1 if failure | ||
Includes: |
srllib.h | |
Category: |
Global Tone Detection | |
The dx_blddtcad( ) function defines a user-defined dual frequency cadenced tone. Subsequent calls to dx_addtone( ) will use this tone, until another tone is defined.
A dual frequency cadence tone has dual frequency signals with specific on/off characteristics.
Issuing a dx_blddtcad( ) defines a new tone but dx_addtone( ) must be used to add the tone to the channel.
Use dx_addtone( ) to enable detection of the user-defined tone on a channel.
Parameter |
Description |
tid |
specifies a unique identifier for the tone. |
| |
freq1 |
specifies the first frequency (in Hz) for the tone |
frq1dev |
specifies the allowable deviation for the first frequency (in Hz). |
freq2 |
specifies the second frequency (in Hz) for the tone |
frq2dev |
specifies the allowable deviation for the second frequency (in Hz). |
ontime |
specifies the length of time for which the cadence is on (in 10ms units) |
ontdev |
specifies the allowable deviation for on time. (in 10ms units) |
offtime |
specifies the length of time for which the cadence is off (in 10ms units) |
offtdev |
specifies the allowable deviation for off time (in 10ms units). |
repcnt |
specifies the number of repetitions for the cadence (i.e. the number of times that an on/off signal is repeated). |
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
#define TID_2 102
main()
{
int dxxxdev;
/*
* Open the Voice Channel Device and Enable a Handler
*/
if ( ( dxxxdev = dx_open( "dxxxB1C1", NULL) ) == -1 ) {
perror( "dxxxB1C1" );
exit( 1 );
}
/*
* Describe a Dual Tone Frequency Tone of 950-1050 Hz
* and 475-525 Hz. On between 190-210 msecs and off
* 990-1010 msecs and a cadence of 3.
*/
if ( dx_blddtcad( TID_2, 1000, 50, 500, 25, 20, 1,
100, 1, 3 ) == -1 ) {
printf( "Unable to build a Dual Tone Cadence" );
printf( " Template\n");
}
/*
* Continue Processing
* .
* .
*/
/*
* Close the opened Voice Channel Device
*/
if ( dx_close( dxxxdev ) != 0 ) {
perror( "close" );
}
/* Terminate the Program */
exit( 0 );
}
None.
Global Tone Detection:
Building Tones:
Enabling Tone Detection:
R2MF Tones:
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation