HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: [hylafax-users] xferfaxlog
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.
#!/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