CTI32 Class Library

cti.SetGlobalTone Method 

Sets up a global tone detection template. This is helpful in detecting a fax machine tone.

[Visual Basic]
Public Shared Function SetGlobalTone( _
   ByVal toneId As Integer, _
   ByVal freq1 As Integer, _
   ByVal freq1dev As Integer, _
   ByVal freq2 As Integer, _
   ByVal freq2dev As Integer, _
   ByVal ontime As Integer, _
   ByVal ontimedev As Integer, _
   ByVal offtime As Integer, _
   ByVal offtimedev As Integer, _
   ByVal repeating As Integer, _
   ByVal trailEdge As Integer _
) As Integer
[C#]
public static int SetGlobalTone(
   int toneId,
   int freq1,
   int freq1dev,
   int freq2,
   int freq2dev,
   int ontime,
   int ontimedev,
   int offtime,
   int offtimedev,
   int repeating,
   int trailEdge
);

Parameters

toneId
‘A’ – ‘Z’. This identifies the template name. You can then use this character in the digit mask of a Play or GetDigits
freq1
In Hz
freq1dev
In Hz – Deviation of the first frequency.
freq2
Hz. Set this to 0 if you are defining a single tone
freq2dev
In Hz
ontime
Tone On-time in 10ms increments (10 = 100ms) Set this to 0 if this is not a cadenced tone
ontimedev
Tone On-time deviation in 10ms increments
offtime
Tone Off-time in 10ms increments (10= 100ms)
offtimedev
Tone Off-time deviation in 10ms increments
repeating
Number of repetitions if cadence
trailEdge
Normally send in a 0 here. If you want a non-cadenced tone to trigger on the trailing edge, then set this to 1.

Return Value

0=success -1=error

See Also

cti Class | CTI32NetLib Namespace