| TAPIEx ActiveX Control v3.6 |

The MonitorTonesEx_Add method enables the detection of inband tones on this call. Each time when a specified tone is detected, OnToneDetected will be fired. It is the Software Simulation edition of MonitorTones_Add method.
MonitorTonesEx_Add method only add tone entry. Must use Record("MONITOR:TONES") to start the monitor. Use the MonitorTones_Clear method to clear the tone entries.
Function MonitorTones_Add( AppSpecific As Long, MinPeriodOn As Long, MinPeriodOff As Long, [Frequency1 As Long],[Frequency2 As Long], [Frequency3 As Long], [Frequency4 As Long], [MinAmpdB As Single], [MaxAmpdB As Single] ) As Boolean
Example:
' Decode the '0'-'#' DTMF keys
.MonitorTones_Add 1, 80, 80, 697, 1209, 0 ' "1"
.MonitorTones_Add 2, 80, 80, 697, 1336, 0 ' "2"
.MonitorTones_Add 3, 80, 80, 697, 1477, 0 ' "3"
.MonitorTones_Add 4, 80, 80, 770, 1209, 0 ' "4"
.MonitorTones_Add 5, 80, 80, 770, 1336, 0 ' "5"
.MonitorTones_Add 6, 80, 80, 770, 1477, 0 ' "6"
.MonitorTones_Add 7, 80, 80, 852, 1209, 0 ' "7"
.MonitorTones_Add 8, 80, 80, 852, 1336, 0 ' "8"
.MonitorTones_Add 9, 80, 80, 852, 1477, 0 ' "9"
.MonitorTones_Add 10, 80, 80, 941, 1209, 0 ' "*"
.MonitorTones_Add 0, 80, 80, 941, 1336, 0 ' "0"
.MonitorTones_Add 12, 80, 80, 941, 1477, 0 ' "#"
ITAPICall.Record("MONITOR:TONES") 'Start the monitoring
.MonitorTones_Add 1, 500, 500, 480, 620, 0, 0, -20 ' Monitor the 480Hz, 620Hz dual tone and it amplitude must >-20dB
.MonitorTones_Add 1, 500, 500, 350, 440, 0, -40, -12 ' Monitor the 350Hz, 440Hz dual tone and it amplitude must in range -12dB to -40dB
.MonitorTones_Add 1, 500, 500, 350, 440, 0, -20, 0 ' Monitor the 350Hz, 440Hz dual tone and it amplitude must < -20dB
' use feature of negation gate :
.MonitorTones_Add 1, 50, 50, -450 ' Monitor the non 450Hz signal (OnToneDetected will be fired if the signal neither in 450Hz nor silence for 50ms.)
.MonitorTones_Add 1, 50, 50, 480, -620 ' Monitor the 480Hz and non 620Hz signal
ITAPICall.Record("MONITOR:TONES") 'Start the monitoring