I'm looking for a little help with modem communications. I'm trying to get a .wav file to play through a modem. What I've got is a program that has a couple buttons on it. You enter a phone number or numbers into the text box at the top, click the 'dial next' button, and the modem dials the first number in the list. Once it's connected, you click one of the next 3 buttons to play a .wav file over the modem. The connecting part works fine, but playing the .wav has been giving me a headache all day. I don't know what to do with this thing.

I'm lost. I need a little direction here so I can try to figure out where to go with this. Anyone with a little knowledge and experience, please point me in the right direction.

This program is being developed for work, as we play with VoIP phone systems all day, and make a ton of test calls to make sure they have 2 way Audio, connect to the right numbers, etc. It sure would make life a ton easier if I could figure this thing out.

Any ideas you have, send them over, even if you think they're stupid. Rest assured, I've tried more ignorant ideas on this project than you can shake a stick at, so you can't possibly come up with a bad suggestion if you try.

Thanks in advance for your help.

Mike

Dani AI

Generated

Two practical routes will solve this problem: drive a voice-capable modem (TAPI or vendor voice AT commands) and stream audio into the modem’s on‑call audio device, or bypass the hardware modem entirely and place/answer calls with a SIP/softphone stack that can be fed a WAV file. already correctly suspects TAPI is the cleanest Windows-friendly way; ’s AT/voice hint is also useful for low-level, vendor-specific approaches.

For a TAPI-based approach the typical flow is:

initialize TAPI and open the modem line
place the call and wait for the connected state
obtain the call’s associated wave device (TAPI exposes a wave device ID for voice calls)
open that wave device with the modem’s expected format
stream converted PCM/G.711 frames until finished, handle disconnects

Key practical points: verify the modem actually supports voice mode and exposes a wave device (many inexpensive/data-only modems do not). Convert WAV files to the modem’s required format before streaming — telephony is usually 8 kHz, mono and many endpoints expect G.711 (u‑law/a‑law) or 8 kHz linear PCM — so do sample-rate and codec conversion as needed. In .NET, an audio library (for example NAudio) simplifies format conversion and buffering; use TAPI wrappers or P/Invoke for the line/call APIs and then write to the wave device.

If the modem/driver path proves unreliable, use a SIP/softphone test harness instead: a SIP stack or command-line softphone + a virtual audio cable lets automated scripts dial and inject WAV audio without vendor modem quirks. Troubleshooting tips: confirm call state events before streaming, test with a short tone first, log TAPI/AT exchanges, and watch for driver limitations (modern Windows often has spotty voice-modem support).

Recommended Answers

All 3 Replies

Maybe you are looking for AT commands. Have a look at FAQ.

Don't need AT commands. I've been through the whole list of those. Apparently, I need to figure out how to do this through TAPI, or find a third party that supplies libraries that can handle what I'm wanting to do. You'd think with everything you can do in c# it would be a matter of something like

com.Play(string Soundfile, string OutputMethod, int Delay, bool Repeat);

Now why the heck can't it just be that easy?

Mike

I think this codeproject article might help you to solve your problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.