Click or drag to resize
TapiAppCallInfo Event
Occurs when the call information about a call has changed.

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

Value

Type: Traysoft.AddTapiTapiCallInfoEventHandler
Remarks

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 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 CallInfo event.
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);
    }
}
See Also