home *** CD-ROM | disk | FTP | other *** search
- rem Copyright (c) PhoneLink plc
- rem User Defined ISDN Skeleton Script (10/8/95)
-
- rem ******************************************************************
- rem ***** This script is only an outline and will not work as it
- rem ***** stands. It requires additional information to be inserted
- rem ***** where you see (*** ***). A carriage return is denoted by
- rem ***** char(13), and is sometimes required at the end of a command
- rem ***** string.
- rem ******************************************************************
-
-
- label InitDevice
- rem
- rem ******************************************************************
- rem ***** This section is used to initilise the Terminal Adapter.
- rem ******************************************************************
- rem
- echo off
- send "at{InitModemStr}char(13)"
- timeout 5,modem_fail
- find "*** response to T.A. initialisation string ***"
- label OffToGate
- rem
- rem ******************************************************************
- rem ***** This section dials the ISDN number and sets the PAD
- rem ***** parameters.
- rem ******************************************************************
- rem
- rem ISDN Offline to Gate (also contains Pad to Gate)
- echo off
- echo Making call...
- send "atdt{PreTel}{SiteTel}{PostFix}char(13)"
- timeout 15,connect_fail
- find "*** T.A. response to an established ISDN connection ***"
- timeout 5,pad_fail
- find "*** PAD prompt ***"
- send "set1:1,2:0,3:2,4:1,5:1,6:5,12:1,15:0char(13)"
- timeout 5,pad_set_fail
- find "*** PAD prompt ***"
- rem
- rem ******************************************************************
- rem ***** This section calls the Network User Address (NUA) and
- rem ***** establishes an X25 call.
- rem ******************************************************************
- rem
- label PadToGate
- echo off
- send "*** Command for calling an Network User Address (if any) ***{NUA}char(13)"
- timeout 5,nua_fail
- find "*** T.A. response to an established X25 call ***"
- echo Call connected.
- end
-
- label GateToPad
- echo off
- rem
- rem ******************************************************************
- rem ***** This section clears the X25 call, leaving you at the PAD.
- rem ******************************************************************
- rem
- send "char(16)"
- timeout 10,ctrl_p_fail
- find "*** PAD prompt ***"
- mwait 500
- send "CLRchar(13)"
- timeout 10,clear_fail
- find "*** T.A. response to a cleared X25 call ***"
- echo Waiting on line...
- end
-
- label GateToOff
- rem Gate to Offline (also contains Pad to Offline)
- echo off
- rem
- rem ******************************************************************
- rem ***** This section clears the X25 call, leaving you at the PAD.
- rem ******************************************************************
- rem
- send "char(16)"
- timeout 10,ctrl_p_fail
- find "*** PAD prompt ***"
- mwait 500
- send "CLRchar(13)"
- timeout 10,clear_fail
- find "*** T.A. response to a cleared X25 call ***"
- label PadToOff
- echo off
- rem
- rem ******************************************************************
- rem ***** This section clears the ISDN connection.
- rem ******************************************************************
- rem
- send "*** Command string to change T.A. from data mode to command mode ***"
- timeout 5,command_mode_fail
- find "*** T.A. response to change from command mode to data mode ***"
- send "at{TermModemStr}char(13)"
- timeout 5,hang_up_fail
- find "*** T.A. response to termination string ***"
- echo Offline.
- end
-
- rem
- rem ******************************************************************
- rem ***** This section provides a hard disconnection if any errors
- rem ***** have occured.
- rem ******************************************************************
- rem
- label modem_offline
- send "char(16)"
- timeout 5,clear
- find "*** PAD prompt ***"
- mwait 500
- label clear
- send "CLRchar(13)"
- timeout 5,command_mode
- find "*** T.A. response to a cleared X25 call ***"
- label command_mode
- send "*** Command string to change T.A. from data mode to command mode ***"
- timeout 5,hang_up
- find "*** T.A. response to command mode from data mode ***"
- label hang_up
- send "at{TermModemStr}char(13)"
- timeout 5,hang_fail
- find "*** T.A. termination string ***"
- label hang_fail
- abort
-
-
- rem
- rem ******************************************************************
- rem ***** The following sections provide some relevant error messages.
- rem ******************************************************************
- rem
-
- label modem_fail
- echo script[23]
- abort
-
- label connect_fail
- echo script[1]
- goto hang_up
-
- label pad_fail
- echo script[4]
- goto command_mode
-
- label pad_set_fail
- echo script[5]
- goto command_mode
-
- label nua_fail
- echo Wrong NUA?
- goto command_mode
-
- label ctrl_p_fail
- echo script[12]
- goto modem_offline
-
- label clear_fail
- echo script[13]
- goto clear
-
- label command_mode_fail
- echo script[15]
- goto command_mode
-
- label hang_up_fail
- echo script[17]
- abort
-