автоматизированный разговорный скрипт с модемом (Automated conversational script with a modem)
HANGUP
The HANGUP options control whether a modem hangup should be
considered as an error or not. This option is useful in scripts
for dialling systems which will hang up and call your system
back. The HANGUP options can be ON
or OFF
.
When HANGUP is set OFF and the modem hangs up (e.g., after the
first stage of logging in to a callback system), chat
will
continue running the script (e.g., waiting for the incoming call
and second stage login prompt). As soon as the incoming call is
connected, you should use the HANGUP ON
directive to reinstall
normal hang up signal behavior. Here is an (simple) example
script:
ABORT 'BUSY'
'' ATZ
OK\r\n ATD1234567
\r\n \c
CONNECT \c
'Callback login:' call_back_ID
HANGUP OFF
ABORT "Bad Login"
'Callback Password:' Call_back_password
TIMEOUT 120
CONNECT \c
HANGUP ON
ABORT "NO CARRIER"
ogin:--BREAK--ogin: real_account
etc ...