Coding Tips
Detect DTMF digit using Telephony API (TAPI)
If you are developing TAPI compliant software for Phone Blaster, one
feature you would probably use is the DTMF digits detection. For example,
if you were to create an auto-answering machine software, then
your application would need to detect the DTMF digits. The implementation
is quite simple and straight forward. You can use the function
lineMonitorDigits to enable the unbuffered detection of digits.
You can call this function when the call has been established and the
connection is made. Here is a sample code fragment:
case LINE_CALLSTATE:
...
...
switch(dwParam1) :
{
case LINECALLSTATE_CONNECTED:
...
lineMonitorDigits(hCall, LINEDIGITMODE_DTMFEND) ;
...
break ;
}
break ;
Within the callback function, your application can then monitor the
message LINE_MONITORDIGITS which is sent to application whenever a digit
is detected.
case LINE_MONITORDIGITS:
// add the message processing code here.
break ;
©1996
Creative Labs, Inc.