Tech Support > Operating Systems > Linux / Variants > Script/program to control modem on command line?
Script/program to control modem on command line?
Posted by Ian Gil on July 15th, 2003


I'd like to be able to dial telephone numbers right from my keyboard on
the command line something like:

dial 800-555-1212

to dial a number. I'd also like options to hang up the phone, automatic
redialing on busy signals, play .wav file over phone, do something with
telephone key presses on the other line, etc., and have that all controlled via
a shell script or the like. This kind of setup would serve me well as phone
alerts when certain e-mail has come in, system resources are taxed, etc.

I don't know of a program that will allow me to do all this on the command line
so the next best thing I can imagine is to do it via a shell or even a chat
script, the problem is how do I interphase with the AT command set, for example
to make a busy signal a variable (SIGNAL=busy), also, how to play a sound file
through the modem and to a voice line, record voice messages, etc.

Any idea how to approach this type of thing?


Ian

Posted by Peter T. Breuer on July 15th, 2003


Ian Gil <i@nospamallowed.com> wrote:
well, try

echo atdt800-555-1212 > /dev/modem



etc.

diallers are two a penny.


You generally write a little c or perl program that plays with the
serial line. All that was missing from my script was a litlle
entyrainment of the line first, and error condition treatment.

Peter


Similar Posts