TAPI Programming on Windows Mobile

Download the source code

TAPI stands for Telephony Application Programming Interface. TAPI is the Microsoft implementation of CTI (Computer Telephony Interface). TAPI provides a common interface to communicate and control a telephony device. TAPI simplifies the telephony programming since the programmer does not require detailed information about the hardware he/she is using.

Windows Mobile 5 support TAPI version 2.0. The version 2.0 brings telephony support to any Windows CE applications. The TAPI.DLL file exposes all the TAPI functions. The header file TAPI.H contains the all the function definitions, typedefs, #defines, etc… The application links to COREDLL.DLL file which redirects the calls to TAPI.DLL. The TAPI.DLL uses the TAPI Service Provider DLLs to communicate with the hardware. The TAPI Service Provider (TSP) is the driver for the hardware. Microsoft supplies default Unimodem TSP. The Unimodem TSP supports all the common telephony hardware. If your telephony hardware is not a common one, then you should have the vendor supplied TSP in order to work with TAPI.

All the application that uses TAPI should load and initialize the required DLL file. This is done through the API lineInitialize or lineInitializeEx. When initializing you have to give a callback function. This function will be called whenever a telephony event occurs such as incoming call, call connected, when the user presses a digit after the call is connected, etc… After initializing we need to negotiate the API. This is to ensure that the current TAPI system version and the version that the application is using overlaps. If the application version and the current TAPI versions are incompatible, then we will not be able to use the TAPI.

After the version is negotiated, we do different tasks like monitor a telephone line; initiate a call, etc… The sample presented here is a simple application to monitor the cellular telephone line. The application opens the cellular line and monitor for events and preset it to the use. The events along with other parameters will be displayed in a list box. Yes, I agree that no one will use this application for any serious purpose but for demonstrating TAPI application modal, I suppose this example is enough.

The application is created using Microsoft Visual Studio 2008 and only tested on Windows Mobile 6.1. I am sorry to say that I didn’t get time to comment the application. I will try to create a useful application and post it here when I get time.

1 Comment

Add yours →

  1. Dear Sir, I have been working to develop a Voice Encryption Software on windows mobile using CSD line. I understood that it can only be done using TAPI, and I successfully make Data Call. But I failed to answer the call, and couldn’t identify the problem. Can you please suggest how to solve the problem or how can i develop the application. If you know any company which can give me a training please inform me.
    looking forward to hearing from you.

Leave a Reply