Sending commands/dialing the modem from the command line.
I've looked everywhere for information about doing this. I don't want to set up a PPP connection, or dial a bbs. I need to be able to send dial commands to the modem from the command line. I need to do this, so I can turn call forwarding on and off on my phone line at night, because of some yahoo, that keeps calling my house at 4am with a fax modem. I want to see what he is trying to fax to me, maybe try to get contact info from it, so I need to set up a cron job. Any help would be appreciated.
Thanks
I finally figured how to dial from the command, the script is behind the cut.
Script example behind the cut!
#!/bin/sh
# This script will dial from the command line.
#
exec /usr/sbin/chat -v \
TIMEOUT 3 \
ABORT '\nBUSY\r' \
'' \rAT \
'OK-+++\c-OK' ATH0 \
TIMEOUT 10 \
OK ATDT*1111 \
CONNECT '' \ > /dev/ttyS1 < /dev/ttyS1
Thanks
I finally figured how to dial from the command, the script is behind the cut.
Script example behind the cut!
#!/bin/sh
# This script will dial from the command line.
#
exec /usr/sbin/chat -v \
TIMEOUT 3 \
ABORT '\nBUSY\r' \
'' \rAT \
'OK-+++\c-OK' ATH0 \
TIMEOUT 10 \
OK ATDT*1111 \
CONNECT '' \ > /dev/ttyS1 < /dev/ttyS1
