TapiAppCallInfo Event |
Namespace: Traysoft.AddTapi
This event is fired when a telephony service provider reports that the call information has changed. Use CallInfoState property to find out which call information item(s) has changed.
CallInfo event can be fired before AddTapi.NET reports a new call using IncomingCall or OutgoingCall event. Most applications do not need to handle CallInfo event. AddTapi.NET automatically updates TapiCall object with new call information when needed. If the WaitForCallerID property is set to false, the application can use CallInfo event to receive notification when Caller ID information becomes available.
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. |
TapiApp.Initialize("MyApp"); TapiApp.CallInfo += OnCallInfo; ... void OnCallInfo(object sender, TapiCallInfoEventArgs args) { // Check if caller id is available and display to the user if ((args.CallInfoState & TapiCallInfoState.CallerID) != 0) { Console.WriteLine("CallerID={0}, CallerIDName={1}", args.Call.CallerID, args.Call.CallerIDName); } }