
Description | Cautions | Example | Errors | See Also
Name: |
int r2_creatfsig(chdev,forwardsig) | |
Inputs: |
int chdev |
|
int forwardsig |
| |
Returns: |
0 if success | |
-1 if failure | ||
Includes: |
srllib.h | |
dxxxlib.h | ||
Category: |
R2MF Convenience | |
r2_creatfsig( ) is a convenience function that defines and enables leading edge detection of an R2MF forward signal on a channel.
User-defined tone IDs 101 through 115 are used by this function.
For detailed information about R2MF signaling see the Voice Software Reference: Voice Features Guide.
|
Parameter |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
chdev |
specifies the valid channel device handle obtained when the channel was opened using dx_open( ). |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
forwardsig |
specifies the name of a Group I or Group II forward signal which provides the tone ID for detection of the associated R2MF tone (or tones). Set to R2_ALLSIG to enable detection of all 15 tones or set to one of the following defines:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
main()
{
int dxxxdev;
/*
* Open the Voice Channel Device and Enable a Handler
*/
if ( ( dxxxdev = dx_open( "dxxxB1C1", NULL) ) == -1 ) {
perror( "dxxxB1C1" );
exit( 1 );
}
/*
* Create all forward signals
*/
if ( r2_creatfsig( dxxxdev, R2_ALLFSIG ) == -1 ) {
printf( "Unable to Create the Forward Signals\n" );
printf( "Lasterror = %d Err Msg = %s\n",
ATDV_LASTERR( dxxxdev ), ATDV_ERRMSGP( dxxxdev ) );
dx_close( dxxxdev );
exit( 1 );
}
/*
* Continue Processing
* .
* .
* .
*/
/*
* Close the opened Voice Channel Device
*/
if ( dx_close( dxxxdev ) != 0 ) {
perror( "close" );
}
/* Terminate the Program */
exit( 0 );
}
If this function returns -1 to indicate failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following error reasons:
|
EDX_BADPARM |
|
EDX_BADPROD |
|
EDX_SYSTEM |
|
EDX_TONEID |
|
EDX_MAXTMPLT |
|
EDX_INVSUBCMD |
|
EDX_FREQDET |
|
EDX_CADENCE |
|
EDX_ASCII |
|
EDX_DIGTYPE |
|
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation