Requirements
The requirements for faxing with VOCP actually depend on what you are looking to do. At a minimum, you need a functional installation of VOCP and it's required modules and might need to edit the vgetty's mgetty.conf file. If you wish to view and send faxes using VOCPhax, you will also need Perl Tk and the Tk::JPEG module (these should have been installed along with VOCP).
Reception Requirements
After installation, your VOCP voice mail system is already set up to receive faxes.
The only thing you really should set up is the permissions with which faxes are saved. To do so, edit the mgetty.conf file (usually found in
/etc/mgetty+sendfax/) and set the fax-owner, -group and -mode to something like:
fax-owner root
fax-group vocp
fax-mode 0640
Which will make the files legible by the root user and the vocp group. If you wish to ensure only specific users can read the incoming faxes, either
- set the fax-mode to 0600 and the fax-owner as the user who will be responsible for retrieving faxes, or
- set the fax-mode to 0640, the fax-owner to root and the fax-group to a group you've created specifically for this purpose (you can then add users to the group as required).
You may wish to create fax-on-demand boxes or see the Fax reception section for info on using the VOCPhax graphical interface.
Sending Requirements
The requirements for sending faxes depend on whether you want to send faxes using a fax-on-demand box or if you wish to send faxes manually from the VOCP host system. See the Sending Faxes/Setup section below for details.
Fax Reception
When a call comes in and the familiar beep beeps of a fax are detected, VOCP will correctly stop all voice modem activity and switch to fax
mode (by exiting with a status code that vgetty recognizes). Mgetty will take the call over, and save the incoming fax (normally to
/var/spool/voice/incoming).
You may also choose to create 'receivefax' boxes (see the included box-types.txt docs for details). When accessed these boxes may play a message to callers, then they will exit in such a way as to hand control to mgetty in fax mode. Callers should then proceed to launch their fax machines and send you the data.
Faxes will be saved to multiple files, 1 file per page with a name like:
fndc6dacaS1-631-772-6100.01
fndc6dacaS1-631-772-6100.02
...
These can be viewed manually or by using the VOCPhax graphical interface.
Sending Faxes
Sending faxes happens when:
- A local user wishes to initiate a call and send a fax.
- A remote caller accesses a faxondemand box or a script box with return set to 'sendfax'
Local user wants to send faxes
Initial Setup
Users can send faxes manually, using mgetty+sendfax's faxspool (see the man page), or through the VOCPhax interface (/usr/local/vocp/bin/vocphax.pl). For this to function, the sys admin (yeah, that's probably you ;) ) needs to do a little work first.
Start by trying to run faxspool from the command line:
$ faxspool 5551212 /usr/local/vocp/images/faxtest.g3
If that doesn't work, check the error message and resolve the issue. Depending on how you installed mgetty+sendfax, you may need to change the ownership or permissions of the fax spool directories.
Start by editing/verifying the contents of the mgetty+sendfax fax-related files. The parts I believe are important are:
/etc/mgetty+sendfax/faxheader -- The header that gets sent with faxes. Something like this should do:
FAX FROM: Psychogenic 514-555-1212 TO: @T@ PAGE: @P@ OF @M@
/etc/mgetty+sendfax/faxrunq.config -- the device to use (same as in voice.conf)
# which devices to use for outgoing faxes, separated by ":" (default: no tty)
# this may be overridden by the -l command line switch
fax-devices ttyS1
/etc/mgetty+sendfax/sendfax.config -- the device to use (same as in voice.conf)
# which devices to use for outgoing faxes
fax-devices ttyS1
# which fax number to transmit to the receiving station
fax-id 514-555-1212
When that is done, you need to decide who can use faxspool to send faxes (this may have security implications, I really don't know, but since the outgoing fax dir needs to be writable by anyone - sticky 777 mode, drwxrwxrwt - I can't see it making much difference).
If you want users other than root to be able to send faxes, create a file called:
/etc/mgetty+sendfax/fax.allow
and include all users you wish to give faxing permissions to. Alternatively, you could create a /etc/mgetty+sendfax/fax.deny file instead, to deny certain users (all others will have faxing rights).
Now users can use VOCPhax to queue faxes but they still need to be sent. This is achieved with
- faxrunq
or
- faxrunqd
You can set up a cron job (as root) to periodically run faxrunq (say, every 15 minutes), like this:
# crontab -e
*/15 * * * * /usr/bin/faxrunq
You may also choose to simply run the faxrunqd daemon, which will periodically check the spool for queued fax jobs and send them along. In this case, ensure that faxrunqd is started, either by adding something like
/usr/sbin/faxrunqd &
to the end of your /etc/rc.d/rc.local file or use /etc/inittab to respawn the daemon like we do for vgetty.
Finally, fax setup is done. One technique I have not tried but looks mighty interesting is using your box as a fax-server, where other machines on your network can simply print to a "fax-printer" to have the faxes sent. This involves using the efax package and is describe in the (slightly outdated) "Fax-Server Mini HOWTO":
http://www.tldp.org/HOWTO/mini/Fax-Server.html
|