AddTapi.NET Developer's Manual
CallConnected Event
NamespacesTraysoft.AddTapiTapiAppCallConnected
Occurs when a call has been established and the connection is made.
Declaration Syntax
C#Visual BasicVisual C++
public static event TapiEventHandler CallConnected
Public Shared Event CallConnected As TapiEventHandler
public:
static  event TapiEventHandler^ CallConnected {
	void add (TapiEventHandler^ value);
	void remove (TapiEventHandler^ value);
}
Remarks
This event occurs when connection to a remote party has been established. For incoming calls, this event is fired after the call has been answered. For outgoing calls, this event is fired after the call has been answered if the line supports predictive dialing (also called hardware answer detection). Most voice modems do not support predictive dialing and report that the call is connected immediately after the number has been dialed, before called party picks up the phone. In such case this event is fired before outgoing call is actually answered.
Note:
In Windows Forms application 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 controls from the event handler without using Invoke mechanism.
Examples
The following code shows how to process CallConnected event.

C#

            TapiApp.Initialize("MyApp");
            TapiApp.CallConnected += OnCallConnected;
            ...
            
            void OnCallConnected(object sender, TapiEventArgs args)
            {
                // Display a message to the user
                Console.WriteLine("Call connected on line {0}", args.Line.Name);
            }
            

VB.NET

            TapiApp.Initialize("MyApp")
            AddHandler TapiApp.CallConnected, AddressOf OnCallConnected
            ...
            
            Private Sub OnCallConnected(ByVal sender As Object, ByVal args As TapiEventArgs)
                ' Display a message to the user
                Console.WriteLine("Call connected on line {0}", args.Line.Name)
            End Sub
            

Assembly: Traysoft.AddTapi (Module: Traysoft.AddTapi)