Recently I posted a question on this site about AT commands. What I wanted to achieve was to find the Hayes-AT command that was responsible for connecting my modem and soundcard so I could use my headset.

First I thought I had found the solution, but then it appeared to me, after restarting my machine the next day, that this “naughty” machine played haywire with me. (I’m getting a new machine soon).

The solution did not work any more and I was really puzzled. So I started playing around a bit with modem setting through the configuration screen. All of a sudden I saw the possibility to write modem actions to a log file. This log file could be opened with notepad or any ASCII text-editor.

Here is how I did it.

I opened the Control Panel and double-clicked on Modem. You get the following screen.

Next I clicked on Properties, this screen appears:

Wondering what the advanced button had as a surprise I pressed that, this is what I got:

And here I saw the checkbox, add to logfile, directly under that the button, show log. It looks like this:

NOW, there was my solution. I could let the modem tell me how to do it.

I emptied the logfile, closed all windows and started outlook contacts. The number from one of my friends was in the list. I called him, using the screens offered by Outlook (right click the contact record and choose 'Call Contact...' . The conversation was done on my side over the headset. After that I opened the logfile again and looked what it had to say.

Wow, it had to say a lot. Never knew that a modem could tell me that much.

Final SolutionSo here is the final solution. There are quite some lines of code involved but this will work fine.

All these lines should go to the output-property of the communication control.

Between each command there should be a short break (about 0.075 to 0.1 seconds) to give the modem a chance to reply.This should always be an “OK” string. For the purpose of this white paper I rewrote the callme form I posted earlier on the Foxite. It now has a checkbox indicating whether or not you have a headset. So now you can use this form with a normal phone and with a headset. Just play around a bit with it and let me know what you think about it.

Download codeClick here to download the code that is discussed in this article. The download is a zipfile. Its size is 9.803 bytes.