Technical data

84
fi
mantool="/usr/lib/eicon/divas/divactrl mantool -b -Exclusive -WDog -c 1001"
#
# Read the callback parameters from the management interface
# phone=$1 tty_dev=$2 tty_nr=$2 name=$3
# parameter is passed as "/dev/ttydsXX"
tty_nr=$(($(echo ${tty_nr} | sed -e "s/^.*ttyds//" -)))
if [ $((tty_nr)) -lt $((1)) ]
then
logger -i -t callback.sh Invalid tty name $1 > /dev/null 2>&1
exit 1
fi
#
# Set up the dial script file name
#
dial=/etc/ppp/diva_dial.$((tty_nr))
tty_nr=$(($tty_nr-1))
dir_start=$(($tty_nr/50))
dir_start=$(($dir_start*50))
dir_start=$(($dir_start))
dir_end=$(($dir_start+50))
offset=$(($tty_nr-$dir_start))
offset=$(($offset+1))
atinit=$(${mantool} -rTTY\\TTY$(($dir_start+1))-$((dir_end))\\T$((offset))\\AtInit | sed -e
"/^$/d" - | sed -e "s/^.* = //" -)
protocol=$(${mantool} -rTTY\\TTY$(($dir_start+1))-$((dir_end))\\T$((offset))\\ProtocolName
| sed -e "/^$/d" - | sed -e "s/^.* = //" -) txspeed=$(${mantool} -rTTY\\TTY$(($dir_start+1))-
$((dir_end))\\T$((offset))\\TxSpeed | sed -e "/^$/d" - | sed -e "s/^.* = //" -)
if [ -z "$atinit" ]
then
atinit="AT&F9"
fi
atinit="${atinit}E1V1"
#
# Check for V.110 (GSM) callback and set the connection parameters
#
baud=""
if [ "$protocol" = "V.110" ]
then
if [ $((txspeed)) -eq $((38400)) ]
then
baud="+ib7+iu=<8890214d00bb>"
else
# Use 9600Bps as default bit rate
baud="+ib5+iu=<8890214800bb>"
fi
fi
if [ ! -z "$baud" ]