1 # =====================================================================================
2 # Chat script to dial our Company PPP account.
3 # They uses a call-back system to identify us and to reverse
4 # charge the call cost.
5 # =====================================================================================
8 # All the usual abort strings
15 # If calling outside allowed time we get this:
19 # Modem initialisation stuff
22 SAY "Initialising modem ...\n"
24 'OK\r\n' ATS0=1S11=60X4&K4S42.1=1
26 # Now dial our ISP and wait for connection
28 SAY "Dialling our ISP ...\n"
34 # This is the first stage login, we identify ourself so that the remote
35 # system will agree to call us back.
38 SAY "Sending Callback login ID ...\n"
39 name:-BREAK-name: callme
41 # From now on, we must assume no carrier is normal as well
42 # as receiving a HANGUP signal because it will be the
43 # case if our ISP clears the call to call us back.
45 CLR_ABORT "NO CARRIER"
50 # Now send password and wait to see what happens
52 SAY "Sending Callback password ...\n"
56 # What can happen now is:
57 # either: we get "You will be called back..." which is the successful case
58 # or: we get "Invalid login" and we abort (bad login ID or password)
59 # or: we get "NO CARRIER" because of an error, this will not abort
60 # and we will time out after 30 seconds
61 # or: we get nothing and we will time out after 30 seconds
64 # We reach here if we got "You will be called back..."
67 SAY "Now waiting for Call back ...\n"
69 # The remote system will now hangup and we will get both "NO CARRIER"
70 # and a hangup signal which are ignored. We now wait for a connection
71 # for up to 120 seconds. What happens here if somebody else calls before
72 # the remote system is a bit dangerous:
74 # If a malicious user connects and says 'name:', he will see 'PPPuser'
75 # If he then says 'word:' he will see the passowrd 'blipblop'. I may not
76 # know to which systems these belong to, though. It is up to you to consider
77 # that case and decide wether the risk is too big or not ....
82 # We have been called, re-arm ABORT on NO CARRIER and normal hangup signal
88 # Second stage login in order to start PPP
90 SAY "Remote system called back, logging in ...\n"
91 SAY "Sending login ID ...\n"
92 name:-BREAK-name: PPPuser
93 SAY "Sending password ...\n"
95 SAY "Asking to start PPP ...\n"
96 'CnetSrv' "ppp default"
97 "Entering PPP mode" \c
98 SAY "ISP PPP started ...\n"