2.4.1.4 Opening and Closing Line Devices

After having performed basic initialization and possibly having retrieved device capabilities, the TAPI DLL must open the line device before it can access telephony functions on that line. When a line device has been opened successfully, the TAPI DLL is returned a handle representing the open line.

TSPI_lineOpen

Opens a specified line device for providing subsequent monitoring and/or control of the line.

TSPI_lineClose

Closes a specified opened line device.

At the TAPI level, a line device can be specified to lineOpen in one of two ways:

To support LINE_MAPPER selection of lines, the Service Provider provides the function TSPI_lineConditionalMediaDetection. This function indivisibly does two things: (1) it test for the ability of a line to support the requested call parameters and media mode, and (2) if successful, it commits the Service Provider to monitoring for the new media mode. The TAPI DLL uses this function for different line devices to hunt for a line that meets the application's Open requirements.

TSPI_lineConditionalMediaDetection

Commits the Service Provider to the new media mode detection if it has the ability to support both this and the indicated call parameters.