(Page 22 of 23 in this chapter) Version
typedef struct
{ DWORD size ; /* size of this structure */ DWORD freq1; /* first frequency (Hz) */ INT32 ampl1; /* level of first tone (dBm) */ DWORD freq2; /* second frequency (Hz) */ INT32 ampl2; /* level of second tone (dBm) */ DWORD ontime; /* on duration of DTMF tone (ms) */ DWORD offtime; /* off duration of DTMF tone (ms) */ INT32 iterations; /* times to repeat above; */
/* -1 = forever last offtime is */ /* trimmed if repeat>1 */ } CNF_TONE_PARMS;
extern CNFRESOURCEHD cnfresourcehd;
int myConferenceTone( DWORD confid )
{
CTA_EVENT event;
CNF_TONE_PARMS toneparms;
// Fill the tone structure
toneparms.size = sizeof(CNF_TONE_PARMS);
toneparms.freq1 = 1000;
toneparms.ampl1 = -20;
toneparms.freq2 = 500;
toneparms.ampl2 = -20;
toneparms.ontime = 200;
toneparms.offtime = 200;
toneparms.iterations = 2;
cnfStartTone ( cnfresourcehd, confid, &toneparms);
do
{
myGetEvent( &event ); /* see ctaWaitEvent example */
} while( event.id != CNFEVN_TONE_DONE );
if( CTA_IS_ERROR( event.value ) )
return MYFAILURE; /* API error */
else
return SUCCESS; /* started successfully */
}
(Page 22 of 23 in this chapter) Version