Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pagesend replacement?




Here is a script I use with hylafax to do a digital page.
Its not perfect, as it will only try a digital page for 3 minutes 
before giving up. Also I had to adjust the , time on my modem
(S8? I forget) 

I use the "page" id string to prevent any fax errors from being sent.
Instead faxmaster gets a note via the diff below for notify.awk.

Seems kludgy, but in practice works great.

E

----

digipage

#!/bin/sh
#
# send a digital page
#
#
# test args and print error message if needed
#
if [ x$1 = x -o x$2 = x ]
then
        echo "digifax usage:  digipage pagernum returnnum [other sendfax 
options
]"
        echo "pager number is the pager number to dial"
        echo "returnnum is the number to send as return value"
        echo "Other options to sendfax will be passed along"
        echo " "
        exit
fi
to=$1
ret=$2
shift; shift
#
# send the page
#
echo "junk" | sendfax $* -n -N -i page -k "now +3 minute" -d $to,,,,$ret\#


--- Diff for /var/spool/fax/bin/notify.awk

*** notify.awk.dist     Thu Jan  2 09:39:37 1997
--- notify.awk  Thu Jan  2 09:08:02 1997
***************
*** 269,277 ****
        if (why == "killed")
            returnToSender();
      } else if (why == "timedout") {
!       putHeaders(jobtag " to " number " failed");
!       print " could not be completed before the appointed deadline.";
!       returnToSender();
      } else if (why == "format_failed") {
        putHeaders(jobtag " to " number " failed");
        print " was not sent because document conversion"
--- 269,282 ----
        if (why == "killed")
            returnToSender();
      } else if (why == "timedout") {
!         if ( jobtag == "page" ) {
!            printf("From: fax\nTo: faxmaster\nSubject: page sent\n\n");
!            printf("Page to %s sent by %s\n",number,mailaddr);
!         }  else { 
!            putHeaders(jobtag " to " number " failed");
!            print " could not be completed before the appointed deadline.";
!            returnToSender();
!         }
      } else if (why == "format_failed") {
        putHeaders(jobtag " to " number " failed");
        print " was not sent because document conversion"



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services