Print Page | Close Window

DTMF detection

Printed From: Way2call Communications
Category: Hi-Phone Software Development Kit (SDK)
Forum Name: Hi-Phone DLL
Forum Description: Discussion on the Hi-Phone product family, its DLL, samples and development tools
URL: http://www.way2call.com/forum/forum_posts.asp?TID=37
Printed Date: Apr 22 2024 at 8:34am


Topic: DTMF detection
Posted By: jaco
Subject: DTMF detection
Date Posted: Oct 06 2009 at 2:47pm
Hi to all.

I'm using the dll library and C++ Builder (2010) to control the usb modem.
By the way the API is very well developed and it's really a professional work. Respect.
The documentation could be better thought and it would be great if you publish the code for the w2cMultiTestApp.exe.

I have a problem regarding dtmf detection that derives from my code because the dtmf detection works well in  w2cMultiTestApp.exe. What I'm doing is that I' m switching the device to HPCMD_SW_PHONE_AudioStream mode and debug print all the incoming events. When I'm hooking off the phone whatever key I press I'm always getting a "DTMF: '0'  [Common]" event, that means that the dtmf detector always reports the same button. Probably it has to do with the gain or the detection time, I don't really know. On the other hand as I've said it works without problems with the demo application.

As I'm not familiar with all the aspects of telephony devices, are there any default rules that I've to follow in order to initialize the device properly? For example which are the parameters that I have always to set every time the software starts etc.

Finally, every time the software starts is always necessary to initialize the modem or it keeps its last configuration?

Once again I must mention that it would help a lot the developers if you publish the source code for the w2cMultiTestApp.exe. It has all the features and helps a lot to understand how the API works.

Thanks in advance for any answer.



Replies:
Posted By: jaco
Date Posted: Oct 06 2009 at 3:12pm
I've just seen that that when I'm running the "Way2call Log" it integrates in to Embarcadero IDE and prints all the debug messages in the IDE (very nice feature).

The weird thing is that the event log in the IDE always reports the correct detected dtfm tones but in the callback handler the w2cUsbM_TranslateEventToString function always return "DTMF: '0'  [Common]". This is how I'm using it.

char tmpStr[300];
w2cUsbM_TranslateEventToString(wDeviceID, tmpStr, dwEventCode, dwData);
 Form1->txtLog->Lines->Add(tmpStr); //TMemo object. Here dtmf are detected always as '0'


Posted By: jaco
Date Posted: Oct 06 2009 at 3:24pm
Ok. I've seen my mistake. The correct is to read dwEventData not dwData.

w2cUsbM_TranslateEventToString(wDeviceID, tmpStr, dwEventCode, dwEventData);

Anyway, I believe that the demo program's source would be a great help for people that dealing telephony devices for first time.



Print Page | Close Window