TAPI Telephony Application Basics
The Microsoft Windows Telephony Application Programming Interface (TAPI) is an integral but unappreciated part of Microsoft Windows 95/98/NT 4 and 2000. It is both a programming interface, and an arbitrator that allows multiple applications to share a single telephony device. It also offers a standard interface to communications devices, such as modems and specialized telephony boards, from different vendors. Before TAPI was introduced (with Windows 95), manufacturers of telephony hardware and third-party developers created hardware-dependent applications. In response to the influence of Microsoft, however, most manufacturers are distributing drivers to make their hardware compatible with TAPI-compliant applications.
Telephony applications fall into two basic categories, desktop and server. Desktop telephony applications allow the user to directly interact with the computer telephony hardware. Server-based telephony applications are completely automated systems, which in many cases support multiple telephone lines simultaneously. Fortunately ExceleTel TeleTools supports both types of applications well.
Understanding telephony hardware is not so easy! There are 5 basic types of telephony hardware:
and some interesting sidelines:
Desktop applications require hardware that allows a user to interact directly with the telephony device. Call center agents, executive desktops, and SOHOís are but a few types of desktop computer telephony applications.
Desktop telephony hardware offers access to the TAPI line device features found in the TeleTools etLine component and the TAPI phone device features encapsulated by etPhone. This allows you to not only make and receive calls but you also have control over the Speakerphone, Handset and Headset features of the device.
Server-based applications require hardware that allows telephone calls to be made and answered automatically without human intervention. This is a very tall order considering all of the variables involved in any given phone call. In many cases server-based telephony applications are required to support multiple telephone lines, capture DTMF tones, play and record wave files, monitor for silence and much more.
Many phone systems offer proprietary telephony hardware that allow the for computer telephony integration at the desktop and in some cases on the server. Check with your phone systemís manufacturer to see if they have Microsoft TAPI support for the system. You can also refer to our Telephony Hardware Support pages.
In most cases a standard data or fax/data modem is insufficient and a voice modem is required. However, voice modems have their limitations.
UnimodemV is the Telephony Service Provider (TSP) supplied by Microsoft that allows voice modems to work with Microsoft's Telephony Application Programming Interface (TAPI). UnimodemV is not available for NT 4.0. It is only available for Windows 95/98/2000.
Modem manufactures supply INF files with their modems. The information in the INF files is transferred to the Windows Registry when the modem is installed. This information contains the commands and responses for the modem. These are the instructions used by UnimodemV allowing the modem to be used with TAPI. You should check with your modem manufacturer to see if they have updated INF files for your modem. In many cases the INF files available on their web site. From time to time manufacturers may update these files so be sure to check regularly.
Voice modems are not capable of outbound Call Progress Monitoring (CPM). Therefore the etLine.OnConnected event is called immediately after dialing is complete. This is a limitation of modems and the UnimodemV Telephony Service Provider (TSP) supplied by Microsoft. If your application requires outbound CPM then you will need to look at a more sophisticated telephony card.
UnimodemV is limited to using the wave format "PCM 8000 Hz, 16 Bit, Mono". This is the default format for the TeleTools etRecord component. All of the wave files supplied with TeleTools are in this format. Other sophisticated telephony devices support a wider range of wave formats. Not all modems are created equal! Sound quality and features supported vary widely even when the same chip-set is utilized.
Microsoft does not have an API for sending and receiving faxes through TAPI at this time. Therefore, TeleTools cannot take advantage of the more sophisticated fax hardware. However Microsoft does provide a Pass Through method of accessing modemsí AT command set directly.
With TAPI and TeleTools you have two options for working with fax modems. One is to handoff inbound fax calls to another application that can handle the actual receiving of the fax data. The Microsoft Fax application is part of the Messaging API known as MAPI. Microsoft Fax is normally used in conjunction with a mail client application such as Microsoft Outlook. Utilizing this option does not allow you to send faxes. You will need to utilize MAPI to send outbound faxes.
The second option for sending and receiving faxes is to utilize a third party Fax tool that works with TeleTools to access the modem's AT command set. To create a seamless TAPI/FAX solution, ExceleTel teamed up with Data Techniques, the leading FAX controls vendor. For additional information, please see our article on TAPI and Faxing.
Often, developers would like to create an application that dynamically "speaks" text rather that play pre-recorded wave files. Or, they have a desire to use speech recognition to understand user responses instead of or in addition to monitoring for pressed DTMF digits. TAPI is designed to handle calls, there is no direct speech capability built into the API. There isn't even wave file capability included. But fortunately, this isn't necessary. Windows already has a rich Multimedia Sound API and a SAPI speech SDK. TeleTools takes advantage of both by integrating sophisticated wave play and record capabilities into our etPlay and etRecord controls. Since Text-To-Speech (TTS) and Speech Recognition (SR) are handles as wave format data, it is easy to incorporate speech into your application.