Справочник Пользователя для Dialogic 05-0867-005
redefines a call progress tone’s attributes
cc_ToneRedefine( )
285
!
!
!
!
Termination Events
•
CCEV_TONEREDEFINE - indicates that the tone was successfully redefined
•
CCEV_TONEREDEFINEFAIL - indicates that the function failed
Use the SRL Event Management functions to handle the termination event.
!
!
!
!
Cautions
This function is not supported for the BRI/2 board or for PRI protocols.
!
!
!
!
Example
#include <windows.h>
/* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include <cclib.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <errno.h>
#include <cclib.h>
#include <srllib.h>
#include <dxxxlib.h>
main()
{
{
unsigned short sigType = 0x01;
int
int
devHdl;
toneParm
ToneParm;
/*
* Open the Voice Channel Device and Enable a Handler
*/
*/
if ( ( cc_Open(&devHdl, "briS1T1", 0) ) < 0 ) {
printf( "Error opening device : errno < %d\n”, errno );
exit( 1 );
exit( 1 );
}
ToneParm.freq1 = 330;
ToneParm.freq2 = 460;
ToneParm.amp1 = -10;
ToneParm.amp2 = -10;
ToneParm.toneOn1 = 400;
ToneParm.toneOff1 = 0;
ToneParm.duration = -1;
ToneParm.freq2 = 460;
ToneParm.amp1 = -10;
ToneParm.amp2 = -10;
ToneParm.toneOn1 = 400;
ToneParm.toneOff1 = 0;
ToneParm.duration = -1;
/*
* Redefine a dial tone to the internal template.
* This template has Frequency1 = 330,
* Frequency2 = 460, amplitude at -10dB for
* both frequencies and duration of infinity
* This template has Frequency1 = 330,
* Frequency2 = 460, amplitude at -10dB for
* both frequencies and duration of infinity
* This is a Panasonic Local Dial Tone.
*/
*/
cc_ToneRedefine(devHdl, sigType, &ToneParm, EV_SYNC );
/*
/*
* Continue Processing
*
*
.
*
.
*
.
*/
/*
* Close the opened Voice Channel Device