![]() |
Hello, There are 3 ways that you could get this information: 1 - You could look at the xferfaxlog as Lee has said 2 - You could look at the jobfile (q<JOB_NUMBER) 3 - You could connect to the hfaxd using the Hylafax protocol and interact with the fax server using the protocol to determine the state and reason. What we have done in our implementation is make use of the job file. So when the fax event is fired your hook script will get the job number the event type and the event ID. We first determine what queue the job file is (sendq or doneq) and then using grep populate variables for things like failure reason. Once we have all this information we log it into a database and for some events put messages on a processing queue which other applications subscribe to. Here is the snippet of code that we use to get the data out of the jobfile: QFILE=/var/spool/hylafax/$Q/q$JOBID COMMID=`/bin/grep -w -m 1 commid $QFILE|/bin/awk -F\: '{print $2}'` >/dev/null COMLOG=/var/spool/hylafax/log/c$COMMID JOBTAG=`/bin/grep -w -m 1 jobtag $QFILE|/bin/awk -F\: '{print $2}'` >/dev/null EVENTNAME=`/bin/grep -w $EVENTID /var/spool/hylafax/etc/event_descriptions|grep -w $EVENTCLASS|/bin/awk -F " " '{print $1}'` >/dev/null SENDER=`/bin/grep -w -m 1 sender $QFILE|/bin/awk -F\: '{print $2}'` >/dev/null OWNER=`/bin/grep -w -m 1 owner $QFILE|/bin/awk -F\: '{print $2}'` >/dev/null STATE=`/bin/grep -w -m 1 state $QFILE|/bin/awk -F\: '{print $2}'` >/dev/null DESTNUMBER=`/bin/grep -w -m 1 external $QFILE|/bin/awk -F\: '{print $2}'` >/dev/null CSI=`/bin/grep -w -m 1 csi $QFILE|/bin/awk -F\: '{print $2}'` >/dev/null TOTPAGES=`/bin/grep -w -m 1 totpages $QFILE|/bin/awk -F\: '{print $2}'` >/dev/null REASON=`/bin/grep -w -m 1 status $QFILE|/bin/awk -F\: '{print $2,$3,$4,$5}'` >/dev/null JOBTIME=`/bin/grep -w $JOBID /var/spool/hylafax/etc/xferfaxlog|tail -1|/bin/awk -F\" '{print $7}'|/bin/awk '{print $3}'` >/dev/null CONNTIME=`/bin/grep -w $JOBID /var/spool/hylafax/etc/xferfaxlog|tail -1|/bin/awk -F\" '{print $7}'|/bin/awk '{print $4}'` >/dev/null XMTFILE=$XMTBASE$JOBID/xmt_$JOBID\_$COMMID.php ARCHIVELOC=$ARCHIVEBASE$JOBID MODEM_REASON=`get_modem_reason` Hope this helps. Dominique On Tue, Sep 21, 2010 at 4:05 AM, Lee Howard <faxguy@xxxxxxxxxxxxxxxx> wrote: > Magicaoc Magicaoc wrote: >> >> I would like to know the exact reason why the previous send attempt failed >> that it is resending it. > > You can look at the xferfaxlog data. > > Thanks, > > Lee. > > > ____________________ HylaFAX(tm) Users Mailing List _______________________ > To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi > On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null > *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx* > > ____________________ HylaFAX(tm) Users Mailing List _______________________ To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*