======================================================================== * frontends/mail2fax/README ======================================================================== mail2fax.pl Readme What is mail2fax.pl ? mail2fax.pl is a perl script that implements a gateway between email and FAX. It translates an email - which has to be in a certain email format - into a FAX file and feeds it into the FAX spool program. Requirements The main requirement for mail2fax.pl is perl. It is tested under version 4.036. It also requires a program to spool a FAX too. It also requires a mailer that is capable to accept a pre-formatted mail message at its standard input. Installation To install the package you have to copy the mail2fax.pl and mail2fax.rc files into certain directories. You also should install a new user called faxadmin that handles all FAX requests. It might also be a good idea to install a mail filter to process only certain mails. mail2fax.pl To install mail2fax.pl copy it to any directory in your search path. A good place is /usr/local/bin. mail2fax.rc Copy the configuration file mail2fax.rc into any directory - but make sure that you adapt the location of it in mail2fax.pl (see "In mail2fax.pl"). A good place is /usr/local/etc. faxadmin For a simple but efficient managing of all FAX requests you should install a new user called "faxadmin". If for any reason you can not do that (e.g. you don't have root privileges) you should at least install the mail filter. .procmailrc Optionally you can install a filter program to only process mail messages that satisfy specific criteria. The distribution contains a template for a filter rule using procmail. If you don't have procmail but the filter program from the "elm" package (or any other filter program) you can use that. Otherwise just add at least a file named ".forward" into the home directory of the account that handles FAX requests: "|/usr/local/bin/mail2fax.pl" #faxadmin" Test Mail The distribution also contains a test mail message that let you try out the whole setup. For a trial run you should set the Debug option. Configuration In order to use mail2fax.pl you have to go through a few steps of configuration. In mail2fax.pl Edit mail2fax.pl - somewhere in the top few lines of the script you will find a line that reads: $ConfFile = "mail2fax.rc" Change that to reflect the location of the configuration that you chose in the installation. In mail2fax.rc This is the main configuration file for mail2fax.pl. In here you define several items that control the behaviour of the script itself. =FaxSpool= This entry defines the program that the script will use to spool a FAX. It requires a certain invocation syntax: faxspool -D 'Recipient' -f 'email-address' FaxNo FaxFile This happens to be the exact syntax of the faxspool program from the package mgetty+sendfax. If you use any other package you might have to write a little script that emulates the faxspool script of mgetty+sendfax ... =Mailer= This entry defines the program that the script uses to send a mail message back to the requestor of the FAX. It has to accept a pre-formatted mail message at its standard input: sendmail -t =Billing= This entry switches the billing on of off. A value of "0" will disable this feature, any value > "0" will enable it. Billing is implemented in a pay-ahead fashion. That means, that any user has to buy a certain amount of units up-front. These credits will then be recorded in the mail2fax.rc (see "Remaining credits"). Every time that a FAX is requested to be sent the cost of the Fax will be subtracted from the remaining credits. If the credits are not sufficient the FAX will be rejected and the requestor will be notified via email. =Debug= This entry enables an internal DEBUG mode. A value of "0" will disable this feature, any value > "0" will enable it. This is for testing purposes only and should normally be set to "0" since it will not actually spool the FAX. =Unknown= This entry defines the name of the recipient if it is not specified in the email. By default this name is "unknown". =FaxAdmin= This entry defines the account that handles the FAX administration. By default this name is "faxadmin". =Zone=x These entries define the cost per complete FAX (not per page!) per telephone zone. There are 6 zones that allow a flexible price structure. Each zone definition contains two items: 1. Zone prefix This item is a string that let you define a prefix of the FAX number. If the FAX number contains this prefix the associated cost is attached for this FAX. The search for the correct zone is from Zone 2 through 6 - thus making the FAX at least as expensive as Zone 1. Example: =Zone=4 1 defines any FAX number starting with "1" as a zone 4 number. 2. Zone cost This item defines the associated cost for each zone in units. Each unit is normally a 1/100 of the currency in your country. Example: =Zone=4 1 100 defines the cost for zone 4 as 100 units (~ $1.00) =User= These entries define the user id, password, a discount multiplier, and the remaining credits for each registered user. It is the FAX administrator's responsibility to create these entries by hand. The following four items make up one entry: 1. User ID This item is the ID of a registered user. It is checked against the field "Fax-User:" in the email message. If the IDs do not exactly match the FAX will be rejected and the requestor will be notified via email. 2. Password This item is the password of a registered user. It is checked against the field "Fax-Pass:" in the email message. If the passwords do not exactly match the FAX will be rejected and the requestor will be notified via email. 3. Discount multiplier This item is the an optional discount multiplier for a registered user. It allows you to specify whether a user has to pay full price for a FAX (value "1"), a fraction of it (value between "0" and "1"), or even nothing (value "0"). This multiplier is used in the calculation of the cost for the FAX in such a way that the zone cost is multiplied with this factor. 4. Remaining credits This item reflect the remaining credits for a registered user. Initially this value has to be entered by the FAX maintainer. As FAXes are requested their cost is subtracted from this amount and automatically updated. Whenever the user buys another chunk of credits the FAX maintainer has to update this value. Email format Any FAX requesting email must follow a strict format. It must contain at least the following four header lines, one empty line, and one line of FAX message in the body of the email message. The four header lines must be written exactly like they appear below (incl. lower and upper case). 1. Fax-To: This line must contain a valid FAX number. It also determines the cost of the FAX if billing is on. 2. Fax-To: This line should contain the name of the intended recipient of the FAX. It can be left blank - in this value of the option =Unknown= is used. 3. Fax-User: This line specifies the user ID of the requestor. It is compared against the user ID in mail2fax.rc. 4. Fax-Pass: This line specifies the password of the requestor. It is compared against the password in mail2fax.rc. 5. FAX Message The actual FAX message must follow the FAX header and has to be separated from them by an empty line. It's end is found at the first line starting with "--". FAX status notification The FAX requestor will be notified by email whether the FAX could be spooled or not. He/she will also be notified via email about the tries to send the FAX. Successful request The FAX requestor will be notified via email if the FAX was successfully spooled. This message will contain the FAX number and FAX recipient. If billing is on the message will also contain the cost for this FAX as well as the remaining credits. Unsuccessful request The FAX requestor will be notified via email if the FAX could not be spooled. This message will contain a detailed reasoning for the failure. In this case the requestor will not be billed for the FAX. FAX send status Depending on the FAX system you are using the FAX requestor might be notified via email about any try to send the FAX. The "mgetty+sendfax" package does that. If the FAX could not be sent the requestor should notify the FAX administrator about that fact so the originally subtracted credits can be refunded. User Administration The User Administration must still be done manually. Fortunately it does not involve too many steps. Register a new user To register a new user the FAX administrator has to insert a new =User= entry into the mail2fx.rc file. The password should be negotiated between the FAX administrator and the new user in some way (e.g. the FAX administrator could assign it to the new user). The new user would have to buy a certain number of credits up front (e.g. through sending a check) if the billing option is on. Update the credits for a registered user If the billing option is on the remaining credits will automatically be updated when a FAX is spooled. If the credits run too low the FAX requestor will be notified via mail with a copy to the FAX administrator. The user then has to buy additional credits in order to maintain his/her status as a registered user. Remove a user To remove a user the FAX administrator can either comment out the corresponding entry in mail2fx.rc file or remove it altogether. Legalese This software is (c) Copyright 1995 Thomas Bullinger. There is no explicit or implicit warranty that it will suit your purposes. Even though this software has been thouroughly tested the author does not accept any responsibility for possible damages. The software itself is coverd by the GNU Copying license. ======================================================================== * frontends/mmdf-mail2fax/README ======================================================================== From stonewall.demon.co.uk!nigel Wed Mar 8 09:46:56 1995 Return-Path: Received: by greenie.muc.de (/\==/\ Smail3.1.24.1 #24.2) id ; Wed, 8 Mar 95 09:46 MET Received: from post.demon.co.uk ([158.152.1.72]) by colin.muc.de with SMTP id <25595-1>; Wed, 8 Mar 1995 03:00:04 +0100 Received: from stonewall.demon.co.uk by post.demon.co.uk id aa09109; 8 Mar 95 1:31 GMT From: Nigel Whitfield Date: Wed, 8 Mar 1995 02:07:08 +0100 In-Reply-To: Gert Doering's message 'Re: Email to gax gateway' of Tue 3 Jan Reply-To: Nigel Whitfield X-Mailer: Mail User's Shell (7.2.5 10/14/92) To: Gert Doering Subject: E-mail to fax gateway - instructions Message-ID: <9503080107.aa20588@fags.stonewall.demon.co.uk> Status: RO Gert, This is a little late, but it appears to work reasonably well. It's not been extensively tested, but I've had no problems in casual use. The information below should be sufficient for people; I can give limited support via nigel@stonewall.demon.co.uk General information: This is a mail to fax gateway, designed to work with mgetty and MMDF on a SCO Unix system (ODT 3.0). It might well be possible to make it work with other systems, but it was a quick and dirty hack. It's designed to allow you to send a message to, for example 01818061048@fax, using your ordinary mail program, and will turn the text of the message into a fax. If a global alias is set up, you can use an address like nigel@fax A header page will be generated with a brief explanatory note, and the date, subject and sender of the fax. A recipient name will be used if one is present in the global fax alias file. A log of faxes processed is sent to the fax administrator, and a receipt is sent to the originator when There is not a huge amount of checking in the code, and it may not stand up to heavy use. Use at your own risk. I'll give what help I can, but if you've fiddled with MMDF, or you run a different mail transport you're probably on your own. Note that there is no checking in this script to see if people are authorised to use your system for faxing. If you want authorisation, use the MMDF facilities. Nigel 1 - the fax channel The system relies on creating a passive channel in MMDF, which just leaves messages in a queue directory where they can be picked up by a program later. My domain is stonewall.demon.co.uk, and machines are hidden within that domain. Add the following lines to /usr/mmdf/mmdftailor (I put them between the SMTP channel and the local domain table): --- cut here ; ; Mail to fax gateway ; MTBL faxchn, file=fax.chn, show="Fax gateway" MCHN fax, show="Mail to fax gateway", ap=same, mod=psv, tbl=faxchn --- ends You also need to create the fax.chn file in /usr/mmdf/table: --- cut here fax.stonewall.demon.co.uk: --- ends And you can put a line in domain.dom like this: --- cut here fax: fax.stonewall.demon.co.uk --- ends Don't forget to run dbmbuild when you've made the changes 2 - the fax gateway script Install the faxgate script as something like /usr/mmdf/bin/faxgate. If you have a pretty standard SCO installation, you shouldn't need to change anything more than $faxsender and $faxadmin I won't pretend this is an elegant perl script, but it does the job. If you have a different mail transport, you'll need to hack the bit that opens the MMDF queue file and extracts the information from it. Note that we don't attempt to extract a Reply-To field or anything fancy - the address used for returning information is the envelope address. 3 - Making it all work Create a crontab entry for MMDF to run the faxgate script periodically. Messages are not sent directly - they are simply placed in the fax queue, and will be sent whenever that is run. 4 - Things to do * Make it understand mail messages that contain a PostScript document * Add authorisation lists * Look for a Reply-To: header * Find an elegant way of setting the recipient name on the header page * Make it less dependent on MMDF * Write proper documentation 5 - Copyright I wrote this software, and it's my copyright. But you can distribute it freely, for use with Gert Doering's mgetty program. If you want to use it as the basis of non-commercial software, you're welcome to, provided you keep a credit of some type. If you change the software, I'd welcome details of your changes so that the software can be kept up to date. Nigel. -- [Nigel Whitfield nigel@stonewall.demon.co.uk] [For details on the uk-motss mailing list mail uk-motss-request@dircon.co.uk] [****** All demon.co.uk sites are independently run internet hosts ******] ======================================================================== * voice/Readme ======================================================================== vgetty -------- The voice extensions for the mgetty+sendfax package Copyright (C) 1995-1998 Marc Eberhard. [ The maintenance has been taken over by Marc SCHAEFER http://www-internal.alphanet.ch/~schaefer/vgetty.html ] The legal stuff ----------------- This file is the Readme file for the voice extensions of the mgetty+sendfax package. This copyright is valid for all files within this directory and all further subdirectories. vgetty is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Some warning -------------- WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * WARNING: * * WARNING: * T H I S I S A B E T A T E S T R E L E A S E ! * WARNING: * * WARNING: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Hints ------- The number of bug reports has drastically decreased, so either all people gave up or there are not so many bugs left. For those, who start with vgetty, please read the file doc/Readme.Beginners very careful. If you mail me a question, that is answered there, in the mgetty FAQ or the mgetty mailing list archive, I'm probably not going to answer your mail. This is not ment personally against you, it's just my limited time. I apologize for not being able to provide a better support. If you have problems with playing or recording messages with your local telephone, you might be interested in the ZyXEL switch box. This box is useful for modems, that do not provide power for a telephone connected to the modem. With this switch box you can record and play messages with your local telephone. To record and play messages, use vm with the -t option to tell the modem to use the telco line. If you have problems, feel free to write me a mail. I'm always very busy, so it might take a while until you receive a reply from me. If you don't get one within 14 days, something went wrong and you should try again. If you want to mail me a bug fix or a new feature, you added to vgetty, please mail me a unified diff of your changes. Everything else is more work for me and since I don't have the time, I will probably never add your changes. To produce such a diff, copy the original file from the distribution to file.c.orig, then modify file.c and test it out and then use the command "diff -u file.c.orig file.c > patch_for_marc" and mail me the diff file "patch_for_marc". The option -u is important, because otherwise you procude a different kind of diff. I apologize for this, but my time only permits me to accept unified diffs. This is, because I'm never adding new code directly to the sources, I'm always reading your changes and then I decide, whether I will include them or not. Thanks for your help! Vgetty was developed and maintained by Marc Eberhard up to this release with help from many other people. See the Credits file for details. From this release on the new maintainer and developer of vgetty is Marc Schaefer and I wish him good luck and all the best! Alternative projects to vgetty: http://search.cpan.org/search?mode=module&query=ivrs Doesn't used vgetty, but uses the pvftools. Seems to support only some USRobotics. $Id: Readme,v 1.7 2001/02/24 10:24:29 marcs Exp $ ======================================================================== * voice/doc/Readme.Beginners ======================================================================== vgetty -------- The voice extensions for the mgetty+sendfax package Copyright (C) 1995, 1997 Marc Eberhard. Beginners guide Writen by F.Xavier SURBEZY (please email me corrections, additional informations ...) Installation ------------------------ 1. Compile and install mgetty. See the instructions for mgetty how to do that. 2. Compile vgetty. There should be nothing special to do. Just type "make" from within the voice directory. If you managed it to compile mgetty, you should be able to compile vgetty without any problems. If not, please mail me your problems. 3. Do "make install" as root from within the voice directory. Since you are always concerned about hackers, wanting to overtake your system, you will first do a "make -n install" to see all the evil things, the installation procedure will do. Configuration --------------------- 1. Copy the file voice.conf-dist to the same directory as all the mgetty config files. Rename it from voice.conf-dist to voice.conf. This file contain the description of the vgetty config option ... so read it. 2. Replace the invocation of mgetty in your /etc/inittab with vgetty if there is one. If there is no mgetty invocation you just have to insert a line like that: "S1:345:respawn:/usr/local/sbin/vgetty ttyxx" in your /etc/inittab file. (like that vgetty is running at runlevels 3 4 and 5 see inittab(5) man page for more) 3. The vgetty logfiles are by default in /var/log/vgetty.ttyxx.log and the vm logfile is in /var/log/vm.log. Read these files if you have problems, they are quite readable and give you many hints, where the problem is. If you want to see more details in the logfile, increase the debug level in your voice.conf file to the highest possible value. 4. Be sure to make the voice_dir directories specified in your voice.conf file (e.g., /var/spool/voice, /var/spool/voice/incoming and /var/spool/voice/messages). 5. Record your gretting message. There are many ways to do that : a. Using vm : record your message with "vm record file_name". This can be done using internal microphone or local handset (type vm to see options) b. Using an already recorded voice file : you just have to convert your sound file in the modem expected format using the pvf tools. Eg : convert a voc file to Rockwell (compression type 4) format voctopvf file.voc | pvftormd Rockwell 4 > file.rmd (Replace Rockwell by what you need type pvftormd -h for detail) 5. Make vgetty use your message You must add the name of your file in the gretting messages index file (/var/spool/voice/messages/Index by default). See message_list in voice.conf for more. Using vgetty __________________ Once you've rebooted vgetty is lauched at init and will answer incoming call. Incoming messages are stored in receive_dir (see voice.conf) 1. playing incoming messages a. using vm : play the message with "vm play file_name" (type vm to see options) b. using audio card and sox : rmdtopvf file.rmd | pvfspeed -s 8000 | pvftobasic > /dev/audio (see rmdtopvf -h and rmdtopvf -L for more) ======================================================================== * voice/doc/Readme.voice_shell ======================================================================== vgetty voice shell commands ----------------------------- The voice extensions for the mgetty package Copyright (C) 1995, 1997 Marc Eberhard. Many contributions by others, including Marc SCHAEFER , the current vgetty maintainer. http://www-internal.alphanet.ch/~schaefer/vgetty.html Voice shell command guide Writen by Mizser Krisztian (please email me corrections, additional informations ...) 1.) Introduction 2.) Default behaviour of vgetty (if you don't specify "call_program" in voice.conf) 3.) Custom behaviour of vgetty (if you specify "call_program" in voice.conf) 4.) The structure of "call_program" (and the other "*_programs" 's) 4.1) General things 4.2) Example script 4.3) Another script 5.) Commands / answers to/from the voice library and explanation of them All command interpretation is done in voice/libvoice/shell.c. The C code might be a little bit more up-to-date than this documentation ;-) 6.) Possible events, detected tones 7.) Converting voice files to/from your modem's format 8.) Logging 1.) Introduction Vgetty is a great tool for creating an answering machine or any other system that uses your voice modem's capabilities. It is fully customizable, so you can create your own system with features you would like. Vgetty can play, record messages, can detect DTMF tones, data/fax calling tones. Vgetty works with mgetty closely, so it calls mgetty when data or fax connection is needed to establish. You can control the behaviour of vgetty in voice.conf. The options are well explained in voice.conf, please read them to have an idea what vgetty can do and how it does them. 2.) Default behaviour of vgetty (if you don't specify "call_program" in voice.conf): NOTE: Stuff within double quotes "" refers to variables in voice.conf Vgetty answers the phone after "rings" rings, then plays the greeting message specified in "message_list" (if specified). During playing the modem reports detected DTMF tones, vgetty handles these as follows: A DTMF command is in the form of *numbers# , if vgetty detects such a sequence, it stops playing, then executes "dtmf_program" if specified with 'numbers' as argument (without * and #). If vgetty detects a single number only, it stops playing, then tries to make a data connection with the remote end, if it doesn't succeed, then it tries a fax connection with the remote end. If vgetty detects an empty # character (without *numbers before it), then it simply hangs up the phone. If no DTMF was received during playing, vgetty issues a beep command, then it switches to recording mode, when the remote end can say the message to be recorded. Recording ends if DTMF tones detected as described above (in this case vgetty removes the recorded message), or if "record_max_len" time exceeded, or if the remote end hangs up. When finished, vgetty executes "message_program" if specified with the recorded filename as argument. NOTE: In this case vgetty gives different names to the recorded messages, you don't need to bother with this question. 3.) Custom behaviour of vgetty (if you specify "call_program" in voice.conf): Vgetty answers the phone after "rings" rings, then executes the shell script defined by "call_program". After the "call_program" terminates, vgetty does different actions depending on the exit code as follows: Exit code 1: vgetty tries to make a DATA connection with the remote end Exit code 2: vgetty tries to make a FAX connection with the remote end Exit code 3: vgetty first tries to make a DATA, then in case of unsuccess a FAX connection with the remote end If none of the above : vgetty closes the device and exits. NOTE: All the above mentioned programs (call_program, dtmf_program, message_program, button_program) are standard shell scripts executed by /bin/sh (Marc, is it true?) NOTE: In this case, you have to give different names to your recorded messages, vgetty cannot do this for you since you control everything in your script. 4.) The structure of "call_program" (and the other "*_programs" 's: 4.1) General things Most of you who want to do something else than vgetty's default behaviour will have to define "call_program" in voice.conf and write a nice shell script that handles everything after the modem picks up the phone. The principles: A shell script communicates with the voice library through unique file descriptors ($VOICE_INPUT and $VOICE_OUTPUT). See the two basic function 'receive' and 'send' in scripts/demo.sh . Just define these two functions in each of your scripts, and you don't have to deal with them anymore. So what do these two functions do? Receive: It reads one message from the voice library. Send : It passes one message (command) to the voice library. (The voice library is just the interface between your shell script and the modem. It translates the modem's messages to normal, human readable strings and vice versa.) You can consider the messages from the voice_library as members in a FIFO (first-in first-out) queue. You can read one message from the queue using the receive function (it will return the oldest message in the queue). Every time your modem detects something or just executes your commands, it adds a message to the queue (for example: PLAYING, DTMF_DETECTED, READY, etc.) 4.2) Example script Now that you understand the basic behaviour of the system, let's see an example (scripts/dtmf.sh): function receive : function send : we discussed these two functions above ANSWER=`receive` // Executes the "receive" function and puts the returned message in a // variable named ANSWER if [ "$ANSWER" != "HELLO SHELL" ]; then echo "$0: voice library not answering" >&2 exit 1 fi // If the message contained in ANSWER is not "HELLO SHELL" then exit, // because something's wrong. send "HELLO VOICE PROGRAM" // Executes the "send" function that passes the "HELLO VOICE PROGRAM" to the // voice library ANSWER=`receive` if [ "$ANSWER" != "READY" ]; then echo "$0: initialization failed" >&2 exit 1 fi // If the ANSWER wasn't "READY" then exit, something's wrong. // So far nothing happened, we just made sure that the communication between // our script and the voice library is OK. You have to start every script // like this one. send "DEVICE DIALUP_LINE" ANSWER=`receive` if [ "$ANSWER" != "READY" ]; then echo "$0: could not set output device" >&2 exit 1 fi // Sets the output device to dialup line. if [ -f demo.rmd ]; then send "PLAY demo.rmd" // Let's play demo.rmd ANSWER=`receive` if [ "$ANSWER" != "PLAYING" ]; then echo "$0: could not start playing" >&2 exit 1 fi // After the PLAY command, voice library should return "PLAYING" ANSWER=`receive` if [ "$ANSWER" != "READY" ]; then echo "$0: something went wrong on playing" >&2 exit 1 fi // When the playing is finished, we get "READY" // If no events occur during playing, the script just waits until // playing is finished (e.g. READY) // Function 'receive' won't return until an event happens. fi send "BEEP" ANSWER=`receive` if [ "$ANSWER" != "BEEPING" ]; then echo "$0: could not send a beep" >&2 exit 1 fi ANSWER=`receive` if [ "$ANSWER" != "READY" ]; then echo "$0: could not send a beep" >&2 exit 1 fi // Send out a BEEP, wait for answer (BEEPING, when finished: READY) send "RECORD demo.rmd" ANSWER=`receive` if [ "$ANSWER" != "RECORDING" ]; then echo "$0: could not start recording" >&2 exit 1 fi ANSWER=`receive` if [ "$ANSWER" != "READY" ]; then echo "$0: something went wrong on recording" >&2 exit 1 fi // Send a RECORD command, wait for answer (RECORDING, when finished: READY) send "GOODBYE" ANSWER=`receive` if [ "$ANSWER" != "GOODBYE SHELL" ]; then echo "$0: could not say goodbye to the voice library" >&2 exit 1 fi // We don't want to do anything else, send a GOODBYE to the voice library // If the answer is "GOODBYE SHELL", then the library got our request, and // stops communicating with us. exit 0 // Leave the shell script with exit code 0 . It was a very simple script, it just played a greeting message, then sent a beep to the line, then recorded a message. 4.3) Another script Let's see a more complicated example, where we want to handle the events during playing the greeting message. send "ENABLE EVENTS" ANSWER=`receive` if [ "$ANSWER" != "READY" ]; then echo "$0: something's wrong" >&2 exit 1 fi // This command enabled events reporting to the script. You need this if // you want to detect and handle events (dtmf codes, calling tones) if [ -f demo.rmd ]; then send "PLAY demo.rmd" fi while true; do ANSWER=`receive` case $ANSWER in PLAYING) ANSWER=`receive` case $ANSWER in READY) send "PLAY demo.rmd";; RECEIVED_DTMF) send "STOP"; proc_dtmf;; LOOP_BREAK|BUSY_TONE) send "STOP"; receive; send "GOODBYE"; receive; exit 0;; FAX_CALLING_TONE) send "STOP"; receive; send "GOODBYE"; receive; exit 2;; esac;; esac done In this example we play the greeting message in an infinite loop. During playing we can check what the modem reports. If we get a dtmf code (RECEIVED_DTMF), then we call our dtmf handling function (proc_dmtf). If the remote end hangs up (at my place it manifests in BUSY_TONE, but normally it should be LOOP_BREAK, signalling remote hangup), then we stop playing, say GOODBYE to the voice library, then exit with code 0. If the modem detects a fax calling tone (FAX_CALLING_TONE), then we stop playing and exit with code 2 (which means that mgetty tries to make a fax connection with the remote end). You can see that there is a 'receive' after STOP and GOODBYE, they are for getting the READY and "GOODBYE SHELL" answers. (in fact we should check if another event happened after issuing STOP) It is that simple. We just have to make sure we read all messages from the voice library. In order to do that, we need to know the possible answers to our commands, and the possible messages, events from the voice library. (For a more complicated example see scripts/voice_mail.sh ) 5.) Commands and answers to/from the voice library and explanation of them In the following table you can see all the commands and the possible answers for that particular command. Command: "" Answers: "HELLO SHELL" Explanation: After the very first 'receive' in your script, you should get this answer from the voice library. It means that the voice lib is ready for your commands. Command: "HELLO VOICE PROGRAM" Explanation: This should be the first command you issue, it will start the conversation between your script and the voice lib. Answers: "READY": If everything's ok, voice lib will return this. Command: "ENABLE EVENTS" Explanation: Enables event reporting to the shell (dtmf codes, data/fax calling tones, silence, quiet) Answers: "READY": Voice lib got your request. Command: "DISABLE EVENTS" Explanation: Disables event reporting to the shell. Answers: "READY": Voice lib got your request. Command: "DEVICE argument" Possible Args: NO_DEVICE, DIALUP_LINE, INTERNAL_MICROPHONE, EXTERNAL_MICROPHONE, INTERNAL_SPEAKER, LOCAL_HANDSET, EXTERNAL_SPEAKER, DIALUP_WITH_INT_SPEAKER, DIALUP_WITH_EXT_SPEAKER, DIALUP_WITH_INTERNAL_MIC_AND_SPEAKER, DIALUP_WITH_EXTERNAL_MIC_AND_SPEAKER, DIALUP_WITH_LOCAL_HANDSET Explanation: This command sets the device that vgetty will use. Answers: "READY": Device is set "DEVICE_NOT_AVAILABLE": Device Setting not supported "ERROR": Error Command: "BEEP [frequency [length]]" Explanation: Sends a beep through the chosen device (if frequency or length are not given, the defaults from voice.conf are used) Answers: "BEEPING": Beeping is executed right now. "ERROR": Beeping failed. "READY": Beeping ended. Command: "DIAL number" Explanation: Dials the given number. Answers: "DIALING": Current action is dialing. "ERROR": Error, dialing aborted. "READY": Dialing ended. Command: "GET TTY" Explanation: Returns the modem device currently in use. Answers: "READY" after Command: "GET MODEM" Explanation: Returns the voice modem driver name, for example "US Robotics", see ../libvoice/*.c, at the end of the file (the big structure). Then returns "READY". The goal of this function is to for example choose the right RMD file format to pass for PLAY. Answers: "READY" after Command: "AUTOSTOP argument" Possible Args: ON, OFF Explanation: With AUTOSTOP on, the voicelib will automatically abort a play in progress and return READY. This is useful for faster reaction times for voice menus. Answers: "READY": Voicelib ready again. Command: "GOODBYE" Explanation: Stops conversation with the voice lib. Answers: "GOODBYE SHELL": Voice lib stops conversation. Command: "PLAY filename" or "PLAY filename number" Explanation: Plays filename through the chosen device (the file must be in your modem's format!!! See section 7) Answers: "PLAYING": 'filename' is being played. "READY": Playing of 'filename' has ended. "ERROR": An Error occured Notes: if you specify an optional non zero third numerical argument, this changes the DTMF semantic: it will make the multi-DTMF detection more reliable when used with ``AUTOSTOP''. For details, please look at Al Borcher's perl vgetty shell script. Command: "RECORD filename" Explanation: Records filename from the chosen device (recorded file will be in your modem's format! See section 7) Answers: "READY" after "RECORDING": 'filename' was recorded. "READY" after "ERROR" after "RECORDING": Recording of 'filename' has failed. Command: "WAIT seconds" Explanation: Waits for 'seconds' seconds. During waiting, events will be detected and reported! Answers: "READY" after "WAITING": Waiting is over. "READY" after "ERROR" after "WAITING": Waiting failed. (Note, that after READY events will NOT be reported to the shell!) Command: "STOP" Explanation: Stops current action (DIALING, PLAYING, RECORDING or WAITING) Current state will be IDLE. ( Please note, that events will NOT be reported after "STOP" . If you don't want to do anything but to detect events, then try the WAIT command. Answers: "READY": Current action successfully stopped. Command: "DTMF number" Explanation: Contributed by , this adds support for sending DTMFs over the voice modem from the voice shell. The argument is the DTMFs to dial. This can be used for example to use vgetty as a voice-mailbox poller. Answers "READY" after "DTMFING": DTMF signals send "READY" after "ERROR" after "DTMFING": Operation failed Command: "QUOTE" Explanation: Contributed by , this adds support for sending modem-specific raw AT commands to the voice modem from the voice shell. The argument is the command to issue. Please do not use this lightly since it makes your voice shell script modem dependant. Answers "ERROR": Modem reported an error. "READY": Command executed. Command: "GETFAX" Explanation: For receiving a FAX. Answers "RECEIVING", then "READY". Command: "SENDFAX parameter(s)r" Explanation: For sending a FAX. Answers "READY": Sending finished. "ERROR": Error If something fails, you get "ERROR" as answer. That can mean two things, either you tried to issue multiple commands, e.g. a second PLAY command before stopping the first (vgetty will complain about this, saying "Nested command in shell script"), or something's really broken (hardware, software). 6.) Possible events, detected tones Please note, that events will only be reported if you issue an "ENABLE EVENTS" command, and current action is either PLAYING, RECORDING, WAITING or DIALING. After finishing these actions ("READY"), events won't be reported. (Use WAIT if you don't want to do anything but get events) Event: BONG_TONE Description: The modem detected a bong tone on the line. Event: BUSY_TONE Description: The modem detected busy tone on the line. Note that the proper IS-101 way to signal remote hangup is LOOP_BREAK. Event: CALL_WAITING Description: Defined in IS-101. Event: DIAL_TONE Description: The modem detected dial tone on the line. Event: DATA_CALLING_TONE Description: The modem detected data calling tone on the line. Event: DATA_OR_FAX_DETECTED Description: The modem detected data or fax calling tones on the line. Event: FAX_CALLING_TONE Description: The modem detected fax calling tone on the line. Event: HANDSET_ON_HOOK Description: Locally connected handset went on hook. Event: HANDSET_OFF_HOOK Description: Locally connected handset went off hook. Event: LOOP_BREAK Description: Defined in IS-101. This usually is for remote hangup. Event: LOOP_POLARITY_CHANGE Description: Defined in IS-101. Event: NO_ANSWER Description: After dialing the modem didn't detect answer for the time give in dial_timeout in voice.conf. Event: NO_CARRIER Description: The caller has hung up. For now, this event is detected only by the ISDN4Linux driver. Event: NO_DIAL_TONE Description: The modem didn't detect dial tone (make sure your modem is connected properly to your telephone company's line, or check the ATX command if dial tone in your system differs from the standard) Event: NO_VOICE_ENERGY Description: It means that the modem detected voice energy at the beginning of the session, but after that there was a period of XXX seconds of silence (XXX can be set with the AT+VSD command...at least on ZyXELs) Event: RING_DETECTED Description: The modem detected an incoming ring. Event: RINGBACK_DETECTED Description: The modem detected a ringback condition on the line. Event: RECEIVE_DTMF Description: The modem detected a dtmf code, you can get the code with an additional 'receive' command. Event: SILENCE_DETECTED Description: The modem detected that there was no voice energy at the beginning of the session and after that for XXX seconds. (XXX can be set with the AT+VSD command...at least on ZyXELs) Event: SIT_TONE Description: Defined in IS-101. Event: TDD_DETECTED Description: Defined in IS-101. Event: VOICE_DETECTED Description: The modem detected a voice signal on the line. IS-101 does not define, how the modem makes this decision, so be careful. Event: UNKNOWN_EVENT Description: None of the above :) 7.) Converting voice files to/from your modem's format Under directory 'pvftools' there are a number of useful utilities that can be used to convert voice files. Vgetty can only handle voice files converted to your modem's format. After recording, recorded files are in your modem's format. Converting a voice file (say 'wav') to rmd (raw modem format, that is the format your modem accepts data) takes two steps. First you have to convert your file to pvf (portable voice format) with ??topvf (?? = wav in our case), then use pvftormd with the proper arguments (see pvtormd -h for a help). The other way is similar (rmdtopvf , pvfto??). Browse through pvftools, there are other useful utilities there, too. 8.) Logging You can set the desired log level in voice.conf, log path can be set in voice/include/paths.c (It defaults to /var/log). ======================================================================== * voice/libmgsm/README ======================================================================== The "libmgsm" directory contains a subset of the modules contained in the GSM distribution from the Technische Universitaet Berlin. Below is the README available in the gsm-1.0-pl7 distribution. The original one can be found at ftp://ftp.cs.tu-berlin.de/pub/local/kbs/tubmik/gsm/. -- Paul GSM 06.10 13 kbit/s RPE/LTP speech compression available -------------------------------------------------------- The Communications and Operating Systems Research Group (KBS) at the Technische Universitaet Berlin is currently working on a set of UNIX-based tools for computer-mediated telecooperation that will be made freely available. As part of this effort we are publishing an implementation of the European GSM 06.10 provisional standard for full-rate speech transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse excitation/long term prediction) coding at 13 kbit/s. GSM 06.10 compresses frames of 160 13-bit samples (8 kHz sampling rate, i.e. a frame rate of 50 Hz) into 260 bits; for compatibility with typical UNIX applications, our implementation turns frames of 160 16-bit linear samples into 33-byte frames (1650 Bytes/s). The quality of the algorithm is good enough for reliable speaker recognition; even music often survives transcoding in recognizable form (given the bandwidth limitations of 8 kHz sampling rate). The interfaces offered are a front end modelled after compress(1), and a library API. Compression and decompression run faster than realtime on most SPARCstations. The implementation has been verified against the ETSI standard test patterns. Jutta Degener (jutta@cs.tu-berlin.de) Carsten Bormann (cabo@cs.tu-berlin.de) Communications and Operating Systems Research Group, TU Berlin Fax: +49.30.31425156, Phone: +49.30.31424315 -- Copyright 1992 by Jutta Degener and Carsten Bormann, Technische Universitaet Berlin. See the accompanying file "COPYRIGHT" for details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. ======================================================================== * voice/mvm/README ======================================================================== Author: Marc SCHAEFER Software: Minimal voicemail system (mvm) version 1.2 $Id: README,v 1.2 1998/09/09 21:07:39 gert Exp $ # DISCLAIMER # No warranty, either expressed or implied. # COPYRIGHT # Fully protected under Berne Convention, use authorized except # if you make money from this use (contact me before). PRIMARY DISTRIBUTION SITE: (currently MET 0900-2300 only) http://www-internal.alphanet.ch/archives/local/alphanet/mvm/ SECONDARY DISTRIBUTION SITE: ftp://ftp.imp.ch/alphanet/files/mvm/ THIRD DISTRIBUTION: - In the vgetty/mgetty distribution, directory voice/mvm. 1. What is this thing, anyway ? Hi and welcome to the minimal voicemail system. This is a shell script and some utilities (also shell scripts) developped under Linux and RISCos in order to run a rather simple but scalable voicemail system. You can look in the file SPEC to see what the final goal is. This README file is only an introduction how to set up the voicemail system on your Linux computer (as I assume that noone else has RISCos anymore). NOTE: I have abandonned RISCos as a development plateform. I currently use Linux 2.0.27 (test/production) and 1.2.13 (production). I am using two ZyXEL 2864 I which answer X.75 ISDN, V34 modem, fax and mvm. I recently switched to a 1496 (ROM 6.18) and I received feedback it also works on some USR derivate. You need a voice modem (e.g ZyXEL series) supported by vgetty and a moderatly fast computer (generating voice online needs some CPU/FPU). YOU ALSO NEED A SAY COMMAND (see adds_on/rsynth/) Please also look at the CHANGES file. 2. Installation 2.1 Initial setup First, log as root and type the command ./setup.sh This will create /usr/lib/mgetty and /usr/spool/voice. It will not alter anything else on your system. The diskspace needed is less than 1 megabyte. WARNING: if your config files are already in /usr/lib/mgetty, they will be erased ! The installation script will ask you things to configure the scripts. Full fonctionnality needs to to pre-install rsynth (english text-to-speach) and mgetty. I also expect a recent mgetty (at least 1.1.7). This release has been tested with ZyXEL 1496, Linux 2.0.27, mgetty 1.1.7 Previous releases have been tested with ZyXEL 2864I and non I USR (model?) 2.2 Generic vgetty/mgetty in /etc/inittab When installed, you can launch vgetty manually or in /etc/inittab (do not forget the /sbin/init q). Play with the arguments as you like. s1:456:respawn:/usr/lib/mgetty/vgetty -x 10000 -s 38400 -p "(vulcan-ttyS0) login: " ttyS0 3. Needed files File/Directory Used for Created by Using /usr/lib/mgetty/mgetty.config setup.sh text editor /usr/lib/mgetty/voice.conf setup.sh same * /usr/lib/mgetty/vgetty USER make voice /usr/lib/mgetty/randomize setup.sh gcc * /usr/lib/mgetty/say setup.sh gcc (rsynth) /usr/spool/voice mvm setup.sh same /usr/spool/voice/main/commands mvm, dynamic menu system setup.sh same or mvm menu editor /usr/spool/voice/messages/* mvm prompts setup.sh generate.sh and MESSAGES file and rsynth and pvftools /usr/spool/voice/mailboxes /usr/spool/voice/menu_item_types setup.sh Files marked with a (*) MUST be obtained separately because they are not part of this software. They won't be installed by setup.sh randomize source is given in adds_on/randomize. If you have a library of Sun AU (or au.gz) files, you can use it when setup.sh asks for a ``random library file path''. If you did not install rsynth, or if you did not hack it to write to a file named tmp in the current dir, use the one in OLD_BINS. Same for vgetty and randomize (a program which randomizes its arguments). Only Linux binaries are supported (and if you read this in an official vgetty distribution, there are NO binaries). 4. Known bugs 5. How to use this. The password for the voicemail operator (code 0) is 42, of course. Change it :-) (vi /usr/spool/voice/mailboxes/0/.password). And then chmod 700 /usr/spool/voice/ Then dial your number, just after the modem answers (it will NOT play the normal modem handshake) and *before* two seconds, send any DTMF. You should hear the welcome message. Wait til the end of the message, and follow the directions. At the main menu, you can use * to identify yourself (code 0, then #, then another message, then 42, then #). [ the above paragraph is for VOICE_MODE=normal, see the setup script ] Main menu commands are described in /usr/spool/voice/main/commands. Types are explained in /usr/spool/voice/menu_item_types. 6. Final comments CURRENTLY IMPLEMENTED: - modem/fax or voice detection (based on a human input) and X.75 support. - multiple languages support - user identification, new user creation, access levels, passwords - voice-mailboxes for each user. Send, delete, reply functions - dynamic menu system (editable online). - tree and menu edition - hotkeys (also multiple keys at once) - mail to voicemail text speach generation (adds_on/mail_to_voice) CURRENTLY NOT IMPLEMENTED: - public messaging system - user edition - crypt() for passwords - not running under root. - reading of UNIX mail - sending of sounds through e-mail both directions (MIME) ======================================================================== * frontends/X11/viewfax/COPYING ======================================================================== GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ======================================================================== * frontends/tcl/faxview-0.2/COPYING ======================================================================== GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.