Creating a batch file to manualy dial a modem

Posted on 2005-05-09
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
    LVL 9

    Accepted Solution

    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 14

    Assisted Solution

    Try something like this:

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


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

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
    I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now