[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Creating a batch file to manualy dial a modem

Posted on 2005-05-09
Medium Priority
Last Modified: 2013-12-15
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

Question by:missmuppet

Accepted Solution

gtkfreak earned 252 total points
ID: 13980137
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.
LVL 15

Assisted Solution

DonConsolio earned 248 total points
ID: 14004266
Try something like this:

----- dial1.sh --------------------


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

chmod +x dial1.sh
# dial 160 - wait a second - hang up
./dial1.sh 160 1
# dial 161 - wait 2 seconds - hang up
./dial1.sh 161 2

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month20 days, 3 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question