Creating a batch file to manualy dial a modem

I would like to create a batch file to manauly dial a number on my modem that is connected to a linux box running e-smith 6.0. The reason for this is so that I can turn on and off my call divert while out of the office. i need to dial 161 then wait for maybe a second then hang up to turn off I dial 160 again wait for the tone maybe a second then hang up. Ideally i want to be able to make a batch file that I can call froma web / wap page but intially i would be happy if I could get the commands to do it from a command. I am runny Hyla fax so the modem is always waiting for a call so might need to bypass this some how.

Strange request but i don't want to have to pay the telecom provider more money to have the remote service set up, currently can only be done form the line that has the divert on it??

Thanks in advance

Who is Participating?
Check out a program called wvdial on your system.
# man wvdial
# man wvdial.conf

You can see the option you can setup using wvdial and also put in the configuration info such as phone number, etc in the wvdial.conf file.
Try something like this:

----- --------------------


echo "ATD$1" # Hayes Modem command DIAL
sleep $2
echo ATH # Hayes Modem command HANGUP

chmod +x
# dial 160 - wait a second - hang up
./ 160 1
# dial 161 - wait 2 seconds - hang up
./ 161 2
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.