Click or drag to resize
TapiAppDigitDetected Event
Notifies the application about DTMF digit detected on a line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 6.0.0.1110
Syntax
public static event TapiDigitDetectedEventHandler DigitDetected

Value

Type: Traysoft.AddTapiTapiDigitDetectedEventHandler
Remarks

DigitDetected event is used to notify the application about DTMF digits detected during the call. The telephony hardware must support DTMF detection for this event to work. DigitDetected event provides alternative asynchronous mechanism for processing user input during the call. WaitForDigit(Int32) and GatherDigits(Int32, String, Int32, Int32) are easier to use synchronous methods that your application can use for the same purpose.

Note Note
In Windows Forms and WPF applications AddTapi.NET executes the handler of this event on the main thread of the application (the thread that called Initialize(String)). It is safe to access Windows Forms or WPF controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to handle DigitDetected event.
TapiApp.Initialize("MyApp");
TapiApp.DigitDetected += OnDigitDetected;
...

void OnDigitDetected(object sender, TapiDigitDetectedEventArgs args)
{
    Console.WriteLine("Digit {0} detected on line {1}", args.Digit, args.Line.Name);
}
See Also