Events (Telephony API)

Events are a crucial part of call handling under TAPI 3. Event handling includes four stages.

To register for and enable the reception of events

  1. Implement the ITTAPIEventNotification::Event method. (TAPI calls this method when an event occurs.) Typically, this implementation does no more than AddRef the IDispatch interface pointer, then post to the application's message pump.

  2. Register the ITTAPIEventNotification outgoing interface using the COM standard IConnectionPointContainer and IConnectionPoint interfaces, and pass the IConnectionPoint::Advise method a pointer to ITTAPIEventNotification::Event.

  3. Call the ITTAPI::put_EventFilter method to tell TAPI which events the application will handle. The event filter consists of ORed members of the TAPI_EVENT enumeration.


    You must call the ITTAPI::put_EventFilter method to set the event filter mask and enable reception of events. If you do not call ITTAPI::put_EventFilter, your application will not receive any events.


You must also call the ITTAPI::RegisterCallNotifications method for each address object on which the application will handle calls.

See Event Interfaces for a list of all event interfaces. See Register Events for code examples that illustrate the registration process and Receive a Call for a code example that shows one use of events.