
Description | Example | Cautions | Errors | See Also
Name: |
int dx_bldstcad(tid,freq,fqdev,ontime,ontdev,offtime, | |
Inputs: |
unsigned int tid |
|
unsigned int freq |
| |
unsigned int fqdev |
| |
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_bldstcad( ) function defines a user-defined single frequency cadenced tone. Subsequent calls to dx_addtone( ) will use this tone, until another tone is defined.
A single frequency cadence tone has single frequency signals with specific on/off characteristics.
Issuing a dx_bldstcad( ) 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. |
| |
freq |
specifies the frequency (in Hz) for the tone |
frqdev |
specifies the allowable deviation for the frequency (in Hz). |
ontime |
specifies the length of time for which the cadence is on. (10 ms units) |
ontdev |
specifies the allowable deviation for on time in 10 ms units. |
offtime |
specifies the length of time for which the cadence is off. (10 ms units) |
offtdev |
specifies the allowable deviation for off time in 10 ms 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_4 104
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 Single Tone Frequency Tone of 950-1050 Hz.
* On between 190-210 msecs and off 990-1010 msecs and
* a cadence of 3.
*/
if ( dx_bldstcad( TID_4, 1000, 50, 20, 1, 100, 1, 3 ) == -1 ) {
printf( "Unable to build a Single 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