[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hylafax
Subject:    Re: [hylafax-users] xferfaxlog
From:       Lee Howard <faxguy () howardsilvan ! com>
Date:       2007-11-26 0:51:42
Message-ID: 474A189E.1040906 () howardsilvan ! com
[Download RAW message or body]

Michael Hallager wrote:

>Is there a way to log the details that go into etc/xferfaxlog into a MySQL 
>database instead?
>

Yes, this is the purpose of the FaxAccounting feature in HylaFAX+.  See:

http://hylafax.sourceforge.net/man/xferfaxlog.php

I've attached a sample FaxAccounting script that basically puts the 
xferfaxlog into a MySQL table.

Thanks,

Lee.

["FaxAccounting" (text/plain)]

#!/bin/sh

DATETIME="`date +%Y-%m-%d\ %H:%M:%S`"; shift
ENTRYTYPE="$1"; shift
COMMID="$1"; shift
MODEM="$1"; shift
JOBID="$1"; shift
JOBTAG="$1"; shift
USERID="$1"; shift
LOCALNUMBER="$1"; shift
TSI="$1"; shift
PARAMS="$1"; shift
NPAGES="$1"; shift
JOBTIME="$1"; shift
CONNTIME="$1"; shift
REASON="$1"; shift
CIDNAME="$1"; shift
CIDNUMBER="$1"; shift
CALLID="$1"; shift
OWNER="$1"; shift
DCS="$1"; shift
JOBINFO="$1"; shift

echo "INSERT INTO xferfaxlog SET timestamp = \"$DATETIME\", entrytype = \
\"$ENTRYTYPE\", commid = \"$COMMID\", modem = \"$MODEM\", jobid = \"$JOBID\", jobtag \
= \"$JOBTAG\", user = \"$USERID\", localnumber = \"$LOCALNUMBER\", tsi = \"$TSI\", \
params = \"$PARAMS\", npages = \"$NPAGES\", jobtime = \"$JOBTIME\", conntime = \
\"$CONNTIME\", reason = \"$REASON\", CIDName = \"$CIDNAME\", CIDNumber = \
\"$CIDNUMBER\", callid = \"$CALLID\", owner = \"$OWNER\", dcs = \"$DCS\", jobinfo = \
\"$JOBINFO\"" | mysql -u hylafax -ppassword database

exit 0


____________________ 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@hylafax.org < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@ifax.com.*


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic