! InterSLIP dial script for Hayes compatible modems and SLiRP ! Original script by Fred Morris ! Modifications by Adam C. Engst, Paul Ediger ! Modified for The Internet Adapter (TIA) by Bill Arnett ! Modified for SLiRP by Dameon D. Welch ! other users may have to modify the lines marked with "<-------- " @originate ! Initialize modem from string in InterSLIP configuration note "Initializing modem" write "^4\13" pause 10 ! Set speaker mode write "ATM^2\13" pause 10 SetTries 0 @label 8 ! Dial modem from number and tone/pulse option in InterSLIP configuration note "Dialing ^1" write "ATDT^3^1\13" pause 30 ! just so he can see the phone # ! Check only for BUSY or CONNECT matchstr 1 10 "BUSY" matchstr 2 20 "CONNECT" note "Waiting for CONNECT" matchread 500 @label 10 ! got BUSY or no response IncTries IfTries 99 15 ! <-------- try 99 times before asking user ! hang up and reinitialize modem from string in InterSLIP configuration note "Reinitializing modem" pause 30 write "+++" pause 60 write "ATH\13" pause 30 write "^4\13" jump 8 @label 15 ! ask the user if he wants to continue dialing ask 0 "enter anything to stop" SetTries 0 ifstr 1 8 "^*^1" ! he wants to stop SetTries 123 ! indicate that dialing failed exit -1 @label 20 ! got CONNECT, indicate success and proceed to the Gateway script exit 0 @hangup pause 10 IfTries 123 99 pause 10 IfTries 124 50 pause 1 note "Terminating SLiRP" write "000" ! <-------- 3 of the 5 zeroÕs to kill SLiRP pause 21 write "000" ! <-------- 3 more zeros to kill SLiRP matchclr SetTries 124 ! indicate that we've killed it note "Waiting for SLiRP to die" ! if we ran SLiRP under the shell then we should get another shell prompt; ! if we exec'ed it then the modem should hang up matchstr 1 30 "% " ! <-------- shell prompt matchstr 2 98 "NO CARRIER" matchread 400 ! if we fail to kill SLiRP, just drop the line anyway jump 50 @label 30 ! issue logout command to logout normally note "Logging out" write "logout\13" ! <-------- logout command matchclr ! the modem should notice that the host dropped the line matchstr 1 98 "NO CARRIER" matchread 400 ! if the host doesn't drop the line, we hang up locally @label 50 ! Hang up the modem note "Hanging up modem" write "+++" pause 60 write "ATH\13" @label 98 ! Reinitialize the modem from string in InterSLIP configuration write "^4\13" @label 99 ! we're outta here! note "Off" SetTries 0 exit 0