[net.sources] PC Pursuit Dialinfo Script

dave@sdeggo.UUCP (David L. Smith) (03/16/87)

	I've been using PC Pursuit for a couple of long distance connects and 
finally got sick of a rather gross little uucp script, so I coded up this 
dialinfo script. (Dialinfo was posted to mod.sources a few weeks back and is 
for Sys V systems)  The local dialer script is for a Hayes compatible modem 
with an extended command set.  It should work with real Hayes (remove the X2 
in the s1 line ), CTS 2400 and (probably) US Robotics modems.

In order to use this, replace everything in <> with the appropriate values,
and add this script into your dialinfo file.  Make a device /dev/<sysname>l
major and minor device numbers as one of your dial port, and add it into your 
L-devices file with

DIR <sysname>l dial<sysname> <speed>

Your L.sys file will look like:

funkyvax Any funkyvaxl 1200 funkyvaxl "" \r\r in:-\n-in: nuucp

The reason you must create a device for each system you wish to call with
dialer this dialer is that there is no way to specify that you wish to use
a particular dialer script except by specifying a line.  This means you can't
specify a phone number, which is why it is hard-wired into the script.  
Incidentally, this means you must have a different dial script for each site,
also.

This script retries on a busy about 3 times.  This limit can be bumped up by
increasing retry in line 3.  

Enjoy!

David L. Smith
ihnp4!jack!man!sdeggo!dave
sdcsvax!sdamos!sdeggo!dave

---------------Cut here-------------------------------------------------

dial<sysname>,
	star=*, pound=#, flash=H0\,H1,
	delay=\,, wait=\,, retry=20,
	s0=P1 M"AT Q0\r" [0]1 [in:]4 [IN:]4 [rd:]4 [RD:]4 S10 T3,
	s1=E"dialing Telenet" M"ATX2DT<Local Access Number>\r" [5]10 [6]7 [3]2 [7]5 [8]2 S60 T3,
	s2=E"no answer ..." D1 R3 G0,
	s3=E"no modem response ..." D1 R10 G0,
	s4=E"hung up unix system ..." D1 R5 G0,
	s5=E"busy ..." R3 G12,
	s6=E"no dialtone..." D1 R10 G0,
	s10=E"Connected to Telenet" M"\r\r" [NAL=]11 T20,
	s11=M"D1\r" G12,
	s12=M"\r" [@]13 T12 R3,
	s13=M"C DIAL408/12\,<Telenet ID>\r" [WORD =]14 T20,
	s14=M"<Telenet Password>\r" [CONNE]15 [BUSY]7,
# talk to dialer on other end of PC Pursuit
	s15=P1 M"ATZ\r" [OK]16 T3,
	s16=E"dialing %1 %2 %3 %4 %{DIALDEBUG}" M"ATDT<Remote's phone number>\r" [BUSY]17 [CONNE]19 S60 T18,
	s17=E"no answer ..." R3 G16,
#if no dialer response, close connection and get a new one ( if possible)
	s18=E"no modem response ..." M"@\rD\r" [DIS]13 R10 G20,
	s19=C1 G+,
	s20=E"Timed out waiting for Telenet response" D1 R3 G0,