-
June 19th, 2002, 02:30 PM
#1
Catching the Tones and Digits in Calls (Tapi)
Hello.
I am implementing the call using Tapi.
I already I have the call, Now I want to put posibilities to the Responser (People) in my application.
Example: I make a ordinal (voice) call and I have a TextToSpeech machine for read my text, I need to know what is the elected option.
The interaction consist pressing Digit Number or *, #...
I need to cacth the Digital Tones and Digital Numbers using API (Tapi) Functions.
How do it?
Thanks a lot.
joseluisbz@bigfoot.com
Please Response to:joseluisbz@bigfoot.com
http://www.bigfoot.com/~joseluisbz
-
June 28th, 2002, 06:08 AM
#2
So would I like to know. This has been bugging me, folks say I need to open the wave device and interpret the suff comming in.
That sounds like rocket science to me any other ideas?
-
October 27th, 2002, 04:57 PM
#3
TAPI 3?
R u using TAPI 3.0 for ur project? if yes then notify me i can help.
Aamir
-
October 28th, 2002, 02:31 AM
#4
Hi, thanks.
We are using Unimodem V. I have got a test app at the moment that does not actually give me the tones, but on a port monitor, I can see that the tones are being interpreted by the modem.
I would do my own research, it just so happens it has taken 3 weeks to get this far. TAPI is not walk in the park. I also have problems deciding what modem to get, do U have any recommendations?
-
October 28th, 2002, 05:56 AM
#5
I asked u in advance that r u using TAPI 3.0? because if yes then i may solve ur problem. And assuming if u r using TAPI 3 here is the solution to ur question.
There is an interface named "ITLegacyCallMediaControl" in tapi, u need to access this interface. Here is the sample code.
ITLegacyCallMediaControl *gplcmc; //defined global
ITBasicCallControl *gpCall;// defined global
// write this code in the part where u r entertaining an incoming call which has just arrieved
if(gplcmc == NULL)
{
gpCall->QueryInterface(IID_ITLegacyCallMediaControl,
(void **) &gplcmc);
gplcmc->DetectDigits(LINEDIGITMODE_DTMF);// start listening for digits
gplcmc->Release();
gplcmc = NULL;
}
u also must tell tapi that u want to listen for DTMF digits, for this purpose register "TE_DIGITEVENT" with other events.
gpTapi->put_EventFilter( TE_CALLNOTIFICATION | TE_CALLSTATE
| TE_CALLMEDIA | TE_DIGITEVENT );
and now u will receive an event "TE_DIGITEVENT" whenever user (on the other end, which may b a telefone or some Telephony software) presses some digit, to get the digit pressed by user use this code in ur application.
ITDigitDetectionEvent *pdde;
char dtmf;
pEvent->QueryInterface(IID_ITDigitDetectionEvent, (void **)&pdde);
pdde->get_Digit((unsigned char *)&dtmf);
pdde->Release();
and now u have the digit pressed by the user in "dtmf" here pEvent is the object associated with this event (in this case it was "ITDigitDetectionEvent").
if u have any problem in this code just ask 4 it!
Aamir!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|