catching the Tones and Digits in Call (TAPI 3.0)
Hi
i am making an application with tapi which will catch the key pressed by user in a call, i m learning tapi and after 2 months i have succeeded in Making Call, Recieving call in Tapi
now i want to catch the tones/Digits Pressed BY User in a call, If anyone have some code please share with me
Thanks in Advance
[335 byte] By [
umerkk] at [2007-11-20 11:22:46]

# 2 Re: catching the Tones and Digits in Call (TAPI 3.0)
Exceltel uses its own Component to do these things,, i need Original Tapi Code,, Not using any Third Party thing, I saw a post in this forum which teaches how to collect Digits, But that is in C#, and i dont know how to convert it into Vb.net,,, By the way, here is that code
*********************************************************************
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 anyone could convert it into Vb.net code and let me know
umerkk at 2007-11-10 3:09:14 >

# 4 Re: catching the Tones and Digits in Call (TAPI 3.0)
http://www.codeproject.com/useritems/CShart_TAPI_3x.asp
Does most of it. 3rd hit on Google.
Not Usefull, Is there anyone who could just write the above code in vb.net?
umerkk at 2007-11-10 3:11:24 >
