DataMuseum.dk

Presents historical artifacts from the history of:

Regnecentalen RC-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Regnecentalen RC-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦718ca8b24⟧ TextFile

    Length: 2539 (0x9eb)
    Types: TextFile
    Notes: UNIX file
    Names: »autodialler«

Derivation

└─⟦c93a30372⟧ Bits:30004169/disk3.imd Uniplex II+ V.6 release 1.0 (dansk)
└─⟦c93a30372⟧ UNIX Filesystem
    └─⟦this⟧ »up/new/usr/UAP/unsupported/autodialler« 

TextFile


# autodialler - Command to dial out to Hayes/QWERTYphone via terminal
#               printer port

# Notes:
#
# 1. This is an unsupported shell script that currently only supports
#    Altos-II and IBM 3161 terminals, and is intended as a prototype
#    UNIPLEX integrators, rather than as a finalised package!
# 2. This program is not particularly portable to non-UNIX shells
#    (eg: assumes shell '#' comment, and echo's backslash notation)

USAGE='

Usage:  autodialler UID LOGNAME TTY DIALLERTTY NUMBER ...
   or:  autodialler -V

Arguments are set by UCARD. The only ones used here are:

   DIALLERTTY  which must be "-" (direct dial via printer port)
   NUMBER      which may be multi-word

Currently supported terminals:  Altos II, IBM 3161
           autodialling units:  BT "QWERTYphone"
'

PHONE=QWERTYphone
case "$*" in
-[Vv]) exec echo "$0: Vs. AP.03";;
esac

case "$4" in
   - ) ;;
   * ) exec echo "$0: Only supports printer-port $PHONE link";;
esac

# Set terminal dependent strings:
# PPON  - turns on "line to printer" mode (all text sent to terminal
#         is passed directly through to printer port, and not to the
#         screen
# PPOFF - revert to normal "line to screen" mode

case "$TERM" in
 *3161    ) PPON='\020\022'
            PPOFF='\020\024'
            ;;
 II|alt*II) PPON='\033[=1l\033[5i'
            PPOFF='\033[4i\033[=1h\033[=3l'
            ;;
        * ) exec echo "$0: Unsupported terminal, \"$TERM\"$USAGE";;
esac

# Compose dial string (removing any non-numeric characters)

shift; shift; shift; shift
NUMBER=
for ARG do
   NUMBER=$NUMBER`echo "$ARG" | sed 's/[^0-9]//g'`
done
case "$NUMBER" in
 [0-9]*) ;;
      *) exec echo \
         "$0: Invalid or omitted number, \"$NUMBER\"$USAGE";;
esac

# Now write to $PHONE. Note that, since its PC port does not
# support normal XON/XOFF flow control, we have to "sleep" frequently!

PORTSYNC='\030\032'              # Re-set PC port link (CAN SUB)
echo "Calling \"$NUMBER\" on $PHONE ..."

echo "$PPON$PORTSYNC\c"          # Open PP and initialise PC port
sleep 2

echo 'PC C"\r'                   # Load Manual Dial screen on LCD
sleep 1
echo "$NUMBER\c"                 # Type in the number, which will
sleep 1                          # also start dialling

echo "$PORTSYNC\c"               # Re-sync PC port
sleep 1
echo "EXIT\r$PPOFF\c"            # Drop PC port link and PP

echo "
Number sent to dialler unit. Use \"Hang up\" or \"New Call\" button
on $PHONE to terminate call in normal way.

Please press <RETURN>: \c"
read RSP
exit 0