How to Set Up a Simple Fax Polling Server (mgetty)

The mgetty+sendfax package contains mgetty, a daemon that allows processing of incoming fax polling requests.

To set up a simple fax polling server, proceed as described below:

  1. Make sure that the mgetty+sendfax package is installed on your system.

  2. Change the context of the /etc/mgetty+sendfax/mgetty.config file as follows:

# Select your preferred debug level here.
# The current global debug level is "4" (default from policy.h).
debug 4

# Set any interface. The exact value is not important
# because the Dialogic® Diva® TTY interface is virtual.
speed 38400

init-chat "" AT?F;S0=0;E0;\\V1#CID=1 OK
# Set your FAX ID in the following line
fax-id 0123456789

blocking no
toggle-dtr no
modem-check-time 0
answer-chat-timeout 180 fax-only Y
modem-type cls2

  1. Add the following line to the /etc/inittab file, one for every Diva TTY interface that you plan to use for faxes.

SXX:235:respawn:/usr/sbin/mgetty -S polling ttydsXX

"polling" is the name of the fax document to be polled (in G3 format). Optionally, it can be a text file that contains the list of the fax document files (one file name per line). In this case, the files should be in G3 format and will be transmitted as consecutive pages of the same fax document.

"XX" is the Diva TTY device number (01, 02, etc.). For example, if one Diva BRI Media Board with 2 channels is installed in the system, you should add two entries:

S01:2345:respawn:/usr/sbin/mgetty -S polling ttyds01
S02:2345:respawn:/usr/sbin/mgetty -S polling ttyds02

  1. Issue kill -HUP 1 to start mgetty.