Introduction to Telephone API (TAPI)

< BACK  NEXT >
[oR]

The Telephone API (TAPI) provides control over making, maintaining, and terminating calls over a wide range of telephonic devices. With Windows CE, the most common telephonic devices are modems linked to an ordinary telephone line or a modem connected to a GSM or other mobile telephone device. By using TAPI you no longer have to work with the AT modem commands, or whatever else your telephone device supports TAPI provides API functions to manage these functions and look after differences between various telephonic devices. TAPI is independent of the underlying telephone network and equipment.

Applications using TAPI features make calls into tapi.dll, and this in turn calls functions in the appropriate service provider DLLs using the Telephone Service Provider Interface (TSPI). These service provider DLLs communicate directly with the telephone equipment. As application developers you do not need to worry about TSPI you only call TAPI functions.

When using TAPI you will deal with line devices and phone devices:

  • Line devices are device-independent representation of a physical phone line. A line device can contain one or more communication channels between the device and the network.

  • Phone devices are the abstraction of the handset this includes the earpiece, the microphone, the ringer, and volume controls.

Generally, and in most cases with Windows CE, there is a single phone device associated with a line device. However, this is not always the case. With ISDN (Integrated Services Digital Network) a single line device can support several channels and therefore several phone devices (for example, a voice call and a data call) at the same time. Most of the programming with TAPI deals with managing the line device, and all the code presented in this chapter assumes that there is a single phone device associated with the line device.

While TAPI can be used for any telephone device for which a service provider DLL is provided, most of the devices used with Windows CE devices use AT command-based modems. A Unimodem driver is included with Windows CE to support such devices. Registry entries are used to specify the precise AT command sequences that are required by a specific modem device tocarry out a particular function. These are stored in a sub-key under HKEY_LOCAL_MACHINE\Drivers\PCMCIA with a name representing the modem. In general, applications that use TAPI do not need to be concerned about these entries or the differences between individual modems.

The TAPI code samples in this chapter show how to do the following:

  • Initialize and shut down a line device

  • Enumerate the devices available to TAPI

  • Open a line device

  • Translate telephone numbers from their canonical to dialable form

  • Make a call

  • Close down a call

  • Send and receive data using serial communications through a call setup by TAPI

The capabilities of a particular device will depend very much on the facilities provided by the service provider DLL. Code in this chapter shows how to determine these capabilities. As with most facilities in Windows CE, TAPI does not provide all the functions that are available to desktop implementations.


< BACK  NEXT >


Windows CE 3. 0 Application Programming
Windows CE 3.0: Application Programming (Prentice Hall Series on Microsoft Technologies)
ISBN: 0130255920
EAN: 2147483647
Year: 2002
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net