4.1 Messages

This chapter contains a list of the messages in the Telephony Service Provider Interface (TSPI). Messages are used to notify the TAPI DLL of the occurrence of asynchronous events that spontaneously occur within the Service Provider. The Service Provider passes these events to the TAPI DLL by calling a LINEEVENT or PHONEEVENT callback function depending on whether the Service Provider is reporting an event on a line, call or phone device. The LINEEVENT procedure for reporting events occurring on a line or call is supplied to the Service Provider at the time the line is opened with the TSPI_lineOpen function. The PHONEEVENT procedure for reporting events occurring on a phone is supplied with the TSPI_phoneOpen function.

These spontaneous events are unsolicited by the TAPI DLL in the sense that they are not a direct response to any request. These contrast with events reporting completion of requests made by the TAPI DLL. Such completion events are reported through the ASYNC_LINE_COMPLETION or ASYNC_PHONE_COMPLETION callback functions as described in the "Functions" chapter.

The parameter profiles for the spontaneous event procedures include parameters that identify the relevant object for which the event is being reported (phone, line, or call). The identification is in the form of an opaque handle whose exact interpretation is not published by the TSPI. The TAPI DLL internally determines the relationship between these opaque handles and whatever data structures it used to represent the devices.

The parameter profile for spontaneous event procedures also includes a message parameter identifying the type of the message. Each message type has a corresponding definition that determines what handles are included, along with what other parameters and their meanings. There is a very strong correspondence between the messages appearing at the TSPI level and those that appear at the TAPI level. The general rules of correspondence are as follows: