home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR10
/
MODEM31.ZIP
/
ANSWER.HP
next >
Wrap
Text File
|
1993-08-30
|
72KB
|
2,013 lines
; answer.hp -- HyperACCESS/5 answering script
;
; $Revision: 2.20 $
; $Date: 13 Aug 1993 16:29:26 $
;
; DEFINITION OF VARIABLES
;
declare integer BaudRate ; contains the baud rate
declare integer BaudIndex ; user to index into baud rate array
declare integer AnswerCall ; indicates if the modem has been told to answer calls
declare integer MiscInt1 ; miscellaneous variable number 1
declare integer VoiceDataCable ; contains the Answer menu selection
declare integer PasswordRetry ; is the loop counter for password tries
declare integer RingsToAnswer ; contains the number of rings on which to answer
declare integer MiscInt2 ; serves miscellaneous temporary functions
declare integer ModemNumber ; contains the modem type
declare integer CallsReceived ; contains the received call count
declare integer EscBranch ; tells where to branch after an ESC
declare integer Row ; current cursor row
declare integer Col ; current cursor column
declare integer PasswordDetail ; detail number for password() function
declare integer DisplayRate ; DCE baud rate, displayed on banner
declare integer ScrogType ; 0=Script, 1=Local Pgm, 2=Remote Pgm
declare integer DirectStartTime ; Logon time for Direct connect
declare integer DirectEndTime ; Logoff time for Direct connect
declare integer LoopCount ; loop counting variable
declare integer OSVersion ; version of operating system
declare integer TempBaud ; a temporary baud rate value
declare flag Logging ; true if logging is specified
declare flag DirectConnect ; true if an auto-answer direct-connect modem
declare flag PopupOS2 ; true if OS/2 and notification of calls is specified
declare flag DirectCable ; true if direct cabled
declare flag FromVoiceCall ; true if a switching from a voice call
declare flag HHS ; true if a high-speed modem at high-speed
declare flag ModemResponded ; true if an non-auto-answer direct-connect modem or if a modem has responded
declare flag ManualHangup ; true if hangup by hand
declare flag CallerIsLoggedOn ; true if caller logged on
declare flag ConstantDteRate ; true if baud rate synchronization is not required
declare flag UserDefinedModem ; modem name is User-Defined modem
declare flag OS2 ; true if OS/2 is the operating system
declare flag ISDN_Support ; true if device is ISDN
declare flag LeasedLine ; true if leased line support selected
declare flag SlowOS2 ; true if OS/2 version < 2.00
declare string CallersName ; contains the caller's name
declare string Password ; contains the password
declare string ExtraMdmCmds ; contains the extra modem commands
declare string DateTime ; contains the date
declare string PortName ; contains the port name
declare string ModemName ; contains the modem name
declare string MiscString1 ; serves miscellaneous temporary functions
declare string MiscString2 ; contains the modem name then the system time
declare string MiscString3 ; serves miscellaneous temporary functions
declare string LastCallerName ; name of last caller
declare string LastCallTime ; time of last call
declare string ScrogName ; Name of script or program to run
declare string InitString2 ; 2nd line of initialization strings
declare string LogFileName ; answer log file name
declare string UserDefCall ; user defined modem values read from
declare string UserDefAnswer ; modemdef.dat. modemderf.dat is
declare string UserDefDial ; created by running the utility script
declare string UserDefHangup ; named modemdef.
declare string UserDefCD
declare string UserDefToggleDTR
declare string UserDefHHS
option("BOTTOM LINE", no)
option("ignore case", yes)
get position(Row,Col)
option("mouse", on)
ClearScreen:
prompt("/n")
if decrement(Row) goto ClearScreen
escape key("<ESC>")
option("temporary settings",yes)
option("use menu colors",no)
emulate("TTY")
option("blank",yes)
wipe screen()
position(1,1)
option("receive line feeds", no)
report("operating system", MiscInt1)
if equal(MiscInt1, 2)
set flag(OS2, True)
else
set flag(OS2, False)
endif
report("operating system version", OSVersion)
GetInfoFromProgram:
key integer(BaudRate,"")
; This added for fix to version 3. Remove for 3.x versions
;
if equal(BaudRate, 0) set integer(BaudRate, 115200)
key string(PortName,"")
key string(ModemName,"")
key integer(ModemNumber,"")
key string(ExtraMdmCmds,"")
key integer(RingsToAnswer,"")
key integer(VoiceDataCable,"")
key flag(Logging,"")
key flag(PopupOS2,"")
key string(LogFileName,"")
set string(LastCallerName, "<none>")
set string(LastCallTime, "<none>")
option("blank",no)
wipe screen()
position(1,1)
set flag(ISDN_Support, False)
set flag(LeasedLine, false)
if get environment(MiscString1, "HA5LEASED")
if string match(MiscString1, "TRUE")
set flag(LeasedLine, true)
endif
endif
ifnot length(LogFileName, MiscInt1) set flag(Logging, false)
; The following line is commented out for compatibility with
; the version 3.0 product.
;get porttype(MiscString1)
if string match(MiscString1, "PBX") set flag(ISDN_Support, True)
if string match(MiscString1, "ISDN") set flag(ISDN_Support, True)
;if equal(ModemNumber, 102) set flag(ISDN_Support, True)
;if equal(ModemNumber, 103) set flag(ISDN_Support, True)
if equal(VoiceDataCable,2) set flag(FromVoiceCall,true)
ifnot equal(VoiceDataCable,3) goto SetupCommon
set flag(DirectCable,true)
set integer(ModemNumber,40)
set integer(VoiceDataCable,0)
SetupCommon:
if equal(ModemNumber,42) gosub SetFastlinkSub
if equal(ModemNumber,80) goto UserDefined
ifnot flag(DirectCable) goto CarrierDetectCheck
DirectCableHost:
wipe screen()
position(1,1)
option("echo",false)
set integer(EscBranch ,980)
option("use menu colors",yes)
option("bold",yes)
draw box(3,80)
position(3,32)
prompt(" ESC to cancel ")
position(2,12)
option("bold",no)
prompt("HyperACCESS//5 is waiting for a direct-cabled terminal")
option("use menu colors",no)
position(5,1)
WaitForEnterKey:
gosub CheckAbort
ifnot wait characters("/x0D",1)
ifnot get key(MiscString1) goto WaitForEnterKey
endif
gosub SetFlowControl
goto GetPassword1
CarrierDetectCheck:
option("use menu colors",yes)
if equal(ModemNumber,1) goto CheckModem
if equal(ModemNumber,2) goto CheckModem
if equal(ModemNumber,3) goto CheckModem
if equal(ModemNumber,4) goto CheckModem
if equal(ModemNumber,6) goto CheckModem
if equal(ModemNumber,7) goto CheckModem
if equal(ModemNumber,13) goto CheckModem
if equal(ModemNumber,14) goto CheckModem
if equal(ModemNumber,15) goto CheckModem
if equal(ModemNumber,16) goto CheckModem
if equal(ModemNumber,17) goto CheckModem
if equal(ModemNumber,19) goto CheckModem
if equal(ModemNumber,21) goto CheckModem
if equal(ModemNumber,22) goto CheckModem
if equal(ModemNumber,23) goto CheckModem
if equal(ModemNumber,24) goto CheckModem
if equal(ModemNumber,27) goto CheckModem
if equal(ModemNumber,31) goto CheckModem
if equal(ModemNumber,32) goto CheckModem
if equal(ModemNumber,33) goto CheckModem
if equal(ModemNumber,34) goto CheckModem
if equal(ModemNumber,35) goto CheckModem
if equal(ModemNumber,37) goto CheckModem
if equal(ModemNumber,38) goto CheckModem
if equal(ModemNumber,39) goto CheckModem
if equal(ModemNumber,41) goto CheckModem
if equal(ModemNumber,42) goto CheckModem
if equal(ModemNumber,43) goto CheckModem
if equal(ModemNumber,44) goto CheckModem
if equal(ModemNumber,46) goto CheckModem
if equal(ModemNumber,48) goto CheckModem
if equal(ModemNumber,50) goto CheckModem
if equal(ModemNumber,51) goto CheckModem
if equal(ModemNumber,53) goto CheckModem
if equal(ModemNumber,54) goto CheckModem
if equal(ModemNumber,55) goto CheckModem
if equal(ModemNumber,56) goto CheckModem
if equal(ModemNumber,57) goto CheckModem
if equal(ModemNumber,58) goto CheckModem
if equal(ModemNumber,59) goto CheckModem
if equal(ModemNumber,61) goto CheckModem
if equal(ModemNumber,62) goto CheckModem
if equal(ModemNumber,70) goto CheckModem
if equal(ModemNumber,74) goto CheckModem
if equal(ModemNumber,75) goto CheckModem
if equal(ModemNumber,77) goto CheckModem
if equal(ModemNumber,79) goto CheckModem
if equal(ModemNumber,81) goto CheckModem
if equal(ModemNumber,88) goto CheckModem
if equal(ModemNumber,89) goto CheckModem
if equal(ModemNumber,104) goto CheckModem
if equal(ModemNumber,105) goto CheckModem
if equal(ModemNumber,106) goto CheckModem
if equal(ModemNumber,107) goto CheckModem
ifnot less(ModemNumber,100) goto CheckModem
CarrierDetectError:
ifnot wait carrier(0,0) goto CheckModem
set string(MiscString3,"Your modems CD signal is set incorrectly. (See Appendix C for remedies.)")
gosub DisplayBanner
goto _Error
CheckModem:
option("use menu colors",no)
wipe screen()
position(1,1)
if equal(ModemNumber,97) goto UncommandedModems
if equal(ModemNumber,98) goto UncommandedModems
if equal(ModemNumber,99) goto UncommandedModems
character delay(50)
option("use menu colors",yes)
option("bold",yes)
if equal(ModemNumber,49) draw box(4,80)
ifnot equal(ModemNumber,49) draw box(3,80)
position(3,32)
if equal(ModemNumber,49) position(4,32)
prompt(" ESC to cancel ")
option("bold",no)
if equal(ModemNumber,49) goto Avatex
CheckModem1:
position(2,3)
if equal(ModemNumber,49) position(3,5)
option("bold",no)
; prompt("Preparing the /(MiscString2) to answer calls./n/n/n")
prompt("Preparing the /(ModemName) to answer calls./n/n/n")
option("use menu colors",no)
SpecialModemSupportRoutines:
if flag(ISDN_Support) goto ISDNDevices
if equal(ModemNumber,21) goto MultiTech
if equal(ModemNumber,124) goto MultiTech
if equal(ModemNumber,36) goto USR2400E
if equal(ModemNumber,44) goto Microcom
if equal(ModemNumber,123) goto Microcom
if equal(ModemNumber,50) goto NEC_Modem
if equal(ModemNumber,61) goto ATT
if equal(ModemNumber,62) goto Telrad
if equal(ModemNumber,63) goto Fujitsu
if equal(ModemNumber,64) goto NEC_ISDterm
if equal(ModemNumber,80) goto InitializeModem
if equal(ModemNumber, 138) goto WorldBlazer
SetModemInitString:
set string(MiscString3,"ATE1V1Q0S0=/(RingsToAnswer)")
set string(InitString2,"")
if greater(ModemNumber,39) goto UniqueModemInitStrings
if less(ModemNumber,10) goto UniqueModemInitStrings
if less(ModemNumber,20) set string(MiscString3,"/(MiscString3)X1")
if less(ModemNumber,20) goto UniqueModemInitStrings
if less(ModemNumber,30) set string(MiscString3,"/(MiscString3)X2")
if greater(ModemNumber,29) set string(MiscString3,"/(MiscString3)X3")
UniqueModemInitStrings:
if equal(ModemNumber,1)
set string(MiscString3,"AT&F1&C1&D2&R0\G1\J0\N3\Q3\V1\X1S0=/(RingsToAnswer)")
set flag(HHS,true)
goto AddExtraCmds
endif
if equal(ModemNumber,2) set string(MiscString3,"AT&FX4&C1&D2&R0\J0\N3\Q3\V1\X1%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,2) set flag(HHS,true)
if equal(ModemNumber,3) set string(MiscString3,"AT&FE1Q0X4&C1&D2\N3\Q3\J0\V1%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,3) set flag(HHS,true)
if equal(ModemNumber,4) set string(MiscString3,"AT&FE1Q0X4&C1&D2&K1S0=/(RingsToAnswer)")
if equal(ModemNumber,4) set flag(HHS,true)
if equal(ModemNumber,5) set string(MiscString3,"ATX4%J3S17=1S19=1S30=192S0=/(RingsToAnswer)")
if equal(ModemNumber,5) set flag(HHS,true)
if equal(ModemNumber,6) set string(MiscString3,"AT&F&C1&D2&R0&K3\N3%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,6) set flag(HHS,true)
if equal(ModemNumber,7) set string(MiscString3,"AT&FE1V1Q0&C1&D2&R0$E1$F4$S8S0=/(RingsToAnswer)")
if equal(ModemNumber,7) set flag(HHS,true)
if equal(ModemNumber,8) set string(MiscString3,"AT&FE1V1Q0X1&C1&D2S0=/(RingsToAnswer)")
if equal(ModemNumber,9) set string(MiscString3,"/(MiscString3)S61=1")
if equal(ModemNumber,9) set flag(HHS,true)
if equal(ModemNumber,9) hangup()
if equal(ModemNumber,11) set string(MiscString3,"/(MiscString3)S18=0")
if equal(ModemNumber,12) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2\N3\J0\Q3\V1S0=/(RingsToAnswer)")
if equal(ModemNumber,12) set flag(HHS,true)
if equal(ModemNumber,13) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2&K3&R0\A3%C1S95=3S0=/(RingsToAnswer)")
if equal(ModemNumber,13) set flag(HHS,true)
if equal(ModemNumber,14) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2\J0\N3\V1\X1\Q3%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,14) set flag(HHS,true)
if equal(ModemNumber,15) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2\D1\J0\N3\V1\X1\Q3S0=/(RingsToAnswer)")
if equal(ModemNumber,15) set flag(HHS,true)
if equal(ModemNumber,16) set string(MiscString3,"AT&FE1V1Q0&A1&C1&I1&K2&E1S0=/(RingsToAnswer)")
if equal(ModemNumber,16) set flag(HHS,true)
if equal(ModemNumber,17) goto Fastcomm
if equal(ModemNumber,18) goto Concord
if equal(ModemNumber,19) set string(MiscString3,"AT&FE1X1&C1&D1*C1*F2*L1S0=/(RingsToAnswer)")
if equal(ModemNumber,19) set flag(HHS,true)
if equal(ModemNumber,22) set string(MiscString3,"AT&FL0&C1&D2S36=7S0=/(RingsToAnswer)")
if equal(ModemNumber,22) set flag(HHS,true)
if equal(ModemNumber,23) set string(MiscString3,"AT&FL0&C1&D2S37=9S0=/(RingsToAnswer)")
if equal(ModemNumber,23) set flag(HHS,true)
if equal(ModemNumber,24) set string(MiscString3,"AT&FX4&C1&D2&K3\N3S0=/(RingsToAnswer)")
if equal(ModemNumber,24) set flag(HHS,true)
if equal(ModemNumber,25) set string(MiscString3,"AT&FE1V1Q0X5&B1&C1&D2&H3&N0&R0S0=/(RingsToAnswer)")
if equal(ModemNumber,25) set flag(HHS,true)
if equal(ModemNumber,26) set string(MiscString3,"/(MiscString3)\N3\Q2")
if equal(ModemNumber,26) set flag(HHS,true)
if equal(ModemNumber,27) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2\J0\N3\Q3\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,27) set flag(HHS,true)
if equal(ModemNumber,28) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2&K3&R0\N3%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,28) set flag(HHS,true)
if equal(ModemNumber,30) goto USR2400
if equal(ModemNumber,31) set string(MiscString3,"AT&F&C1&D2\J0\N6\Q3\V1\X1%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,31) set flag(HHS,true)
if equal(ModemNumber,32) set string(MiscString3,"AT&F&C1&D2&K3&Q5\A3\N3S36=7S11=55S0=/(RingsToAnswer)")
if equal(ModemNumber,32) set flag(HHS,true)
if equal(ModemNumber,33) set string(MiscString3,"AT&FE1V1Q0X4&B1&C1&D2S0=/(RingsToAnswer)")
if equal(ModemNumber,33) set flag(HHS,true)
if equal(ModemNumber,34) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2&K3&R0S38=0S95=3S0=/(RingsToAnswer)")
if equal(ModemNumber,34) set flag(HHS,true)
if equal(ModemNumber,35) set string(MiscString3,"/(MiscString3)&C1&D2")
if equal(ModemNumber,37) goto Telebit
if equal(ModemNumber,38) set string(MiscString3,"AT&F\V1X4&C1&D2\G0\J0\N3\Q3\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,38) set flag(HHS,true)
if equal(ModemNumber,39) set string(MiscString3,"AT&F2&C1&D2\J0\N3\X1\V1\Q3%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,39) set flag(HHS,true)
if equal(ModemNumber,41) goto Telebit
if equal(ModemNumber,42) goto Telebit
if equal(ModemNumber,43) set string(MiscString3,"AT&F1Q0V1X4W2&B1&C1&D2&K3&R0S0=/(RingsToAnswer)")
if equal(ModemNumber,43) set flag(HHS,true)
if equal(ModemNumber,45) goto Convertible
if equal(ModemNumber,46) set string(MiscString3,"AT&FE1\V1X4\D1\G\J\N3\Q3&C1&D2S0=/(RingsToAnswer)")
if equal(ModemNumber,46) set flag(HHS,true)
if equal(ModemNumber,47) set string(MiscString3,"AT Q0 B11001100")
if equal(ModemNumber,48) set string(MiscString3,"AT&F1E1Q0X4&C1&D2\J0\N3\Q3\V1\X1%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,48) set flag(HHS,true)
if equal(ModemNumber,49) goto Avatex2
if equal(ModemNumber,51) goto Telebit
if equal(ModemNumber,52) set string(MiscString3,"ATE1X4N1&C1&D2&R0\G0\J0\Q3\X1\V1\N3%E1S0=/(RingsToAnswer)")
if equal(ModemNumber,52) set flag(HHS,true)
if equal(ModemNumber,53) set string(MiscString3,"ATE1V1Q0X6&C1&D2&E4&K3&R0&U2S0=/(RingsToAnswer)")
if equal(ModemNumber,53) set flag(HHS,true)
if equal(ModemNumber,54) set string(MiscString3,"AT&F0E1V1Q0X6&C1&D2&R1&I2\N3\Q3%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,54) set flag(HHS,true)
if equal(ModemNumber,55) gosub SetDowtySub
if equal(ModemNumber,55) set string(MiscString3,"AT&F0E1V1Q0X6&C1&I2%C1%R0%K3%U3-E3//S0//U0U/(MiscInt2)S0=/(RingsToAnswer)")
if equal(ModemNumber,55) set flag(HHS,true)
if equal(ModemNumber,56) gosub SetDowtySub
if equal(ModemNumber,56) set string(MiscString3,"AT&F0E1V1Q0X6&C1&Q11&I2%C1%R0%K3%U3-E3U/(MiscInt2)S0=/(RingsToAnswer)")
if equal(ModemNumber,56) set flag(HHS,true)
if equal(ModemNumber,57) set string(MiscString3,"ATE1V1Q0X4&C1&D2//Q3//N3S0=/(RingsToAnswer)")
if equal(ModemNumber,57) set flag(HHS,true)
if equal(ModemNumber,58) set string(MiscString3,"AT&F!C0E1Q0X3&C1&D2\J0\N3\V1\Q3\X1%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,58) set flag(HHS,true)
if equal(ModemNumber,59)
set string(MiscString3,"AT&FX4&C1&D2&K3&R0\D1")
set string(InitString2,"AT\J\N3\Q3\R\V1\X1S0=/(RingsToAnswer)")
set flag(HHS,true)
endif
if equal(ModemNumber,60) set string(MiscString3,"AT&FX4&C1&D2\J0\N3\Q3\V1\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,60) set flag(HHS,true)
if equal(ModemNumber,65) goto Telebit
if equal(ModemNumber,70) set string(MiscString3,"AT&FE1V1Q0L0&C1&D2&K3S95=2S38=0S0=/(RingsToAnswer)")
if equal(ModemNumber,70) set flag(HHS,true)
if equal(ModemNumber,71) set string(MiscString3,"AT&FE1V1Q0L0X4&C1&D2&R0\Q1\V0S25=0S0=/(RingsToAnswer)")
if equal(ModemNumber,71) set flag(HHS,true)
if equal(ModemNumber,73) set string(MiscString3,"AT&F&C1&D2E1Q\J\N3\Q3\V1\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,73) set flag(HHS,true)
if equal(ModemNumber,74) set string(MiscString3,"AT&FE1X4\V1\D1\J\N3\Q3&C1&D2&R%C1%F1\M1\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,74) set flag(HHS,true)
if equal(ModemNumber,75) set string(MiscString3,"AT&F2E1V1L0Q0W2X4&C1&D2S0=/(RingsToAnswer)")
if equal(ModemNumber,75) set flag(HHS,true)
if equal(ModemNumber,76) set string(MiscString3,"AT&FE1V1Q0S0=0*F3S0=/(RingsToAnswer)")
if equal(ModemNumber,76) set flag(HHS,true)
if equal(ModemNumber,77) set string(MiscString3,"AT&F&C1&D2&K1SS0=/(RingsToAnswer)")
if equal(ModemNumber,77) set flag(HHS,true)
if equal(ModemNumber,78) set string(MiscString3,"AT&F&C1&D2X4\N3\Q3%F2*B1&W1&Y1S64=1S0=/(RingsToAnswer)")
if equal(ModemNumber,78) set flag(HHS,true)
if equal(ModemNumber,79)
if string match(ModemName, "PSD on D")
set string(MiscString3,"%A1=1%A3=9%A0=2")
elseif string match(ModemName, "PSD on B1")
set string(MiscString3,"%A1=1%A3=3%A0=2")
elseif string match(ModemName, "PSD on B2")
set string(MiscString3,"%A1=1%A3=5%A0=2")
else
set string(MiscString3,"%A1=0%A2=2%A0=2")
endif
set string(MiscString3,"ATE1V1Q0X4&C1&D2&K3/(MiscString3)S0=/(RingsToAnswer)")
set flag(HHS,true)
goto AddExtraCmds
endif
if equal(ModemNumber,81) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2&J0&K3\G1\N3S95=2S0=/(RingsToAnswer)")
if equal(ModemNumber,81) set flag(HHS,true)
if equal(ModemNumber,82) set string(MiscString3,"AT&FE1Q0V1X4&C1&D2&R0*E9*F3*M1*S1S0=/(RingsToAnswer)")
if equal(ModemNumber,82) set flag(HHS,true)
if equal(ModemNumber,83) set string(MiscString3,"AT&FE1V1Q0X4B1&B1&H1&R2&N0S0=/(RingsToAnswer)")
if equal(ModemNumber,83) set flag(HHS,true)
if equal(ModemNumber,84) set string(MiscString3,"AT&FE1V1Q0X4B0&B1&H1&R2&N0&A3S0=/(RingsToAnswer)")
if equal(ModemNumber,84) set flag(HHS,true)
if equal(ModemNumber,85) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2&R0\H0\N6\Q3S0=/(RingsToAnswer)")
if equal(ModemNumber,85) set flag(HHS,true)
if equal(ModemNumber,86) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2\J\V1\X1&R0S0=/(RingsToAnswer)")
if equal(ModemNumber,86) set flag(HHS,true)
if equal(ModemNumber,87) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2&R0*SC1*FL3*XC2S0=/(RingsToAnswer)")
if equal(ModemNumber,87) set flag(HHS,true)
if equal(ModemNumber,88) goto Telebit
if equal(ModemNumber,89) set string(MiscString3,"AT&F&C1&D2&R%C1%E1\A3\G\J\N3\Q3\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,89) set flag(HHS,true)
if equal(ModemNumber,100) set string(MiscString3,"AT&FX4&C1&D2&R0\J0\Q3\V2\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,100) set flag(HHS,true)
if equal(ModemNumber,101) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2&R%BS7=50S0=/(RingsToAnswer)")
if equal(ModemNumber,101) set flag(HHS,true)
if equal(ModemNumber,104) set string(MiscString3,"AT&FX4&C1&D2\J\N3\Q3\V2\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,104) set flag(HHS,true)
if equal(ModemNumber,105) set string(MiscString3,"AT&F&C1&D2S0=/(RingsToAnswer)")
if equal(ModemNumber,106) set string(MiscString3,"ATE1V1Q0&C1S0=/(RingsToAnswer)")
if equal(ModemNumber,107) set string(MiscString3,"AT&F&C1&D2\N3\V2\Q3\J0\C1\X1%C1/"H3S0=/(RingsToAnswer)")
if equal(ModemNumber,107) set flag(HHS, true)
if equal(ModemNumber,108) set string(MiscString3,"AT&FX6&C1&D2&R0\D1\N3\Q3\X1/"H3S0=/(RingsToAnswer)")
if equal(ModemNumber,108) set flag(HHS, true)
if equal(ModemNumber,109) set string(MiscString3,"AT&FE1V1Q0X4&A3&B1&H1&R2S0=/(RingsToAnswer)")
if equal(ModemNumber,109) set flag(HHS, true)
if equal(ModemNumber,110) set string(MiscString3,"AT&F2E1V1X4\N6\Q3\V1\J\X1%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,110) set flag(HHS, true)
if equal(ModemNumber,111)
if equal(BaudRate, 300)
set integer(MiscInt1, 1)
elseif equal(BaudRate, 600)
set integer(MiscInt1, 2)
elseif equal(BaudRate, 1200)
set integer(MiscInt1, 3)
elseif equal(BaudRate, 2400)
set integer(MiscInt1, 4)
elseif equal(BaudRate, 4800)
set integer(MiscInt1, 5)
elseif equal(BaudRate, 9600)
set integer(MiscInt1, 6)
else
set integer(MiscInt1, 7)
endif
set string(MiscString3,"AT&FX4&A1&B/(MiscInt1)&H1&R2S0=/(RingsToAnswer)")
set flag(HHS, true)
endif
if equal(ModemNumber,112) set string(MiscString3,"AT&FX4&C1&D2&K3\N3S95=61S0=/(RingsToAnswer)")
if equal(ModemNumber,112) set flag(HHS, true)
if equal(ModemNumber,113) set string(MiscString3,"AT&FX4&C1&D2&K3\G0S36=7S46=138S95=3S0=/(RingsToAnswer)")
if equal(ModemNumber,113) set flag(HHS, true)
if equal(ModemNumber,114) set string(MiscString3,"AT&F2X4&C1&D2&K3&Q9\N3S95=32S0=/(RingsToAnswer)")
if equal(ModemNumber,114) set flag(HHS, true)
if equal(ModemNumber,115) set string(MiscString3,"AT&FX4&C1&D2&K3&R0\N3%C1S95=35S0=/(RingsToAnswer)")
if equal(ModemNumber,115) set flag(HHS, true)
if equal(ModemNumber,116) set string(MiscString3,"AT&FX4&C1&D2\D1\J0\N6\Q3\V1\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,116) set flag(HHS, true)
if equal(ModemNumber,117) set string(MiscString3,"AT&FX4&C1&D2&K3S59=0S0=/(RingsToAnswer)")
if equal(ModemNumber,117) set flag(HHS, true)
if equal(ModemNumber,118) set string(MiscString3,"AT&FX4&C1&D2&K3&Q5&R0S95=35S0=/(RingsToAnswer)")
if equal(ModemNumber,118) set flag(HHS, true)
if equal(ModemNumber,119) set string(MiscString3,"AT&F1V1X4&C1&D2&K3&Q5S0=/(RingsToAnswer)")
if equal(ModemNumber,119) set flag(HHS, true)
if equal(ModemNumber,120) set string(MiscString3,"AT&FX4&C1&D2*FL3*MS0*SM3*XC2S0=/(RingsToAnswer)")
if equal(ModemNumber,120) set flag(HHS, true)
if equal(ModemNumber,121)
set string(MiscString3,"AT&FX4&C1&D2&Q5\J0\N3\Q3\V1\X1%C1")
set string(InitString2,"ATS46=138S48=7S0=/(RingsToAnswer)")
set flag(HHS, true)
endif
if equal(ModemNumber,122)
set string(MiscString3,"AT&F1&C1&D2\Q3&S1S0=/(RingsToAnswer)")
set flag(HHS, true)
endif
if equal(ModemNumber,125) set string(MiscString3,"AT&F0X6&C1&D2&R0\C1\D1\N5\Q3\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,125) set flag(HHS, true)
if equal(ModemNumber,126) set string(MiscString3,"AT&F&C1&D2&K3&Q5\N3S11=55S95=47S0=/(RingsToAnswer)")
if equal(ModemNumber,126) set flag(HHS, true)
if equal(ModemNumber,127) set string(MiscString3,"AT&F&C1&D2*SM3*XC2*FL3S0=/(RingsToAnswer)")
if equal(ModemNumber,127) set flag(HHS, true)
if equal(ModemNumber,128) set string(MiscString3,"AT&F&C1&D2&K3&Q9\N3S95=1S0=/(RingsToAnswer)")
if equal(ModemNumber,128) set flag(HHS, true)
if equal(ModemNumber,129) set string(MiscString3,"AT&FV1&C1&D2\D1\G1\N3\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,129) set flag(HHS, true)
if equal(ModemNumber,130) set string(MiscString3,"AT&F&C1&D2\J\N3\Q3\V2\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,130) set flag(HHS, true)
if equal(ModemNumber,131) set string(MiscString3,"AT&F&C1&D2\J\N3\Q3\V2\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,131) set flag(HHS, true)
if equal(ModemNumber,132) set string(MiscString3,"AT&FX6&C1&D2\N7\Q3\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,132) set flag(HHS, true)
if equal(ModemNumber,133) set string(MiscString3,"AT&FX4&C1&D2\N3\Q1\V0\X1\M1\P1S0=/(RingsToAnswer)")
if equal(ModemNumber,133) set flag(HHS, true)
if equal(ModemNumber,134) set string(MiscString3,"AT&FX4&C1&D2&K3%C1\J0\Q3\V1\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,134) set flag(HHS, true)
if equal(ModemNumber,135) set string(MiscString3,"AT&F&C1&D2\N9\J0\V1\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,135) set flag(HHS, true)
if equal(ModemNumber,136) set string(MiscString3,"AT&FX4&C1&D2&K3S0=/(RingsToAnswer)")
if equal(ModemNumber,136) set flag(HHS, true)
if equal(ModemNumber,136) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2S0=/(RingsToAnswer)")
if equal(ModemNumber,137) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2")
if equal(ModemNumber,139) set string(MiscString3,"AT&FS0=/(RingsToAnswer)")
if equal(ModemNumber,139) set flag(HHS, true)
if equal(ModemNumber,140) set string(MiscString3,"AT&F0S0=/(RingsToAnswer)")
if equal(ModemNumber,140) set flag(HHS, true)
if equal(ModemNumber,141) set string(MiscString3,"AT&F2S0=/(RingsToAnswer)")
if equal(ModemNumber,141) set flag(HHS, true)
if equal(ModemNumber,142) set string(MiscString3,"AT&F&C1&D2S0=/(RingsToAnswer)")
if equal(ModemNumber,143) set string(MiscString3,"AT&F&C1&D2&I0E1V1Q0X3\X0\V1\Q2\R2\N3%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,143) set flag(HHS, true)
if equal(ModemNumber,144) set string(MiscString3,"AT&F&C1&D2N3\N3\Q3\V1\X1S11=55S0=/(RingsToAnswer)")
if equal(ModemNumber,144) set flag(HHS, true)
if equal(ModemNumber,145) set string(MiscString3,"AT&F&C1&D2S0=/(RingsToAnswer)")
if equal(ModemNumber,146) set string(MiscString3,"AT&F&C1&D2&K3\N35S95=2S0=/(RingsToAnswer)")
if equal(ModemNumber,146) set flag(HHS, true)
if equal(ModemNumber,147) set string(MiscString3,"AT&FX4&C1&D2\J0\Q3\V2\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,147) set flag(HHS,true)
if equal(ModemNumber,148) set string(MiscString3,"ATE1V1Q0X1S0=/(RingsToAnswer)")
if equal(ModemNumber,148) set flag(HHS,false)
if equal(ModemNumber,149) set string(MiscString3,"AT&F0E1V1Q0X4&C1&D2&R0\N3&K3%C3S0=/(RingsToAnswer)")
if equal(ModemNumber,149) set flag(HHS,true)
if equal(ModemNumber,150) set string(MiscString3,"AT&FX3W0&C1&D2&K3\N5S0=/(RingsToAnswer)")
if equal(ModemNumber,150) set flag(HHS,true)
if equal(ModemNumber,150) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2\J0\N3\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,150) set flag(HHS,true)
if equal(ModemNumber,151) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2\J0\N3\X1S0=/(RingsToAnswer)")
if equal(ModemNumber,151) set flag(HHS,true)
if equal(ModemNumber,152) set string(MiscString3,"AT&FE1V1Q0X4&C1&D2\N3\V1%C1S0=/(RingsToAnswer)")
if equal(ModemNumber,152) set flag(HHS,true)
if equal(ModemNumber,153) set string(MiscString3, "AT&FE1V1Q0X4&C1&D2&K3\V1\J0\N3\Q3S0=/(RingsToAnswer)")
if equal(ModemNumber,153) set flag(HHS,true)
AddExtraCmds:
if length("/(ExtraMdmCmds)",MiscInt2)
ifnot string match(InitString2, "AT") set string(InitString2, "AT")
set string(InitString2,"/(InitString2)/(ExtraMdmCmds)")
endif
goto InitializeModem
ISDNDevices:
gosub DisplayBanner4
set flag(HHS,true)
if answer(TRUE) then goto ContinueModemInit else goto _Error
NEC_ISDterm:
set string(MiscString3,"NEC")
if flag(FromVoiceCall) goto ErrSwitchNotAvailable
character delay(50)
set integer(MiscInt2,6)
NEC_ISDterm1:
if equal(MiscInt2,6) set integer(MiscInt1,9600)
if equal(MiscInt2,5) set integer(MiscInt1,19200)
if equal(MiscInt2,4) set integer(MiscInt1,4800)
if equal(MiscInt2,3) set integer(MiscInt1,2400)
if equal(MiscInt2,2) set integer(MiscInt1,1200)
if equal(MiscInt2,1) set integer(MiscInt1,300)
setting("baud",MiscInt1)
type("AT/r")
if wait text("OK",1) goto NEC_ISDterm2
if decrement(MiscInt2) goto NEC_ISDterm1
goto ErrNoModemResponse
NEC_ISDterm2:
set integer(BaudRate,MiscInt1)
option("xprotocol",on)
set integer(AnswerCall,1)
goto VoiceToData1
NEC_Modem:
set string(MiscString3,"AT&FE1V1Q0X4&C1&D2L1S0=/(RingsToAnswer) /(ExtraMdmCmds)")
set flag(HHS,true)
set integer(AnswerCall,1)
type("/(MiscString3)/r")
ifnot wait text("OK") goto ErrNoModemResponse
type("AT</r")
ifnot wait text("*") goto ErrNoModemResponse
type("C1 T1/r")
ifnot wait text("OK") end()
type("Q/r")
ifnot wait text("OK") goto ErrNoModemResponse
if flag(FromVoiceCall) goto ContinueModemInit
goto PrepareToWait
Fujitsu:
set string(MiscString3,"Fujitsu")
if flag(FromVoiceCall) goto ErrSwitchNotAvailable
character delay(50)
type ("AT/r")
wait seconds (1)
if screen match("1>",1) goto Fujitsu1
type("ATMENU/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("1>",1) goto ErrNoModemResponse
Fujitsu1:
type("/(MiscString2):/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("1>",1) goto ErrNoModemResponse
type("END/r")
if wait text("OK",2) goto Fujitsu2
Fujitsu2:
ifnot wait line(1,1) prompt("/n")
type("AT%P0/r")
if equal(VoiceDataCable,9600) goto Fujitsu3
setting("baud", 9600)
ifnot wait text("OK",2) goto ErrNoModemResponse
setting("baud",VoiceDataCable)
type("AT/r")
Fujitsu3:
ifnot wait text("OK",2) goto ErrNoModemResponse
type("ATS54=1/r")
ifnot wait text("OK",2) goto ErrNoModemResponse
type("ATS56=5/r")
ifnot wait text("OK",2) goto ErrNoModemResponse
option("xprotocol",on)
set integer(AnswerCall,1)
goto VoiceToData1
Telrad:
set string(MiscString3,"Telrad")
if flag(FromVoiceCall) goto ErrSwitchNotAvailable
Telrad1:
character delay(50)
set integer(MiscInt2,7)
Telrad2:
if equal(MiscInt2,7) set integer(MiscInt1,9600)
if equal(MiscInt2,6) set integer(MiscInt1,4800)
if equal(MiscInt2,5) set integer(MiscInt1,2400)
if equal(MiscInt2,4) set integer(MiscInt1,1200)
if equal(MiscInt2,3) set integer(MiscInt1,300)
if equal(MiscInt2,2) set integer(MiscInt1,1800)
if equal(MiscInt2,1) set integer(MiscInt1,600)
setting("baud",MiscInt1)
type("/r")
if wait text("*",2) goto Telrad3
if decrement(MiscInt2) goto Telrad2
goto ErrNoModemResponse
Telrad3:
setting("outgoing hhs",0)
setting("incoming hhs",0)
type("PROF 4/r")
wait seconds (1)
setting("baud",9600)
type("/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("*",1) goto ErrNoModemResponse
if equal(BaudRate,9600) goto Telrad4
set integer(MiscInt1,2)
if equal(BaudRate,4800) set integer(MiscInt1,13)
if equal(BaudRate,2400) set integer(MiscInt1,12)
if equal(BaudRate,1800) set integer(MiscInt1,7)
if equal(BaudRate,1200) set integer(MiscInt1,3)
if equal(BaudRate,600) set integer(MiscInt1,4)
type("set 11:/(MiscInt1)/r")
wait seconds (2)
setting("baud",BaudRate)
type("/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("*",2) goto ErrNoModemResponse
Telrad4:
type("set 2:0,101:32,103:16,104:80,126:1,130:0/r")
ifnot wait line(1,3) goto ErrNoModemResponse
ifnot wait text("*",3) goto ErrNoModemResponse
set flag(HHS,true)
set integer(AnswerCall,1)
goto PrepareToWait2
ATT:
set string(MiscString3,"AT&T")
if flag(FromVoiceCall) goto ErrSwitchNotAvailable
character delay(50)
set integer(MiscInt2,6)
ATT1:
if equal(MiscInt2,6) set integer(MiscInt1,9600)
if equal(MiscInt2,5) set integer(MiscInt1,19200)
if equal(MiscInt2,4) set integer(MiscInt1,4800)
if equal(MiscInt2,3) set integer(MiscInt1,2400)
if equal(MiscInt2,2) set integer(MiscInt1,1200)
if equal(MiscInt2,1) set integer(MiscInt1,300)
setting("baud",MiscInt1)
break()
wait seconds (1)
type("at/r")
if wait text("CMD:",1) goto ATT2
if decrement(MiscInt2) goto ATT1
goto ErrNoModemResponse
ATT2:
type("set au on/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("CMD:",2) goto ErrNoModemResponse
setting("baud",9600)
break()
wait seconds (1)
type("at/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("CMD:",1) goto ErrNoModemResponse
type("copy p0 to active/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("CMD:",2) goto ErrNoModemResponse
setting("baud",BaudRate)
break()
wait seconds (1)
type("at/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("CMD:",2) goto ErrNoModemResponse
type("set dcd fo/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("CMD:",1) goto ErrNoModemResponse
type("set dtr fo/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("CMD:",1) goto ErrNoModemResponse
if string match(ModemName, "D Channel")
type("set mode DX25/r")
else
type("set mode B2/r")
endif
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("CMD:",1) goto ErrNoModemResponse
type("set rec eia/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("CMD:",1) goto ErrNoModemResponse
type("set tran eia/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("CMD:",1) goto ErrNoModemResponse
type("set an auto/r")
ifnot wait line(1,2) goto ErrNoModemResponse
ifnot wait text("CMD:",1) goto ErrNoModemResponse
set flag(HHS, true)
set integer(AnswerCall,1)
goto PrepareToWait2
Fastcomm:
setting("baud",BaudRate)
character delay(250)
if greater(BaudRate,8000) setting("baud",2400)
hangup()
gosub Fastcomm2
ifnot flag(ModemResponded) goto ErrNoModemResponse
if less(BaudRate,8000) goto Fastcomm1
setting("baud",BaudRate)
hangup()
gosub Fastcomm2
ifnot flag(ModemResponded) goto ErrNoModemResponse
Fastcomm1:
set flag(ModemResponded,false)
character delay(50)
if greater(BaudRate,3000) set flag(HHS,true)
if greater(AnswerCall,0) goto ContinueModemInit
set integer(MiscInt2,1)
if greater(BaudRate,10000) set integer(MiscInt2,0)
type("AT #F Q0 S0=/(RingsToAnswer) S58=/(MiscInt2) #LCN #LDN #LX3 #LRF ExtraMdmCmds/r")
ifnot wait text("OK",10) goto ErrNoModemResponse
ifnot wait line(1,2) goto ErrNoModemResponse
hangup()
goto ContinueModemInit
Fastcomm2:
set flag(ModemResponded,false)
gosub Fastcomm4
if wait text("OK",3) goto Fastcomm3
gosub Fastcomm4
if wait text("OK",3) goto Fastcomm3
return()
Fastcomm3:
ifnot wait line(1,1) prompt("/n")
set flag(ModemResponded,true)
return()
Fastcomm4:
set integer(MiscInt2,5)
Fastcomm5:
type("A")
if wait text("A",1) goto Fastcomm6
if decrement(MiscInt2) goto Fastcomm5
Fastcomm6:
type("T/r")
return()
Telebit:
set string(MiscString2,"/(MiscString3)")
if flag(OS2)
set integer(MiscInt2,6)
goto Telebit1:
endif
if equal(ModemNumber, 37)
set integer(MiscInt2,8)
else
set integer(MiscInt2,7)
endif
Telebit1:
if equal(MiscInt2,8) set integer(MiscInt1,57600)
if equal(MiscInt2,7) set integer(MiscInt1,38400)
if equal(MiscInt2,6) set integer(MiscInt1,19200)
if equal(MiscInt2,5) set integer(MiscInt1,9600)
if equal(MiscInt2,4) set integer(MiscInt1,4800)
if equal(MiscInt2,3) set integer(MiscInt1,2400)
if equal(MiscInt2,2) set integer(MiscInt1,1200)
if equal(MiscInt2,1) set integer(MiscInt1,300)
ifnot equal(ModemNumber,42) goto Telebit2
divide(MiscInt1,10)
multiply(MiscInt1,9)
Telebit2:
setting("baud",MiscInt1)
type("AT&F/r")
if wait text("OK",1) goto Telebit3
if decrement(MiscInt2) goto Telebit1
goto ErrNoModemResponse
Telebit3:
setting("baud",9600)
set integer(MiscInt2,5)
if equal(BaudRate,300) set integer(MiscInt2,0)
if equal(BaudRate,1200) set integer(MiscInt2,1)
if equal(BaudRate,2400) set integer(MiscInt2,2)
if equal(BaudRate,4800) set integer(MiscInt2,3)
if equal(BaudRate,9600) set integer(MiscInt2,4)
if equal(BaudRate,19200) set integer(MiscInt2,5)
if equal(BaudRate,38400) set integer(MiscInt2,6)
if equal(BaudRate,57600) set integer(MiscInt2,7)
if equal(ModemNumber, 88)
set string(MiscString2,"/(MiscString2)X2S51=/(MiscInt2)")
elseif equal(ModemNumber, 65)
set string(MiscString2,"ATE1V1Q0X2S0=/(RingsToAnswer)S51=/(MiscInt2)")
elseif equal(ModemNumber, 37)
set string(MiscString2,"ATE1V1Q0X2S0=/(RingsToAnswer)S51=/(MiscInt2)")
elseif equal(ModemNumber, 51)
set string(MiscString2,"/(MiscString2)X3S51=/(MiscInt2)")
else
set string(MiscString2,"/(MiscString2)X3S51=/(MiscInt2)I")
endif
wait seconds (1)
character delay(50)
type("/(MiscString2)/r")
ifnot wait text("OK",17) goto ErrNoModemResponse
if equal(ModemNumber,51) goto Telebit4
ifnot screen match("96",2) goto Telebit4
ifnot get integer(MiscInt2,"/S(9)") goto Telebit4
ifnot equal(MiscInt2,961) set integer(ModemNumber,41)
Telebit4:
if wait line(1,1) goto Telebit5
prompt("/n")
Telebit5:
setting("baud",BaudRate)
if equal(ModemNumber,42) gosub SetFastlinkSub
character delay(50)
set flag(HHS,true)
if equal(ModemNumber, 88)
set string(MiscString3,"AT&C1&D2S58=2S59=15/(ExtraMdmCmds)")
elseif equal(ModemNumber, 65)
set string(MiscString3,"AT&C1&D2S58=2S59=15/(ExtraMdmCmds)")
elseif equal(ModemNumber, 37)
set string(MiscString3,"AT&C1&D2S58=2S59=15/(ExtraMdmCmds)")
elseif equal(ModemNumber, 51)
set string(MiscString3,"ATS52=1S53=1S58=2S66=1S95=2/(ExtraMdmCmds)")
else
set string(MiscString3,"ATS52=1S53=1S58=2S66=1/(ExtraMdmCmds)")
endif
wait seconds (1)
goto InitializeModem
WorldBlazer:
option("Blank", yes)
option("Display Ascii", yes)
option("Tenths", yes)
type("AT/r",0)
if wait text("OK",1)
ifnot wait line(1,1) greater(2,1)
option("Blank", no)
option("Display Ascii", no)
option("Tenths", no)
goto TelebitInit
else
length(ModemName, MiscInt1)
add(MiscInt1, 35)
option("Blank", no)
option("use menu colors", yes)
option("Blink", yes)
position(2,MiscInt1)
prompt("(Hunting for DTE rate...)")
option("Blank", yes)
option("use menu colors", no)
option("Blink", no)
position(5,1)
endif
set integer(BaudIndex, 13)
set flag(SlowOS2, false)
if flag(OS2)
if less(OSVersion, 200)
set flag(SlowOS2, True)
endif
endif
goto HuntLoop
HuntLoop:
if equal(BaudIndex,13)
if and(OS2, SlowOS2) goto NextBaudIndex
set integer(TempBaud,38400)
elseif equal(BaudIndex,12)
set integer(TempBaud,19200)
elseif equal(BaudIndex,11)
set integer(TempBaud,9600)
elseif equal(BaudIndex,10)
set integer(TempBaud,2400)
elseif equal(BaudIndex,9)
if and(OS2, SlowOS2) goto NextBaudIndex
set integer(TempBaud,57600)
elseif equal(BaudIndex,8)
if and(OS2, SlowOS2) goto NextBaudIndex
set integer(TempBaud,115200)
elseif equal(BaudIndex,7)
if and(OS2, SlowOS2) goto NextBaudIndex
set integer(TempBaud,76800)
elseif equal(BaudIndex,6)
if and(OS2, SlowOS2) goto NextBaudIndex
set integer(TempBaud,14400)
elseif equal(BaudIndex,5)
if and(OS2, SlowOS2) goto NextBaudIndex
set integer(TempBaud,12000)
elseif equal(BaudIndex,4)
if and(OS2, SlowOS2) goto NextBaudIndex
set integer(TempBaud,7200)
elseif equal(BaudIndex,3)
if and(OS2, SlowOS2) goto NextBaudIndex
set integer(TempBaud,4800)
elseif equal(BaudIndex,2)
set integer(TempBaud,1200)
elseif equal(BaudIndex,1)
set integer(TempBaud,300)
endif
type("AT/r",0)
if wait text("OK",1)
ifnot wait line(1,1) greater(2,1)
option("Tenths", no)
option("Blank", no)
option("use menu colors", yes)
position(2,MiscInt1)
prompt(" ")
option("use menu colors", no)
position(5,1)
option("Blank", no)
option("Display Ascii", no)
goto TelebitInit
endif
NextBaudIndex:
if decrement(BaudIndex) goto HuntLoop
option("Blank", no)
option("Display Ascii", no)
option("Tenths", no)
goto ErrNoModemResponse
TelebitInit:
if equal(BaudRate,115200)
set integer(BaudIndex,9)
elseif equal(BaudRate,76800)
set integer(BaudIndex,8)
elseif equal(BaudRate,57600)
set integer(BaudIndex,7)
elseif equal(BaudRate,38400)
set integer(BaudIndex,6)
elseif equal(BaudRate,19200)
set integer(BaudIndex,5)
elseif equal(BaudRate,14400)
set integer(BaudIndex,46)
elseif equal(BaudRate,12000)
set integer(BaudIndex,43)
elseif equal(BaudRate,9600)
set integer(BaudIndex,4)
elseif equal(BaudRate,7200)
set integer(BaudIndex,35)
elseif equal(BaudRate,4800)
set integer(BaudIndex,3)
elseif equal(BaudRate,2400)
set integer(BaudIndex,2)
elseif equal(BaudRate,1200)
set integer(BaudIndex,1)
elseif equal(BaudRate,300)
set integer(BaudIndex,0)
endif
position(5,1)
type("AT&F&C1&D2X2S0=/(RingsToAnswer)S11=55S51=/(BaudIndex)S58=2S59=15S69=2S92=1/(ExtraMdmCmds)/r",0)
ifnot wait text("OK",3) goto ErrNoModemResponse
ifnot wait line(1,1) greater(2,1)
setting("baud",BaudRate)
set flag(HHS,true)
set integer(AnswerCall, 1)
goto PrepareToWait
Rixon:
wait seconds (1)
type("/r/r")
ifnot wait text("$",10) goto ErrNoModemResponse
wait seconds (1)
type("NU")
ifnot wait text("OK",3) goto ErrNoModemResponse
option("rvideo",on)
goto CarrierDetectError
USR2400E:
set integer(MiscInt2,7)
USR2400E1:
type("AT/r")
if wait text("OK",1) goto USR2400E2
if equal(MiscInt2,7) setting("baud",2400)
if equal(MiscInt2,6) setting("baud",19200)
if equal(MiscInt2,5) setting("baud",9600)
if equal(MiscInt2,4) setting("baud",4800)
if equal(MiscInt2,3) setting("baud",1200)
if equal(MiscInt2,2) setting("baud",300)
if equal(MiscInt2,1) setting("baud",600)
if decrement(MiscInt2) goto USR2400E1
goto ErrNoModemResponse
USR2400E2:
ifnot wait lines(1,3) prompt("/n")
if less(BaudRate,4800) type("AT&F/r")
if equal(BaudRate,19200) type("AT&F&B7/r")
if equal(BaudRate,9600) type("AT&F&B6/r")
if equal(BaudRate,4800) type("AT&F&B5/r")
ifnot wait text("OK",8) goto ErrNoModemResponse
ifnot wait lines(1,3) prompt("/n")
setting("baud",BaudRate)
set flag(HHS,true)
type("ATE1X4&H1&R2&D2&C1S0=/(RingsToAnswer)/(ExtraMdmCmds)/r")
if wait text("OK",15) goto ContinueModemInit
goto ErrNoModemResponse
USR2400:
set string(MiscString2,"/(MiscString3)")
type("ATS14?/r")
ifnot wait text("OK",15) goto ErrNoModemResponse
if screen match("000",4) set string(MiscString2,"/(MiscString2)&C1&D2/(ExtraMdmCmds)")
set string(MiscString3,"/(MiscString2)")
ifnot wait line(1,1) prompt("/n")
goto InitializeModem
Convertible:
prompt("/n")
option("receive line feeds",yes)
set string(MiscString3,"/x0EL 0,F 4,C 1,S 2")
if equal(BaudRate,300) set string(MiscString3,"/x0EL 0,F 4,C 1,S 1")
if equal(BaudRate,110) set string(MiscString3,"/x0EL 0,F 4,C 1,S 0")
setting("baud",1200)
type("/(MiscString3)/r")
if wait text("OK",5) goto ContinueModemInit
setting("baud",300)
type("/(MiscString3)/r")
if wait text("OK",5) goto ContinueModemInit
setting("baud",110)
type("/(MiscString3)/r")
if wait text("OK",5) goto ContinueModemInit
goto ErrNoModemResponse
Avatex:
set string(MiscString3,"in. ")
if equal(BaudRate,300) goto Avatex1
set string(MiscString3,"out.")
Avatex1:
position(2,5)
prompt("The DATA//VOICE button should be in and the 300//1200 button should be /(MiscString3)")
goto CheckModem1
Avatex2:
set string(MiscString3,"ATAA")
ifnot flag(FromVoiceCall) goto InitializeModem
goto VoiceToData1
MultiTech:
set flag(HHS,true)
type("AT&FX4B0$BA0$SB/(BaudRate)/r")
gosub CheckResponse
type("AT&E1&E4&E7&E13S0=/(RingsToAnswer)/(ExtraMdmCmds)/r")
gosub CheckResponse
type("AT/r")
gosub CheckResponse
goto ContinueModemInit
Microcom:
;Modem number 44 = Microcom QX/4232hs
;Modem number 123 = Microcom QX/4232bis
if equal(ModemNumber, 44) set integer(LoopCount,6)
if equal(ModemNumber, 123) set integer(LoopCount,8)
if flag(OS2)
ifnot equal(OSVersion, 200) set integer(LoopCount, 6)
endif
Microcom1:
if equal(LoopCount,8) set integer(TempBaud,115200)
if equal(LoopCount,7) set integer(TempBaud,38400)
if equal(LoopCount,6) set integer(TempBaud,9600)
if equal(LoopCount,5) set integer(TempBaud,19200)
if equal(LoopCount,4) set integer(TempBaud,4800)
if equal(LoopCount,3) set integer(TempBaud,2400)
if equal(LoopCount,2) set integer(TempBaud,1200)
if equal(LoopCount,1) set integer(TempBaud,300)
ifnot setting("baud", TempBaud)
if decrement(LoopCount)
goto Microcom1
else
goto ErrNoModemResponse
endif
endif
type("AT&F/r")
if wait text("OK",1)
ifnot wait lines(1,1) prompt("/n")
goto Microcom2
endif
if decrement(LoopCount) goto Microcom1
goto ErrNoModemResponse
Microcom2:
if less(TempBaud,2401) goto Microcom3
type("AT%U/r")
gosub CheckResponse
Microcom3:
setting("baud", BaudRate)
if equal(ModemNumber, 123)
set string(MiscString3,"AT&F&C1&D2\J0\N3\Q3\V2W2-M\X1S0=/(RingsToAnswer)")
else
set string(MiscString3,"ATX4&C1&D2\J0\N3\Q3S0=/(RingsToAnswer)")
endif
set flag(HHS, true)
type("/(MiscString3)/r")
gosub CheckResponse
Microcom4:
if length("/(ExtraMdmCmds)", MiscInt1)
ifnot string match(InitString2, "AT") set string(InitString2, "AT")
set string(InitString2,"/(InitString2)/(ExtraMdmCmds)")
type("/(InitString2)/r")
gosub CheckResponse
endif
goto ContinueModemInit
Concord:
type("ATZ/r")
if wait text("OK",7) goto Concord1
ifnot screen match(">",1) goto ErrNoModemResponse
type("SMC/r")
if wait text("OK",7) goto Concord1
goto ErrNoModemResponse
Concord1:
if wait line(1,1) goto Concord2
Concord2:
type("AT@ SMD2 SMF0 SLCA2 SPF2 SLCB0 SLCF1 SLCD1 /(ExtraMdmCmds)/r")
ifnot wait text("OK",18) goto ErrNoModemResponse
if wait line(1,1) goto Concord3
Concord3:
set flag(HHS, true)
if less(RingsToAnswer,2) set integer(RingsToAnswer,2)
set string(MiscString3,"AT X1 S0=/(RingsToAnswer)")
goto InitializeModem
UserDefined:
ifnot read from("modemdef.dat") goto ErrNoModemDef
ifnot read string(UserDefCall,"") goto ErrBadModemDef
ifnot read string(UserDefAnswer, "") goto ErrBadModemDef
ifnot read string(UserDefDial, "") goto ErrBadModemDef
ifnot read string(UserDefHangup, "") goto ErrBadModemDef
ifnot read string(UserDefCD, "") goto ErrBadModemDef
ifnot read string(UserDefToggleDTR, "") goto ErrBadModemDef
ifnot read string(UserDefHHS, "") goto ErrBadModemDef
read from("")
set flag(UserDefinedModem, true)
set string(MiscString3, UserDefAnswer)
if length("/(ExtraMdmCmds)",MiscInt2) set string(MiscString3,"/(MiscString3)/(ExtraMdmCmds)")
if wait carrier(0,0)
if string match(UserDefCD,"NO")
goto CarrierDetectError
endif
endif
if string match(UserDefHHS,"YES")
set flag(HHS, true)
else
set flag(HHS, false)
endif
goto CheckModem
InitializeModem:
gosub CheckAbort
type("/(MiscString3)/r",50)
ifnot wait text("OK",5) goto ErrNoModemResponse
ifnot wait lines(1,1) goto ErrNoModemResponse
if equal(ModemNumber,47) goto Rixon
if length(InitString2, MiscInt1)
type("/(InitString2)/r")
ifnot wait text("OK",5) goto ErrNoModemResponse
ifnot wait lines(1,1) goto ErrNoModemResponse
endif
gosub CheckAbort
if get environment(S(9),"HA5INIT")
if string match(S(9),"TRUE")
put environment("HA5INIT","")
wipe screen()
prompt("Modem initialized.../n")
end()
endif
endif
ContinueModemInit:
gosub CHeckAbort
set integer(MiscInt2,BaudRate)
set integer(AnswerCall,1)
setting("baud",BaudRate)
if equal(ModemNumber,42) gosub SetFastlinkSub
wait seconds (1)
ifnot equal(ModemNumber,47) goto ContinueModemInit1
type("ATZ/r")
wait seconds (1)
ContinueModemInit1:
ifnot flag(FromVoiceCall) goto PrepareToWait
VoiceToData:
ifnot equal(ModemNumber,45) type("ATA/r")
if equal(ModemNumber,45) type("/x0EA/r")
if wait carrier(1,40) goto AdjustBaudRate
set integer(EscBranch ,295)
set string(MiscString3,"A data connection could not be established.")
gosub DisplayBanner
goto _Error
VoiceToData1:
set integer(EscBranch ,980)
type("A/r")
ifnot wait text("RIER",5) goto _Escape
goto _Escape
PrepareToWait:
if flag(ISDN_Support) goto WaitForCarrier
if equal(ModemNumber,45) goto PrepareToWait2
ifnot equal(BaudRate,2400) goto PrepareToWait1
setting("baud",BaudRate)
if equal(ModemNumber,42) gosub SetFastlinkSub
type("AT/r")
PrepareToWait1:
if flag(LeasedLine) goto DirectCableHost
if equal(ModemNumber,97) goto UncommandedModems
if equal(ModemNumber,98) goto UncommandedModems
if equal(ModemNumber,99) goto UncommandedModems
PrepareToWait2:
wait seconds (1)
gosub DisplayBanner4
WaitForCarrier:
gosub DisplayBanner5
set integer(LoopCount, 60)
while decrement(LoopCount)
gosub CheckAbort
if wait carrier(1,1) goto AdjustBaudRate
endwhile
goto WaitForCarrier
AdjustBaudRate:
if wait lines(1,1) goto AdjustBaudRate
AdjustBaudRate1:
if equal(ModemNumber,17) goto AdjustBaudRate2
if equal(ModemNumber,61) wait seconds(5)
if flag(HHS) goto SetBaudAndSynch1
AdjustBaudRate2:
ifnot screen match("NECT",5) goto ConfigureHostTerminal
ifnot get integer(MiscInt2,"/S(9)") goto ConfigureHostTerminal
ifnot equal(ModemNumber,17) goto AdjustBaudRate3
if greater(MiscInt2,3000) goto SetBaudAndSynch1
AdjustBaudRate3:
if equal(MiscInt2,300) goto SetBaudAndSynch
if equal(MiscInt2,600) goto SetBaudAndSynch
if equal(MiscInt2,1200) goto SetBaudAndSynch
if equal(MiscInt2,2400) goto SetBaudAndSynch
if equal(MiscInt2,4800) goto SetBaudAndSynch
if equal(MiscInt2,9600) goto SetBaudAndSynch
if equal(MiscInt2,19200) goto SetBaudAndSynch
goto ConfigureHostTerminal
SetBaudAndSynch:
setting("baud",MiscInt2)
SetBaudAndSynch1:
set flag(ConstantDteRate,true)
ConfigureHostTerminal:
set integer(EscBranch ,620)
gosub SetFlowControl
option("use menu colors",yes)
option("bold",yes)
prompt("/n")
get position(Row,Col)
if greater(Row, 15)
wipe screen()
set integer(Row,0)
endif
add (Row,1)
position(Row,0)
if flag(FromVoiceCall) draw box(5,80)
ifnot flag(FromVoiceCall) draw box(4,80)
option("bold",no)
add(Row,1)
position(Row,3)
prompt("Your modem has just answered a data call.")
option("use menu colors",no)
ifnot flag(FromVoiceCall) goto SynchronizeCall
add(Row,1)
position(Row,5)
option("use menu colors",yes)
key string(MiscString3,"Place your telephone receiver in its cradle now and press ENTER when ready.")
SynchronizeCall:
position(Row,5)
ifnot equal(ModemNumber,26) goto SynchronizeCall1
type("/x11")
wait seconds (1)
SynchronizeCall1:
add(Row,1)
position(Row,5)
if flag(ConstantDteRate) goto SynchronizeCall2
if synchronize(MiscInt2,60) goto SynchronizeCall2
option("use menu colors",yes)
prompt("Unable to find the incoming call's baud rate./n/n/n")
option("use menu colors",no)
goto HardwareDisconnect
SynchronizeCall2:
set flag(ConstantDteRate,false)
option("use menu colors",yes)
report("baud", DisplayRate)
prompt("The incoming call is at /(DisplayRate) baud./n/n/n")
option("use menu colors",no)
ifnot equal(ModemNumber,45) goto GetPassword
character delay(50)
if equal(MiscInt2,BaudRate) goto SynchronizeCall4
setting("baud",BaudRate)
if equal(MiscInt2,300) type("/x0ES 1/r")
if equal(MiscInt2,1200) type("/x0ES 2/r")
if wait text("OK",3) goto SynchronizeCall3
SynchronizeCall3:
setting("baud",MiscInt2)
SynchronizeCall4:
wait seconds (1)
type("/x0ET 0/r")
wait seconds (2)
GetPassword:
if wait characters("/x0D", 1) goto GetPassword:
character delay(0)
set integer(PasswordRetry,3)
GetPassword1:
set string(Password,"")
if password("/(Password)",1) goto PasswordValid
get position(Row,Col)
option("use menu colors",yes)
option("bold",yes)
draw box(3,80)
add(Row,1)
position(Row,3)
option("bold",no)
prompt("For the host only: You can skip the required password by pressing ESC.")
option("use menu colors",no)
add(Row,3)
position(Row,1)
set integer(EscBranch ,490)
set integer(Row,4)
if flag(DirectCable) set integer(Row,1000)
GetPassword2:
set flag(CallerIsLoggedOn,false)
option("rvideo",off)
timeout(30)
if flag(DirectCable) timeout(6000)
option("receive line feeds",no)
prompt("Enter password: /r")
type("Enter password: ",0)
GetPassword3:
option("blank",yes)
ifnot fetch string(Password,"") goto CheckPassword1
option("blank",no)
prompt("Enter password: ")
CheckPassword:
if password("/(Password)",1) goto PasswordValid
CheckPassword1:
option("blank",no)
ifnot wait carrier(0,0) goto ResetHost
CheckPassword2:
type("/rIncorrect password/r",0)
if decrement(PasswordRetry) goto GetPassword2
if flag(DirectCable) goto GetPassword2
type("/rIf you are having difficulties logging/r",0)
type("onto this host, please contact your host operator.",0)
goto HardwareDisconnect
PasswordValid:
set flag(CallerIsLoggedOn,true)
type("/r")
timeout(30)
option("blank",no)
set string(CallersName,"/S(9)")
set integer(EscBranch ,620)
GetUserName:
if length("/(CallersName)",MiscInt1) goto CallbackCheck
option("echo",yes)
ifnot fetch string(CallersName,"/rPlease enter your name: ") goto HardwareDisconnect
type("/r")
option("echo",no)
password("/(CallersName)",40)
CallbackCheck:
set string(MiscString3,"")
if flag(DirectCable) goto ScrogAtLogon
password("/(Password)",11)
ifnot length("/S(9)", MiscInt1) goto ScrogAtLogon
type("/rCallback will take place in 15 seconds./r",0)
hangup()
wipe screen()
set integer(MiscInt1,15)
while decrement(MiscInt1)
position(1,1)
prompt("Callback will take place in /(MiscInt1) seconds... /n")
wipe screen(10,80)
wait seconds(1)
endwhile
if flag(ISDN_Support)
ifnot call("/S(9)") goto ErrNoModemResponse
goto CallBackCheck1
endif
option("fduplex", on)
character delay(50)
gosub SetFlowControl1
type("ATDT/S(9)/r")
;type("ATDP/S(9)/r")
prompt("/n/n")
option("fduplex", off)
character delay(0)
CallbackCheck1:
gosub SetFlowControl
ifnot wait carrier(1,60) goto HardwareDisconnect
ScrogAtLogon:
ifnot flag(PopupOS2) goto GetLogonScrog
ifnot popup("A caller has just logged onto HyperACCESS//5",5) goto GetLogonScrog
GetLogonScrog:
option("echo",on)
set integer(PasswordDetail,12)
option("echo", yes)
GetNextLogonScrog:
password("/(Password)",PasswordDetail)
set string(ScrogName, "/S(9)")
ifnot length(ScrogName,MiscInt1) goto LetCallerIn
password("/(Password)", 20)
get integer(ScrogType,"/S(9)")
if equal(ScrogType, 0)
ifnot run(ScrogName) goto SetLogonDetailNumber
elseif equal(ScrogType, 1)
ifnot execute(ScrogName, no) goto SetLogonDetailNumber
elseif equal(ScrogType, 2)
ifnot execute(ScrogName, yes) goto SetLogonDetailNumber
endif
SetLogonDetailNumber:
set integer(PasswordDetail,13)
goto GetNextLogonScrog
LetCallerIn:
timeout(30)
date(DateTime)
time(MiscString2,MiscInt1)
wipe screen()
position(1,1)
type("/rYou're in at /(MiscString2) on /(DateTime), /(CallersName)./r",0)
type("Welcome to HyperACCESS//5 by Hilgraeve/r/r",0)
StartLogging:
add(CallsReceived,1)
ifnot flag(Logging) goto StartSlave
ifnot write to(LogFileName,true) goto StartSlave
ifnot write("/r/n/(CallersName), /(DateTime) /(MiscString2)") goto StartSlave
ifnot flag(DirectCable)
set string(MiscString3,"Duration = //DURATION (min:sec)/r/n/r/n")
log duration(MiscString3,LogFileName)
else
time(MiscString1, DirectStartTime)
endif
StartSlave:
option("receive line feeds",yes)
option("bottom line",yes)
if get environment(MiscString3,"HA5_NOSLAVE") goto LogCallerOff
cdelay(0)
ifnot flag(DirectCable) slave(15)
if flag(DirectCable) slave(0)
LogCallerOff:
gosub SetFlowControl1
character delay(0)
option("fduplex",no)
ifnot wait carrier(0,0) goto LogCallerOff1
type("/rThank you for using HyperACCESS//5, /(CallersName). Goodbye./r/n/n",0)
LogCallerOff1:
option("fduplex",no)
SetBannerInfo:
set string(LastCallerName,"/(CallersName)")
ifnot length(LastCallerName,MiscInt1) greater(2,1)
if greater(MiscInt1,16) left(LastCallerName,16)
time(LastCallTime, MiscInt1)
left(LastCallTime,5)
LogDirectCableDuration:
timeout(30)
ifnot flag(DirectCable) goto HardwareDisconnect
time(MiscString1,DirectEndTime)
ifnot flag(Logging) goto ScrogAtLogoff
ifnot write to(LogFileName,true) goto ScrogAtLogoff
subtract(DirectEndTime, DirectStartTime)
add(DirectEndTime,1)
ifnot write("Duration = /(DirectEndTime):00 (min:sec)") goto ScrogAtLogoff
goto ScrogAtLogoff
HardwareDisconnect:
if flag(DirectCable) goto ScrogAtLogoff
if flag(UserDefinedModem)
ifnot string match(UserDefToggleDTR,"YES")
goto SoftwareDisconnect
endif
endif
gosub SetFlowControl1
ifnot wait carrier(0,0) goto ScrogAtLogoff
if equal(ModemNumber,62) goto TelradHangup
ifnot equal(ModemNumber,62) hangup()
ifnot wait carrier(3,1) goto ScrogAtLogoff
if equal(ModemNumber,45) goto ManualDisconnect
if equal(ModemNumber,97) goto ResetHost
if equal(ModemNumber,98) goto ResetHost
SoftwareDisconnect:
character delay(250)
wait seconds (1)
type("+++")
wait seconds (2)
if flag(UserDefinedModem)
type(UserDefHangup, 0)
else
type("ATH0/r", 0)
endif
ifnot wait carrier(4,1) goto ScrogAtLogoff
if equal(ModemNumber,51) goto ManualDisconnect
wait seconds (2)
ifnot wait carrier(4,1) goto ScrogAtLogoff
TelradHangup:
break()
ifnot wait text("*",10) goto TelradHangup
type("clr/r",30)
ifnot wait line(1,2) goto TelradHangup
ifnot wait text("*",20) goto TelradHangup
goto ScrogAtLogoff
ManualDisconnect:
set flag(ManualHangup,true)
set string(MiscString3,"You will have to hang up your modem by hand and then press ENTER to continue. ")
gosub DisplayBanner2
option("rvideo",on)
if alert("",60) goto ScrogAtLogoff
if wait carrier(0,0) goto ManualDisconnect
ScrogAtLogoff:
ifnot flag(CallerIsLoggedOn) goto ResetHost
set integer(PasswordDetail,16)
GetNextLogoffScrog:
password("/(Password)",PasswordDetail)
set string(ScrogName, "/S(9)")
ifnot length(ScrogName,MiscInt1) goto ResetHost
password("/(Password)", 20)
get integer(ScrogType, "/S(9)")
if equal(ScrogType, 0)
ifnot run(ScrogName) goto SetLogoffDetailNumber
elseif equal(ScrogType, 1)
ifnot execute(ScrogName, no) goto SetLogoffDetailNumber
elseif equal(ScrogType, 2)
ifnot execute(ScrogName, yes) goto SetLogoffDetailNumber
endif
SetLogoffDetailNumber:
set integer(PasswordDetail,17)
goto GetNextLogoffScrog
ResetHost:
password("/(Password)",0)
if flag(DirectCable) goto DirectCableHost
gosub SetFlowControl1
set integer(EscBranch ,980)
if flag(ISDN_Support) goto SpecialHangup
if equal(ModemNumber,97) goto ManualHangup
if equal(ModemNumber,98) goto ManualHangup
if equal(ModemNumber,99) goto ManualHangup
if flag(DirectConnect) goto SpecialHangup
if flag(ManualHangup) goto SpecialHangup
goto SpecialHangup
ManualHangup:
option("use menu colors",no)
wipe screen()
if equal(ModemNumber,99) goto SpecialHangup
position(1,1)
option("use menu colors",yes)
option("bold",yes)
draw box(3,80)
option("bold",no)
position(2,3)
prompt("Place the phone receiver in the cradle now and press ENTER when ready. ")
option("use menu colors",no)
wait key(MiscString3,100)
SpecialHangup:
if flag(FromVoiceCall) goto _Error
if flag(DirectCable) goto _Error
if equal(ModemNumber,97) goto AcousticOrDirect1
if equal(ModemNumber,98) goto UncommandedModems
if flag(ManualHangup) goto SpecialHangup2
if equal(ModemNumber,102) goto ISDNDevices
if flag(ISDN_Support) goto PrepareToWait2
if equal(ModemNumber,99) goto PrepareToWait2
if equal(ModemNumber,17) goto SpecialModemSupportRoutines
if equal(ModemNumber,45) goto SpecialModemSupportRoutines
if equal(ModemNumber,49) setting("baud",BaudRate)
if equal(ModemNumber,49) goto SpecialModemSupportRoutines
if equal(ModemNumber,61) set string(MiscString2,"AT&T ISDN deskset")
if equal(ModemNumber,61) goto PrepareToWait2
if equal(ModemNumber,62) set string(MiscString2,"Telrad IDS 287")
if equal(ModemNumber,62) goto CarrierDetectCheck
if equal(ModemNumber,63) goto SpecialHangup1
if equal(ModemNumber,64) goto SpecialHangup1
goto PrepareToWait
SpecialHangup1:
if flag(FromVoiceCall) goto PrepareToWait
goto _Escape
SpecialHangup2:
set flag(ManualHangup,false)
if equal(ModemNumber,99) goto AutodialSwitch
goto SpecialModemSupportRoutines
UncommandedModems:
if equal(ModemNumber,99) goto AutodialSwitch
if equal(ModemNumber,97) goto AcousticOrDirect1
AcousticOrDirect:
option("use menu colors",no)
wipe screen()
option("use menu colors",yes)
option("bold",yes)
position(1,1)
draw box(8,80)
position(8,32)
prompt(" ESC to cancel ")
option("bold",no)
set flag(ModemResponded,true)
position(2,3)
prompt("To answer a data call or to switch from a voice call to a data call...")
position(4,4)
prompt("1. Pickup the telephone receiver when the telephone rings.")
position(5,4)
prompt("2. Set the modem's ORIGINATE//ANSWER switch to ANSWER.")
position(6,4)
if equal(ModemNumber,98) prompt("3. Nest the receiver in the rubber cups.")
if equal(ModemNumber,97) prompt("3. Set the modem's TALK//DATA switch to DATA, or press the CONNECT button.")
position(7,4)
prompt("4. Press ENTER when the data call is established. ")
key string(MiscString3,"")
set integer(AnswerCall,1)
if wait carrier(1,5) goto AdjustBaudRate
option("use menu colors",no)
wipe screen()
goto ErrNoDataConnection
AcousticOrDirect1:
option("use menu colors",no)
wipe screen()
option("use menu colors",yes)
if flag(FromVoiceCall) goto AcousticOrDirect
if flag(DirectConnect) goto AcousticOrDirect4
if flag(ModemResponded) goto AcousticOrDirect
position(1,1)
option("bold",yes)
draw box(3,80)
position(3,32)
prompt(" ESC to cancel ")
option("bold",no)
position(2,3)
prompt("Can your /(MiscString2) auto-answer? (Y or N) ")
option("use menu colors",no)
AcousticOrDirect2:
wait key(MiscString3,100)
if string match(MiscString3,"N") goto AcousticOrDirect
if string match(MiscString3,"Y") goto AcousticOrDirect3
goto AcousticOrDirect2
AcousticOrDirect3:
set flag(DirectConnect,true)
wipe screen()
position(1,1)
option("use menu colors",yes)
option("bold",yes)
draw box(4,80)
position(4,32)
prompt(" ESC to cancel ")
option("bold",no)
position(2,3)
prompt("Manually set your modem's ORIGINATE//ANSWER switch to ANSWER and set")
position(3,3)
prompt("the TALK//DATA switch to DATA. Press ENTER when your modem is ready.")
key string(MiscString3,"")
set integer(AnswerCall,1)
goto PrepareToWait2
AcousticOrDirect4:
option("use menu colors",no)
wipe screen()
option("use menu colors",yes)
option("bold",yes)
position(1,1)
draw box(3,80)
position(3,32)
prompt(" ESC to cancel ")
option("bold",no)
position(2,3)
prompt("Place your telephone receiver in its cradle now and press ENTER when ready.")
wait key(MiscString3,100)
goto PrepareToWait2
AutodialSwitch:
option("use menu colors",no)
wipe screen()
option("use menu colors",yes)
position(1,1)
if flag(FromVoiceCall) goto VoiceToDataAutoDial
option("bold",yes)
draw box(4,80)
position(4,26)
prompt(" ALT-R then ESC to cancel ")
option("bold",no)
position(2,3)
prompt("Manually command your modem to answer calls. Include a command that")
position(3,3)
prompt("will turn local echo off. Press ALT-R when your modem is ready.")
option("use menu colors",no)
prompt("/n/n/n")
type("<ALT-L>VKA")
set integer(AnswerCall,1)
goto PrepareToWait2
VoiceToDataAutoDial:
option("use menu colors",off)
wipe screen()
option("use menu colors",on)
option("bold",yes)
position(1,1)
draw box(5,80)
option("bold",no)
position(2,3)
prompt("Manually command your modem to emit an answering carrier tone.")
position(3,3)
prompt("When the data connection is established, press ALT-R. If the data connection")
position(4,3)
prompt("cannot be established, press ALT-R, then ESC to return to the menus.")
option("use menu colors",off)
prompt("/n/n/n")
type("<ALT-L>VKA")
if wait carrier(1,5) goto AdjustBaudRate
goto ErrNoDataConnection
SetFlowControl:
option("echo",no)
option("fduplex",no)
option("use line wait",no)
option("send line feeds",yes)
option("receive line feeds",yes)
character delay(0)
ifnot flag(HHS) return()
setting("outgoing hhs",4)
setting("incoming hhs",5)
return()
SetFlowControl1:
option("echo",no)
option("fduplex",yes)
option("use line wait",yes)
option("send line feeds",no)
option("receive line feeds",no)
character delay(50)
return()
SetFastlinkSub:
set integer(MiscInt1,BaudRate)
divide(MiscInt1,10)
multiply(MiscInt1,9)
setting("baud", MiscInt1)
set integer(ModemNumber,42)
return()
SetDowtySub:
set integer(MiscInt2,0)
if equal(BaudRate,19200) set integer(MiscInt2,17)
if equal(BaudRate,9600) set integer(MiscInt2,13)
if equal(BaudRate,4800) set integer(MiscInt2,11)
if equal(BaudRate,2400) set integer(MiscInt2,10)
if equal(BaudRate,1200) set integer(MiscInt2,9)
if equal(BaudRate,300) set integer(MiscInt2,7)
if equal(BaudRate,110) set integer(MiscInt2,3)
if equal(BaudRate,50) set integer(MiscInt2,1)
return()
CheckResponse:
ifnot wait text("OK", 3) goto ErrNoModemResponse
ifnot wait lines(1, 1) goto ErrNoModemResponse
return()
CheckAbort:
mouse position(Row, Col)
if equal(Row, 0) return()
if string match(S(9), "ESC") goto _Escape
return()
DisplayBanner:
set integer(MiscInt2, 80)
ifnot length("/(MiscString3)",VoiceDataCable) goto DisplayBanner1
DisplayBanner1:
gosub DisplayBanner2
goto _Escape
DisplayBanner2:
option("use menu colors",yes)
option("bold",yes)
position(10,1)
draw box(3,80)
position(12,32)
prompt(" ESC to continue ")
option("bold",no)
position(11,3)
subtract(MiscInt2,VoiceDataCable)
divide(MiscInt2,2)
DisplayBanner3:
set string(MiscString3," /(MiscString3)")
if decrement(MiscInt2) goto DisplayBanner3
prompt("/(MiscString3)")
position(14,1)
whilenot get key(MiscString1)
gosub CheckAbort
wait seconds(1)
endwhile
return()
DisplayBanner4:
option("bottom line",no)
option("use menu colors",no)
gosub CheckAbort
wipe screen()
position(1,1)
option("use menu colors",yes)
option("bold",yes)
draw box(5,80)
position(1,12)
prompt("┬")
position(1,72)
prompt("┬")
position(2,12)
prompt("│")
position(2,72)
prompt("│")
position(3,1)
prompt("├──────────┴──────────────────────────────────────")
prompt("─────────────────────┴───────┤")
position(4,23)
prompt("·")
position(4,46)
prompt("·")
position(5,32)
prompt(" ESC to cancel ")
option("bold",no)
position(2,22)
prompt("HyperACCESS//5 is waiting for calls")
DisplayBanner5:
option("use menu colors",yes)
option("bold",yes)
date(MiscString3)
position(2,3)
prompt("/(MiscString3)")
time(MiscString3,VoiceDataCable)
left(MiscString3,5)
position(2,74)
prompt("/(MiscString3)")
option("bold",no)
position(4,3)
prompt("Calls received: /(CallsReceived)")
set integer(VoiceDataCable,1)
position(4,27)
prompt("Last call: /(LastCallTime)")
set integer(VoiceDataCable,0)
position(4,50)
prompt("Last caller: /(LastCallerName)")
option("use menu colors",no)
position(6,1)
wait seconds (2)
position(6,1)
wipe screen(20,80)
return()
ErrNoModemResponse:
set string(MiscString3,"Your modem isn't responding to commands. (See Appendix C for remedies).")
ErrDisplayErrMessage:
gosub DisplayBanner
goto _Error
ErrNoPhoneLine:
set string(MiscString3,"Your modem isn't connected to the phone line.")
goto ErrDisplayErrMessage
ErrUnsupportedRate:
set string(MiscString3,"Your modem doesn't support /(BaudRate) baud.")
goto ErrDisplayErrMessage
ErrSwitchNotAvailable:
set string(MiscString3,"Can't switch voice calls to data with the /(MiscString3) deskset.")
goto ErrDisplayErrMessage
ErrInvalidDataMode:
set string(MiscString3,"The /(MiscString3) deskset does not support that data mode.")
goto ErrDisplayErrMessage
ErrNoDataConnection:
set string(MiscString3,"A data connection could not be established")
goto ErrDisplayErrMessage
ErrNoModemDef:
set string(MiscString1,"User-defined modem definition file not found. Run the MODEMDEF script.")
goto ErrDisplayErrMessage
ErrBadModemDef:
set string(MiscString1,"User-defined modem definition file is bad. Run the MODEMDEF script.")
goto ErrDisplayErrMessage
_Escape:
option("mouse", off)
option("echo",no)
option("blank",off)
if equal(EscBranch ,295) goto VoiceToData1
if equal(EscBranch ,490) password("",50)
if equal(EscBranch ,490) goto PasswordValid
if equal(EscBranch ,620) goto HardwareDisconnect
_Error:
gosub SetFlowControl1
option("blank",no)
if equal(AnswerCall,0) goto ExitAnswerMode
if flag(ISDN_Support)
ifnot answer(FALSE) greater(2,1)
goto ExitAnswerMode
endif
if equal(ModemNumber, 97)
goto DirectConnectExit
elseif equal(ModemNumber, 98)
goto ExitAnswerMode
elseif equal(ModemNumber, 99)
goto AutodialExit
else
goto DisableAutoAnswer
endif
DirectConnectExit:
option("use menu colors",no)
wipe screen()
option("use menu colors",yes)
option("bold",yes)
position(1,1)
draw box(4,80)
option("bold",no)
position(2,3)
prompt("Manually set your modem's ORIGINATE//ANSWER switch to ORIGINATE or OFF.")
position(3,3)
prompt("Press ENTER when your modem is ready.")
wait key(MiscString3,100)
goto ExitAnswerMode
AutodialExit:
option("use menu colors",no)
wipe screen()
option("use menu colors",yes)
option("bold",yes)
position(1,1)
draw box(4,80)
option("bold",no)
position(2,3)
prompt("Manually command your modem to stop answering calls. When your modem")
position(3,3)
prompt("is ready, press ALT-M to return to the menus.")
option("use menu colors",no)
prompt("/n/n/n")
goto ExitAnswerMode
DisableAutoAnswer:
character delay(50)
if equal(ModemNumber,49) set string(MiscString3,"ATAD")
ifnot equal(ModemNumber,49) set string(MiscString3,"ATE1Q0S0=0")
if equal(ModemNumber,61) set string(MiscString3,"set an man")
if equal(ModemNumber,62) goto ExitAnswerMode
if equal(ModemNumber,63) goto ExitAnswerMode
if equal(ModemNumber,64) goto ExitAnswerMode
if equal(ModemNumber,17) set string(MiscString3,"AAA/(MiscString3)")
if equal(ModemNumber,45) prompt("/n")
if equal(ModemNumber,45) set string(MiscString3,"/x0EC 0")
set string(MiscString1,"OK")
if equal(ModemNumber,61) set string(MiscString1,"CMD:")
type("/(MiscString3)/r")
ifnot wait line(1,3) goto ExitAnswerMode
if wait text("/(MiscString1)",5) goto ExitAnswerMode
ExitAnswerMode:
password("/(Password)",0)
option("blank",no)
option("use menu colors",off)
wipe screen()
position(1,1)
character delay(0)
option("bottom line",on)
type("<ALT-M>A<ALT-L>SS")
end()