AddTapi.NET Developer's Manual
OutgoingCall Event
NamespacesTraysoft.AddTapiTapiAppOutgoingCall
Occurs when a new outgoing call is detected.
Declaration Syntax
C#Visual BasicVisual C++
public static event TapiEventHandler OutgoingCall
Public Shared Event OutgoingCall As TapiEventHandler
public:
static  event TapiEventHandler^ OutgoingCall {
	void add (TapiEventHandler^ value);
	void remove (TapiEventHandler^ value);
}
Remarks
This event occurs when a new outgoing call is detected on the open line. Please note that voice modems cannot detect outgoing calls dialed from the attached phone.
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 OutgoingCall event.

C#

            TapiApp.Initialize("MyApp");
            TapiApp.OutgoingCall += OnOutgoingCall;
            ...
            
            void OnOutgoingCall(object sender, TapiEventArgs args)
            {
                // Display a message to the user
                Console.WriteLine("Outgoing call to {0} on line {1}", args.Call.CalledID, args.Line.Name);
            }
            

VB.NET

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

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