Listing 1. ppp-on and ppp-on-dialer Scripts
ppp on
#!/bin/sh
# Execute pppd using the options from the options
# file. Set the serial device to match your system
/usr/sbin/pppd /dev/cua1 38400
ppp on dialer
#!/bin/sh
#
# This is part 2 of the ppp-on script. It will
# perform the connection
# protocol for the desired connection.
#
# 1 B Channel usage
#TELEPHONE=95559625
#INIT="@M2=P@B0=1"
#
# 2 B Channel Usage
TELEPHONE=95559625\&9555625
INIT="@M2=P@B0=1"
#
# Do Chat
exec chat -e -v \
TIMEOUT 3 \
ABORT '\nNO CARRIER\r' \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' AT \
'OK' ATZ0 \
'OK' AT$INIT \
TIMEOUT 30 \
OK ATD$TELEPHONE \
CONNECT ''
Copyright © 1994 - 2019 Linux Journal. All rights reserved.