TAPI stands for Telephony Application Programming Interface and is a programming standard provided by Microsoft within their Windows operating system. For a modem to work with Windows TAPI, the modem must have voice drivers and sound devices. The voice drivers are interfaced with Win 9x/Me through UniModem/V (and Win 2k/XP through UniModem 5), Windows' universal modem voice drivers. Audio devices (or Wave Devices) for the voice modem are usually provided by the manufacturer.
The following material presents overview information specific to using TAPI in Smart Phone Recorder programming.
First of all we have to initialize TAPI lines and get handle so we call: lineInitialize()
Then negotiate and cache API versions for each line: lineNegotiateAPIVersion()
Open the specified line: lineOpen()
Use lineAnswer() to answer an incoming call and lineMakeCall() to dial out.
Use lineDrop() to stop a call.
After that we can catch all TAPI events such as
LINECALLINFOSTATE_CALLERID -> call lineGetCallInfo() to get the caller's number and name
LINE_LINEDEVSTATE -> you may catch the ringing event LINEDEVSTATE_RINGING
LINE_CALLSTATE -> you may catch the events such as:
LINECALLSTATE_IDLE -> call lineDeallocateCall() to deallocate the specified call
LINECALLSTATE_OFFERING -> an incoming call is ringing
LINECALLSTATE_CONNECTED -> call lineMonitorDigits() to enable digit detecting
LINECALLSTATE_DISCONNECTED -> call is disconnected
LINE_MONITORDIGITS -> A digit is detected
Don't forget to close all opened lines before the program exit: lineClose()
And shutdown the TAPI interface: lineShutdown()
The process of using TAPI is not so simple. You have to deal with a lot of parameters. If you want to develop an application in a short time you may think about using third party TAPI components such as:
hbTAPI Component VoiceAngel TAPI Component.
Also you may search the web for more information here:
Recommended Voice Modems:
Copyright 2000-2011 KenGolf.com. All rights reserved