AddTapi.NET Developer's Manual
CallDisconnected Event
NamespacesTraysoft.AddTapiTapiAppCallDisconnected
Occurs when a call has been disconnected.
Declaration Syntax
C#Visual BasicVisual C++
public static event TapiEventHandler CallDisconnected
Public Shared Event CallDisconnected As TapiEventHandler
public:
static  event TapiEventHandler^ CallDisconnected {
	void add (TapiEventHandler^ value);
	void remove (TapiEventHandler^ value);
}
Remarks
This event occurs when a call has been disconnected, either by AddTapi.NET, telephony hardware or the remote party. This event is fired when remote party hangs up the phone. It might take 10-20 seconds for the telephony hardware to detect that the remote party hung up. In addition, this event is also fired when outgoing call cannot be completed because there is no dailtone, a busy signal was detected or if the called party did not answer within the time interval set in NoAnswerTimeout property. After CallDisconnected event occurs, another outgoing call can be placed on the same line.
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 CallDisconnected event.

C#

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

VB.NET

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

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