
Description | Cautions | Example | Errors | See Also
Name: |
int dx_bldst(tid,freq,fqdev,mode) | |
Inputs: |
unsigned int tid |
|
unsigned int freq |
| |
unsigned int fqdev |
| |
unsigned int mode |
| |
Returns: |
0 if success | |
-1 if failure | ||
Includes: |
srllib.h | |
Category: |
Global Tone Detection | |
Mode: |
||
The dx_bldst( ) function defines a user-defined single frequency tone. Subsequent calls to dx_addtone( ) will use this tone, until another tone is defined.
Issuing a dx_bldst( ) 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). |
mode |
specifies whether detection is on the leading or trailing edge of the tone. Set to one of the following: |
| |
|
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
#define TID_3 103
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 Simple Single Tone Frequency Tone of
* 950-1050 Hz using trailing edge detection.
*/
if ( dx_bldst( TID_3, 1000, 50, TN_TRAILING ) == -1 ) {
printf( "Unable to build a Single Tone 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