LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-03-2013, 12:49 PM   #1
endoit
LQ Newbie
 
Registered: Jun 2013
Location: Phoenix, Arizona
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 06-03-2013, 02:21 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,694

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
I have not messed with hylafax much but your case syntax is incorrect. Here is one help page but there are others on the topic.

http://tldp.org/LDP/Bash-Beginners-G...ect_07_03.html
 
Old 06-03-2013, 04:02 PM   #3
endoit
LQ Newbie
 
Registered: Jun 2013
Location: Phoenix, Arizona
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks

Thanks Michael. I will check it out. It has been many years since I did any scripting so I wouldn't doubt this may be the problem.
 
Old 08-16-2013, 03:18 PM   #4
endoit
LQ Newbie
 
Registered: Jun 2013
Location: Phoenix, Arizona
Posts: 4

Original Poster
Rep: Reputation: Disabled
Well, I finally got this resolved after carefully reviewing my sdcripting. Thanks
 
Old 08-16-2013, 03:48 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,694

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Thanks for posting back that you got it working.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hylafax mail to fax... remodanax Linux - Server 2 05-04-2010 04:03 AM
hylafax shows problems while prefixing code in the fax no: jomy Linux - Networking 0 07-19-2005 09:24 AM
problem sending fax with hylafax jomy Linux - Networking 1 07-18-2005 08:59 AM
sendmail configuration problems (hylafax mail to fax gateway) ricky_ds Linux - Software 0 11-07-2004 12:11 AM
Fax Software (not HylaFAX please) asklepios Linux - Software 1 03-03-2004 12:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration