Intel 05-1832-002 IP Phone User Manual


 
198 Voice API for Windows Operating Systems Library Reference — November 2003
dx_distone( ) — disable detection of a user-defined tone
!
!!
! Errors
If the function returns -1, use the Standard Runtime Library (SRL) Standard Attribute function
ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive
error message. One of the following error codes may be returned:
EDX_BADPARM
Invalid parameter
EDX_BADPROD
Function not supported on this board
EDX_SYSTEM
Error from operating system; use dx_fileerrno( ) to obtain error value
EDX_TNMSGSTATUS
Invalid message status setting
EDX_TONEID
Bad tone ID
!
!!
! Example
#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" );
}
/*
* Bind the Tone to the Channel
*/
if ( dx_addtone( dxxxdev, NULL, 0 ) == -1 ) {
printf( "Unable to Bind the Tone %d\n", TID_1 );
printf( "Lasterror = %d Err Msg = %s\n",
ATDV_LASTERR( dxxxdev ), ATDV_ERRMSGP( dxxxdev ) );
dx_close( dxxxdev );
exit( 1 );
}