
Description | Cautions | Example | Errors | See Also
Name: |
int dx_blddt(tid,freq1,fq1dev,freq2,fq2dev,mode) | |
Inputs: |
unsigned int tid |
|
unsigned int freq1 |
| |
unsigned int fq1dev |
| |
unsigned int freq2 |
| |
unsigned int fq2dev |
| |
unsigned int mode |
| |
Returns: |
0 if success | |
-1 if failure | ||
Includes: |
srllib.h | |
Category: |
Global Tone Detection | |
The dx_blddt( ) function defines a user-defined dual-frequency tone. Subsequent calls to dx_addtone( ) will enable detection of this tone, until another tone is defined.
Issuing a dx_blddt( ) 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 tone on a channel.
Parameter |
Description |
tid |
|
| |
freq1 |
|
frq1dev |
specifies the allowable deviation for the first frequency (in Hz). |
freq2 |
|
frq2dev |
specifies the allowable deviation for the second frequency (in Hz) |
mode |
specifies whether tone detection notification will occur 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_1 101
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 Dual Tone Frequency Tone of 950-
* 1050 Hz and 475-525 Hz using leading edge detection.
*/
if ( dx_blddt( TID_1, 1000, 50, 500, 25, TN_LEADING ) == -1 ) {
printf( "Unable to build a Dual 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