home *** CD-ROM | disk | FTP | other *** search
- Answerer.BAS v1.0 07/02/91 by Frank J. Perricone
-
- As a SYSOP of a BBS I often felt the need for an "answering machine," i.e.,
- a program which answers the modem (as a BBS normally does) but only does
- things like inform the user that the SYSOP is down for maintenance. There
- were a number of these available but many of them suffered from one of three
- problems:
- 1. They didn't support unusual modem setups. This proves to be
- necessary, since most SYSOPs are using BBSes that aren't tied to
- single types of modems for a good reason.
- 2. Or they suffered from "creeping featuritis" where they ate up system
- resources having 8-color graphics screens with imbedded fonts and
- special mouse pointers, all for no good reason. I mean, this is an
- ANSWERING MACHINE, not a graphics system.
- 3. Or they couldn't deal with stubborn modems that didn't like hanging
- up with a simple +++ ATH0 command, as many (maybe most) are.
-
- Therefore, I wrote Answerer. I thought it would be good practice for
- getting to know the modem anyway.
-
- Answerer is a simple but powerful program. Only 4.5K or so in size, and
- taking up little more than this in memory, Answerer also uses the least
- chip RAM possible, with a tiny, out-of-the-way window which tells you only
- the status. A single menu controls all (both!) control functions: About,
- which is only there for my ego, and Quit. These functions are ghosted when
- a connection is in progress.
-
- To use Answerer, you must first create a file describing your configuration.
- If you intend to run Answerer from the Workbench or without parameters on
- the CLI, this should be named Answerer-config and is checked for in the
- following places: the current directory, then SYS:Config/, and then s:.
- [Note: I think that the s: directory is supposed to be used for scripts,
- not startup/configuration files as it is all-too-frequently used, so I
- try to use SYS:Config/ instead in hopes other programmers will follow
- suit. Look at the code for how to do this in BASIC; a similar approach
- works in C. No extra work--so why not?] If, on the other hand, you
- specify the filename on the CLI command line, it will be searched, and
- then Answerer checks to see if it is just a filename of a file in the
- above directories rather than a path. One way or the other, it finds the
- file, or ends with an error. Since you can provide a pathname at the CLI
- you can even have more than one configuration if you like.
-
- The configuration is composed of a number of lines, each having a label,
- then an equal sign, then a value. The labels are IGNORED but you have to
- have the values in the right order, so leave the labels in for your own
- sake! The equal sign is the important part, notating the beginning of the
- real data. The rest of the line up to the end-of-line is the actual data.
- All of these items must be present in the correct order; failure to do so
- can cause some strange results, like the modem getting the wrong codes at
- the wrong time, or having the program crash with a requestor saying
- something like "Read past end of file on #1" or something like that.
-
- Follwing are some important notes about these parameters.
- Text file= This is the full pathname of a text file to be displayed to the
- user. If this is blank, Answerer substitutes something
- noncommital like "Sorry, no one is here to answer your call."
- Typically the file says "Sorry, the Big Orange BBS is down for
- maintenance; try calling back about 3:30." Elaborate at will.
- Log file= If present, this parameter is a pathname to a file in which a
- log of Answerer-answered calls will be made, showing the date,
- date, time, and baud rate. If blank, no log is kept.
- Message file= If this is not blank, the user will be presented with the
- option of leaving a short message which will be appended
- to this file along with the date and time of the call.
- This can be the same as the Log file if desired.
- Beeps= If you want the Answerer to beep when it connects, set this to a
- non-zero value determing how many chords to arpeggiate (sp?).
- Maximum baud rate= Whatever you put here should be your modem's maximum
- baud rate; don't put anything else on this line!
- Modem setup= This should be a modem string which will set up your modem
- and which MUST include the following details: it must set
- auto-answer on (Hayes uses S0=2 or some other number of
- rings), command echo off (Hayes E0), verbose codes on (Hayes
- uses V1), and probably should shut the monitor speaker off
- for your non-listening pleasure (Hayes M0). Furthermore,
- you need to make sure your modem reports Carrier correctly;
- on 2400 baud Hayes modems, use &d2&C1 for this. A typical
- string for a SupraModem 2400 and most Hayes 2400 modems is
- ATE0M0Q0X1V1S0=2S12=100&d2&C1
- Modem reset= This is like Modem setup above but is what you want to do
- when shutting Answerer down. For example, shutting off
- auto-answer is popular (S0=0) and it can't hurt too much to
- zap it first (Z). So try ATZS0=0&d2&C1.
- Modem connect= There are actually 5 lines like this, numbered 300-9600.
- Fill in the string returned by the modem when a connection
- at that baud rate occurs. Any that are not available on
- your modem should be listed as "not available" (logically).
- Check out my enclosed file for some working sample settings.
-
- Now Answerer opens its little window with its text in white on orange (for
- visibility) and sets up, then loops through Idle mode (where you can pull
- down a menu for an About message or to Quit) to answering calls and doing
- its stuff. There really isn't anything more to it.
-
- Answerer tries to be small, quick, and quiet, but it isn't as quick as it
- wants to be as regards clock cycles--that is, it eats a bit too many.
- This is my intended main area of interest for the next revision. I intend
- to concentrate on slowing down its appetite during Idle mode, but not
- anywhere else. Hope it works.
-
- If you like Answerer, SEND NO MONEY! Just give me a call on my BBS and
- say hi. (Or if Answerer is running--leave a message on my machine!)
- The Crystal Ship, 907-364-3362, 300-2400 baud, is open 24 hours and
- services all kinds of computers.
-
- If you have some spare money laying around, pay off some other shareware
- you haven't paid for.
-
- This program is in the public domain. However, I retain the following
- rights:
- 1. I retain the right to use this code, concept, etc. for anything else
- I want indefinitely. So don't try to copyright it out from under me!
- 2. If you alter it, you must retain credit for me. Expand the docs,
- About window, etc. to give yourself credit but leave my credits in!
- 3. Any variations of any interest should be sent to me at my BBS above.
- I guess I should give my address, though why someone without a modem
- would use this program is beyond me... but you can USnail it to me
- at Frank J. Perricone, 2132 Lawson Creek Road, Douglas AK 99824.
-
- // Only Amiga
- \X/ makes it possible!
-