DIALER.EXE 1.1 Copyright (c) 1992 Joe Hayashi A brief note: Dialer is run automatically if you are using Telefile with the proper dialer setup in telefile.ini. You may contact P. C. Softsmith for ASP level support for dialer. Dialer is a nifty utility -- read on ... I. What is dialer? Dialer is designed to be (as much as any program can be) the one pro- gram you need to make all of your voice and data calls. If you make a lot of calls, are constantly updating your phone lists, or frequently travel between area codes, dialer could be for you. I originally wrote dialer to work with stand-alone communications proto- cols (specifically DSZ from Omen Technology). With dialer and one of these protocols (like DSZ, GSZ, Kermit, OZBEXT, or others) you get most of the functionality of a more expensive (and sometimes less reli- able) communications package. Dialer has all of the features of the dialing portion of any good communications program. I think dialer is better in that you can 1) use a regular text file as a phone directory 2) use it to easily dial your voice calls, and 3) pick and choose among a variety of free and inexpensive software to add whatever other communications functionality you might need. Probably the best thing about dialer is that it is easy to use for making your voice calls. If you travel between different area codes, just tell dialer which area code you are in and all the numbers in your phone list that have this area code will be dialed as a local call--no more editing phone lists! When making voice calls, just hit any key and dialer will hang up the modem and let you talk. Dialer even has an option to dial certain numbers as long distance calls even though they are in your local area code. More specifically dialer is a filter that takes text, parses a phone number, and dials the phone until it gets a connection. The program is easy to configure and was designed to work with short batch files. Port & line settings can be set with a few simple switches. Almost everything about dialer is configurable. Dialer requires a modem, DOS 3.x or higher, and 128k. Best of all, dialer is free. ________________________________________________________________________________ II. How do I use dialer? Dialer works best with batch files. I've included some well documented batch files that are easy to modify and should work for most people. Using dialer is something like this: dial Alice or dial Allen Barton or dial Compuserve With this distribution are 3 batch files: DIAL.BAT, LOOKUP.BAT, and BBS.BAT. Also included is a sample phone number, NUMS.TXT, and a READ.ME file. The batch files rely on the DOS FIND utility to function. If FIND is not your path, these batch files won't work. In most cases if DOS is installed on your machine, FIND will be on your path. Description of included files: DIALER.DOC The file you are reading. DIALER.EXE The dialer program. Dialer is distributed as a compressed executable. If you have weird iron and suspect that the compression is causing problems, contact me and I'll send you the uncompressed version. I don't have an optimizing compiler so my C programs tend to be larger than they need to be, hence the compression. LOOKUP.BAT Batch file to find a person in your phone list. Will show you the entire phone list if given no arguments. Type: "lookup Eric" or "lookup" DIAL.BAT Batch file to dial a person or bulletin board you specify. You can use first or first and last names. Case is important. Type: "dial Robert" or "dial Robert Tell" BBS.BAT Batch file to dial a bbs and launch DSZ in terminal mode if you get a connection. DSZ must be on your path or in the same directory. Type: "bbs Compuserve" NUMS.TXT Phone directory file. Contains some sample numbers and some hints on adding your own. READ.ME Some notes on this and other versions of dialer. Dialer has a lot of options. The default options should be adequate for nearly everyone. In all likelihood you'll never have to read all of the documentation. If you think you know what you're doing, look at the batch files, edit the phone list, and start dialing. If your modem seems to have taken a vow of silence or seems to be speaking in tongues, make sure that you know how to specify the correct COM port (see the C SWITCH below). You might also check the I and D SWITCHES. If you're having problems figuring out why dialer isn't recognizing your phone numbers, first check to make sure that you are using the batch files properly and then read about the S and X SWITCHES. If you plan to use dialer as the dialing portion of your communications software or if you're a fan of DSZ or GSZ, be sure to read section IV on other useful utilities. If you find yourself constantly editing your phone directory file and you've read the entire documentation, write me a letter. I tried to write dialer so that you could use it with any text file of names and phone numbers. If this is not working for you, let me hear about it and maybe I can suggest something or perhaps I'll rewrite the program. Happy dialing! ___________________________________________________________________ Dialer as used in TELEFILE.INI: [TELEFILE] # TELEFILE initialization file # $(NUMBER) is replaced by the telephone number at run time dialer = echo $(NUMBER) | dialer /c2 ___________________________________________________________________ III. The details - switches and miscellaneous stuff. Dialer accepts both slash (/) and dash (-) command line switches. If you type "dialer /?" or "dialer -?" you should see this: dialer version 1.1 Copyright (c) 1992 Joe Hayashi usage : dialer [ options ] /a# ignore area code # /b# use # baud /c# use # COM port /d$ use string $ as dial command /h print this message /i$ use string $ as modem initialization string /l turn off automatic 1 prepend for long distance numbers /p# use # as minimum phone number length /r turn off redial mode /s# parts of phone number are separated by # non-digits /w# wait # seconds between redial attempts /xc use character c as local long distance marker /yc use character c as line settings marker The following is a description of what the switches do. ----- A SWITCH AREA CODES /a# or /A# I strongly recommend that you use full ten-digit phone numbers in your phone list. If you move your computer to another area code, just tell dialer about it and all will be well. If you live in Boston you might specify the option like this: dialer /a617 With this setting, all numbers in the 617 area code get dialed as local numbers. For numbers within the same area code that need to be dialed as a long distance number, read about LOCAL LONG DISTANCE DIALING below. ----- B SWITCH BAUD /b# or /B# I allowed you to set the baud in two places. By default, dialer will use 2400 baud. If you have a 9600 baud modem, use 9600 as the default and specify slower speeds for individual bulletin boards in your phone directory file. Read more about the phone list in the NUMS.TXT file and under OTHER LINE SETTINGS below. dialer /b9600 This would set dialer to dial out at 9600 baud. If you only use dialer for voice calls, you never have to worry about baud or other line settings. ----- C SWITCH COM PORT /c# or /C# If your modem is not connected to COM1, you need to inform dialer of this. Dialer does not support more than 4 COM ports, if you try to specify a port higher than 4, dialer will default back to COM1. COM2 can be specified like this: dialer /c2 If you use a member of the DSZ or OZBEXT family, dialer will use the DSZPORT or OZPORT environment variables and you won't have to specify the COM port as a command line argument. Of course, these variables must be set to work, otherwise dialer will default to COM1. You can always override an environment variable with this switch. You can set a variable just for dialer by typing set DIALERPORT=2 from DOS or including this line in your autoexec.bat file and then rebooting. ----- D SWITCH DIAL COMMAND /d$ or /D# There are several good reasons to change the dialing command from the default ATDT. Some phones require pulse dialing, you might want to turn off call waiting when you dial bulletin boards, you might want to use your credit card or telephone card to dial long distance calls, or you might need to dial out of a centrex system. This switch allows you to accomplish all of these feats. Let's say we want to do turn off call waiting and dial a "9" to get out of a centrex system. dialer /dATDT*70,9 *70, - turns off call waiting for most people ("," adds a pause) 9 - to dial out of a centrex system The maximum length for a dial command is 40 characters and there can be no spaces in the command. I included a separate section on CREDIT CARD, PHONE CARD, and COLLECT DIALING under MISCELLANEOUS STUFF below. ----- I SWITCH MODEM INITIALIZATION STRING /i$ or /I$ By default dialer uses "AT Q0 V1 X4" as it's modem initialization string. You can use a different string through this switch. dialer /iATZ or dialer /iATM0 Note that the string cannot have any spaces in it and can be a maximum of 15 characters. From the above you might have guessed that dialer relies on complete verbal return codes to operate. If you mess with the result codes, dialer may not deal with it too well. If you don't know how to change the result codes, don't worry about it. ----- L SWITCH TURN OFF AUTOMATIC 1 PREPEND /l or /L You might have noticed that if dialer finds a 10 digit number it adds it's own "1" to the number so that it dials as a long distance call when it's needed. If you need to turn this feature off, just give dialer this switch. dialer /l In order to use collect or credit card dialing, you need to use this switch. If you're dialing from another country, this switch might also be helpful. ----- P SWITCH MINIMUM PHONE NUMBER LENGTH /p# or /P# So what is a phone number anyway? The answer to this question is not as trivial as it sounds. Like everything, it depends. What country do your live in? Are you dialing within a centrex system? By default dialer believes that any string of 7 to 11 digits separated by no more than 1 non-digit is a phone number. Examples of valid phone numbers are 555-1212, 212-555-1212, 1(800)555-1212, and even 1h2e3l4p5 6m7e. If you need to have dialer dial numbers that are less than 7 digits long, use this switch. dialer /p5 This sets the new lower limit for the length of phone numbers to 5. Valid phone numbers would now include 5-5555 and 234-45 as well as all the examples above. You cannot set a new upper limit. See the S SWITCH below for more on phone numbers. ----- R SWITCH REDIAL TOGGLE /r or /R If you want to turn off redialing and have dialer give up after one try, you can tell it do to this by using the redial off switch. You can always abort a dial in progress by hitting any key. dialer /r By default dialer will redial until you're blue in the face. ----- S SWITCH PHONE NUMBER SPACE SEPARATION /s# or /S# This version of dialer gives you some flexibility in determining what dialer understands a phone number to be. As you recall, a phone number is 7 to 11 digits separated by no more than one non-digit. Not every phone number follows these rules. A text file of toll-free bulletin boards that are listed like this Free bbs 1 (800) 123-4567 lots of files, etc. could give you problems. -Why? If you tacked this line onto your phone list and typed "dial Free bbs", dialer would dial only 123-4567. The left parenthesis and the space prevent dialer treating the 800 as part of the phone number because dialer only allows one non-digit between parts of a phone number. -Well that's silly! You could edit your phone list and take out the extra space or the parentheses. The alternative is to use the s switch to tell dialer to allow 2 spaces between digits when looking for phone numbers. dialer /s2 Given the above switch, dialer will understand phone numbers to be 7 to 11 digits separated by no more than two non-digits. Obviously dialer would not be too useful if you set s to zero or a negative number. If s is set to a very high number, dialer may believe that every number in your dialing directory is part of some phone number. See the P SWITCH above to learn more about phone numbers. ----- W SWITCH WAIT BETWEEN REDIALS /w# or /W# Unless you specify otherwise, dialer waits 30 seconds before attempting a redial after it fails to get a connection. You can change this 30 second period using the w switch. dialer /w45 or dialer /w10 Some people are just control freaks. Thirty seconds is fine for most folks. ----- X SWITCH LOCAL LONG DISTANCE MARKER /xc or /Xc You should understand LOCAL LONG DISTANCE DIALING (detailed below) before you read this section. The x switch allows you to change the character that marks local long distance calls from the default tilde (~) to a character of your choice. dialer /x! This would set the "!" character to the local long distance marker. If your phone directory is littered with stray tildes, this feature is for you. Note that because of DOS you will have trouble setting this character to "<", ">", or "|". ----- Y SWITCH LINE SETTING MARKER /yc or /Yc You should read about the OTHER LINE SETTINGS (detailed below) before you read this. If you need to use the pipe character (|) in your dialing directory for something else, you can change the line setting marker by using this switch. dialer /y* The above would change the line setting marker from | to *. As in the X SWITCH, you probably won't be able to set this character to a DOS re- direction character unless you can somehow bypass COMMAND.COM. ---------- MISCELLANEOUS STUFF Wait, there's more . . . . RETURN CODES Dialer will return a 0 to it's calling environment if it gets a connection. This feature allows you to write batch files that call a comm program or external protocol when you get a connection. The BBS.BAT file is written to take advantage of this feature. return code reason for code 0 connect 1 no connection or error 254 user cancel ----- LOCAL LONG DISTANCE DIALING Just because two phone numbers are in the same area code does not mean that every call within that area code is a local call. One way to get dialer to add a "1" to 7 digit numbers is for you to edit your dialing directory and prepend a 1 onto number numbers that need it. If you travel to other area codes (especially if you use the area code feature described under the A SWITCH above) you'll find yourself frequently editing your phone directory file on the plane, furiously adding and subtracting 1's in between beverage breaks. Rather than waste your valuable nap time, you can add the local long distance marker character to indicate which numbers, when dialed from your "home base", should be dialed as a long distance number. If you use the area code feature, these numbers will still be dialed correctly from other area codes. If dialer finds a tilde (~) in phone directory file it will dial that listing with a 1 automatically prepended to the number. For example, if you lived in the White House and you were calling your constituent Eric Hargan, listed like this: Eric Hargan~ 202-555-1212 dialer will dial 1-555-1212, rather than just 555-1212. From New York dialer would dial Eric as 1-202-555-1212. Note, you must have the area code feature turned on (with the A SWITCH set to /a202) for this example to work. A neat 'n tidy way to list local long distance numbers is like this: Eric Hargan 202~555-1212 Astute observers may realize that this won't do any good for people who need to dial local long distance calls from more than one area code. On the other hand, this problem is only severe for people with two or more home bases located in separate area codes. Read about about how to change the local long distance marker character under the X SWITCH above. ----- OTHER LINE SETTINGS By default dialer's line settings are 8 data bits, no parity, 1 stop bit, and 2400 baud. You can change global baud settings with the B SWITCH described above. If there are numbers you call that require a different setting, you can set these in the text that is piped to dialer (e.g. phone directory text). When text is piped to dialer, it scans the text for a phone number and a couple of special characters. If it finds the line settings marker (by default the "|") it will read the next three characters it sees as as data bits, parity setting, and stop bits. The number immediately following the stop bits set the baud. If you just want to change the data bits and the stop bits, you must specify a parity setting even if you want the default. Dialer is strict about the order in which line settings appear. An example: Compuserve toll-free number (800)848-4480 |7E11200 If you put this entry in your phone directory file, dialer would dial out using 7 data bits, even parity, and 1 stop bit at 1200 baud. Right now parity can only be set to even (E or e), odd (O or o), or none (N or n). If you need mark or space parity, write me a note. If the text files you use for your phone directory use the | character to mean something else, you can tell dialer to use a different character to mark line settings. See the y SWITCH above. The line settings can come before or after the phone number. CREDIT CARD, PHONE CARD, and COLLECT DIALING I mentioned in the D SWITCH above that you can use dialer to dial out using a phone or credit card. Probably the best way to accomplish this is to write a separate batch file for each kind of dialing you want to do. The dialer line in the collect batch file might read: find "%1 %2" | dialer /l /dATDT0 This command changes the dial command to always prepend a "0" to the number. The L SWITCH prevents dialer from adding a 1 to all numbers. A credit card or phone card batch file might have the following command: find "%1 %2" nums.txt | dialer /l /dATDT0,,,21255512121234, The long number in the dialing command (21255512121234) would be replaced by your credit or phone card number. I can't tell you how the several long distance companies require you to dial their numbers, but as long as you turn off dialer's automatic "1" prepend and put the magic numbers in the dial command, you should be able to get this work. Remember that you can put a pause in the dial command just by adding a comma ",". AUTOMATIC 1 STRIPPING I wrote dialer to automatically ignore the 1 in front of 10 digit phone numbers (e.g. the "1" in 1-202-222-3333). It's far easier for me to treat numbers in a more uniform way if the one is not there. In the 1.01 release, dialer would add it's own 1 to a number like this and would spend some time trying to determine if the voice recording on the other end was really a modem in disguise. I am aware that this might cause problems for people outside of the USA, though I am not sure that it will. If this feature makes dialer unusable for you, let me know and I'll include yet another switch allowing you to disable this feature. Note that dialer will only remove a "1" in front of a 10 digit number. Shorter numbers shouldn't be a problem. ________________________________________________________________________________ IV. Other useful utilities. If you're like me and use dialer with an external protocol module as your communications software, you'll probably want to get your hands on some other utilities that capture text, allow you to use different terminal emulations, etc. For calling plain old bulletin boards, I recommend that you use DSZ or GSZ. They are super reliable and easy to use with ansi and text capturing. DSZ is something like $25. Use kermit for mainframes and Unix machines. If you use Compuserve get a copy of OZRLE, OZBEXT, or OZSMALL. Here's a little table of features you might need and the utilities I know about to get the job done. If you need: Get a copy of: Ansi emulation ANSI.COM from PC magazine allows you with DSZ or GSZ to load and unload ansi at any time. Alternatively you can use ANSI.SYS or a faster ansi clone (NANSI.SYS or ZANSI.SYS). Read your DOS manual on how to install ANSI.SYS. Ansi code stripping A utility called KLEANBBS strips ansi codes from straight text files. It does gag, however, on lines that are really long, but works for 99% of all needs. Text capturing Because DSZ and GSZ both write text to the screen through the bios, any utility that captures "bios sent" text should work. I only know about one utility, however, CONCOPY.EXE. OZBEXT II does not write through the bios. OZSMALL does, Kermit doesn't. OZRLE allows you to scroll back and dump the screen and scrolled text to a file, but it does not write through the bios. VT-100 or greater Kermit is probably best, version 3.10 emulation has VT-320, 102 and 52 emulation. A program called DGTERM has VT-102 emulation and is a TSR. Audible alarm on connect I had a hard time deciding whether or not to include an alarm bell in dialer. In the end, I didn't because you can achieve the same effect with other software. Since dialer returns a zero when it gets a connection, you can write batch files that take advantage of this. 4DOS has a beep command that could work well or you could use a freeware program that plays a tune or rings the bell. There are many. If you don't like that fact that the batch files are case sensitive don't use the DOS FIND utility. I actually use a version of the Unix GREP tool; mine (Turbo Grep from Borland) has an option to ignore case. Not all DOS implementations of GREP allow you to ignore case. You should register the programs that require it. KERMIT, ANSI.COM, CONCOPY, OZBEXT, and OZRLE are free for individual users (don't hold me to that, but I'm pretty sure about that). Again DSZ and GSZ need to be purchased but are totally worth it. If you send me email, I might send you the free utilities or at least try and remember where I got them. ________________________________________________________________________________ V. Administrivia. Some things in life are free. Dialer is one of these things. You use dialer at your own risk and with the understanding that I am not responsible for any damage you might incur through the use or misuse of this program. You may distribute dialer provided this documentation is included with it. You may not charge a fee for the distribution of dialer or include dialer as part of a software package distribution without my prior written consent. Please inform me about bugs, nasty limitations, and general weirdness. Ironically, I'm not going to give you my phone number so you can't use dialer to contact me. The best way to reach me is through Compuserve or Internet mail. I'm also including a postal address that may work. Let me know if you like dialer and thanks for trying it out, I hope it's useful. EMAIL 70754.1164@compuserve.com or just 70754,1164 for compuserve users POSTCARDS 2282 Southshore Way Boise, ID 83706