#!/usr/bin/perl # Connect to UCCS with PPP # Setup list with numbers to call # 528-1028 is 28k8, the others are 14k4 @number = ( '3110', ); # '528-1028', '528-1028', '260-7817', '260-5911', # '528-1028', '594-9850', '594-9851', # '528-1028', '594-9852', '594-9853', # '528-1028', '594-9854', '594-9855', # '528-1028', '594-9856', '594-9857', # '528-1028', '594-9858', '594-9859', #); # '528-1028', '535-0446', '535-0447', # '528-1028', '535-0448', '535-0449', #); # First part of "chat" expect/response pairs @chat1 = ( "ABORT BUSY\n", "ABORT 'NO CARRIER'\n", "ABORT 'NO DIAL TONE'\n", "\"\" ATZ\n", "OK \"\"\n", ); # Second part, one of the numbers above will be slipped between @chat # and @chat2 @chat2 = ( "ogin: jhjulkun\n", "word: xxxx\n", "mpc7 /usr/sbin/pppd\n", ); chdir("/usr/local/bin"); $i = 0; eval `/sbin/route del default`; while (1) { open(CHAT, '>pppuccs.chat'); print(CHAT @chat1); print(CHAT '"" \datdt', $number[$i], "\n"); print(CHAT @chat2); close(CHAT); print "Trying ", $number[$i], "\n"; system("/usr/sbin/pppd connect '/usr/sbin/chat -v -f pppuccs.chat -t 240' /dev/cua2 38400 -detach crtscts modem defaultroute"); $i++; if ($i > $#number) { $i = 0; } }