ftp.nice.ch/peanuts/GeneralData/Documents/communication/UofO_SLIP_configuration.tar.gz#/UofO_SLIP_configuration/config/DEFAULT-SAMPLES/dial-modem.tcl

This is dial-modem.tcl in view mode; [Download] [Up]

#
# tcldiald TCL script used to dial a modem
# Originally contributed by Mark Crispin

# $Id: dial-modem.tcl,v 4.6 1992/09/05 01:59:53 louie Rel $

# The phone number to dial is passed as the 0'th argument
set number [lindex $args 0]

# Set default timeout for expect/rexpect commands
set timeout 20

log "Start of dialing script"

# Flush any pending command
xmit {\r}
sleep 1

# Get modem attention
xmit {AT\r}
expect timeout {error "waiting for OK from AT"} "*OK*"

# Initialize to modem wired-in defaults
xmit {ATZ\r}
expect timeout {error "waiting for OK from ATZ"} "*OK*"

# Let things cool down from the ATZ
sleep 1

# Dial the guy
log "Dialing $number"
xmit "ATDT$number\r"

# Wait for connect message
set timeout 30
expect timeout {error "waiting for connect"} \
	 "{*CONNECT*}" {log "Connected"}

# All OK
log "Connected normally"

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.