Tuesday, October 9, 2007

TAPI 2.x


The TAPI DLLs, along with the TAPI Server (Tapisvr.exe), are crucial abstractions separating end-user or server applications from service providers. A TAPI DLL in conjunction with the TAPI Server provides a consistent interface between these two layers.

A TAPI application loads the appropriate DLL into its process space. During initialization, TAPI establishes an RPC link with Tapisvr.exe. In Windows Server 2003 family, Windows XP, and Windows 2000, the TAPI Server runs in the context of SVCHOST. In Windows NT, the TAPI Server runs as a separate service.

There are three DLLs associated with TAPI: Tapi.dll, Tapi32.dll, and Tapi3.dll. These DLLs are located in %SystemRoot%\system32. The following figure illustrates the roles of their respective roles in Microsoft Telephony:

Roles of the three TAPI DLLs

Existing 16-bit applications link to Tapi.dll. In Windows Server 2003 family, Windows XP, Windows 2000, Windows NT, Windows Millennium Edition, and Windows 98, Tapi.dll is simply a thunk layer that maps 16-bit addresses to 32-bit addresses and pass requests to Tapi32.dll. In Windows 95 and Windows 3.1, this DLL is the core of Windows Telephony.

Existing 32-bit TAPI 2.x applications link to Tapi32.dll. In Windows Server 2003 family, Windows XP, Windows 2000, Windows NT, Windows Millennium Edition, and Windows 98, Tapi32.dll is a thin marshaling layer that transfers function requests to the TAPI Server (TAPISRV) and, when needed, loads and invokes media service provider DLLs in the application's process. In Windows 95, Tapi32.dll is a thunk layer to Tapi.dll.

TAPI 3.x applications link to Tapi3.dll.
TAPI Functions

The following sections contain an alphabetic list of functions grouped by area. The information for each function includes a list of the valid call states on entry of the function and typical call state transitions when the request is complete.

* Assisted Telephony Functions
* Call Center Functions
* Line Device Functions
* Phone Device Functions

For TAPI functions categorized by service level and task, see TAPI Quick Function Reference.

Please note that service provider limitations may exist concerning the actual states in which a function can be performed. Applications must check the dwCallFeatures member in the LINECALLSTATUS structure, the dwAddressFeatures member in the LINEADDRESSSTATUS structure, and the dwLineFeatures member in the LINEDEVSTATUS structure to determine whether or not a function is permitted within the current call state.
Here I am particular on Phone Device Functions:

TAPI supports the following phone device functions:

* phoneCallbackFunc
* phoneClose
* phoneConfigDialog
* phoneDevSpecific
* phoneGetButtonInfo
* phoneGetData
* phoneGetDevCaps
* phoneGetDisplay
* phoneGetGain
* phoneGetHookSwitch
* phoneGetIcon
* phoneGetID
* phoneGetLamp
* phoneGetMessage
* phoneGetRing
* phoneGetStatus
* phoneGetStatusMessages
* phoneGetVolume
* phoneInitialize
* phoneInitializeEx
* phoneNegotiateAPIVersion
* phoneNegotiateExtVersion
* phoneOpen
* phoneSetButtonInfo
* phoneSetData
* phoneSetDisplay
* phoneSetGain
* phoneSetHookSwitch
* phoneSetLamp
* phoneSetRing
* phoneSetStatusMessages
* phoneSetVolume
* phoneShutdown

No comments: