Problems with Hylafax fax routing
Hello every one. This is my 1st post on the forum so, I hope I am posting in the correct place.
Here is my situation. I am running a Ubuntu 11.10 server with Hylafax 6.0.6. The system has 4 analog, dialup modems installed and they function without any problems. I am also using YajHFC 0.5.3 as my fax client on 58 workstations.
My current configuration is set up so that when a fax is received on any modem , it is saved as a PDF in the “samba/fax” folder. The file is then moved to a Windows share on a Windows 2003 server for the end users to access. I do it this way to prevent end users from accessing the fax server directly.
Now I need to make a change on where faxes being received on a particular modem are saved. Basically, I need to save any faxes received on ttyS06 to the “samba/stat” folder.
I know fax routing is done through the FaxDispatch file. According to everything I have read; you must use a “case” statement and the” "$DEVICE" in” option to direct a received fax to the proper location. However when I modify the FaxDispatch file to do this; the faxes are received but they are not being routed anywhere. I could really use some help figuring this out. With that in mind, Here is my current FaxDispatch file:
xxxxxxxCURRENTxxxxxxx
# Don't want emails
NOTIFY_FAXMASTER="never"
# New name
n=`date +%Y.%m.%d.%H.%M.%S`
# New destination
t=/var/lib/samba/fax/$n
# See interesting information, commands could `2>&1 >>` here too
# set > /tmp/FaxDispatch.log
# make pdf in target
$TIFF2PDF -o $t.pdf $FILE
# We only copy to the fax location, archive this just in case
/bin/cp $FILE $t.tif
# use this to move it instead, but then there is no archive and if
# a user deletes it from the Samba Share it's gone forever
# /bin/mv $FILE /var/lib/samba/fax
# Make infos like faxrcvd
if [ -f log/c$COMMID ]; then
$SED -e '/-- data/d' \
-e '/start.*timer/d' -e '/stop.*timer/d' \
-e 's/=/=3D/g' \
log/c$COMMID
elif [ -n "$COMMID" ]; then
echo "$DICTNOLOGAVAIL ($DICTCOMMID c$COMMID)."
else
echo "$DICTNOLOGAVAIL."
fi
xxxxxxxEND OF FILExxxxxxx
Here is my modified FaxDispatch file
xxxxxxxMODIFIEDxxxxxxx
# Don't want emails
NOTIFY_FAXMASTER="never"
# New name
n=`date +%Y.%m.%d.%H.%M.%S`
# make pdf in target
$TIFF2PDF -o $t.pdf $FILE
# We only copy to the fax location, archive this just in case
/bin/cp $FILE $t.tif
# Make infos like faxrcvd
if [ -f log/c$COMMID ]; then
$SED -e '/-- data/d' \
-e '/start.*timer/d' -e '/stop.*timer/d' \
-e 's/=/=3D/g' \
log/c$COMMID
elif [ -n "$COMMID" ]; then
echo "$DICTNOLOGAVAIL ($DICTCOMMID c$COMMID)."
else
echo "$DICTNOLOGAVAIL."
fi
case "$DEVICE" in
ttyS0) /bin/mv/$FILE /var/lib/samba/fax/$n
case "$DEVICE" in
ttyS4) /bin/mv/$FILE /var/lib/samba/fax/$n
case "$DEVICE" in
ttyS5) /bin/mv/$FILE /var/lib/samba/fax/$n
case "$DEVICE" in
ttyS6) /bin/mv/$FILE /var/lib/samba/stat/$n
esac
xxxxxxxEND OF FILExxxxxxx
Any ideas or help is greatly appreciated!
Last edited by endoit; 06-04-2013 at 11:02 AM.
|