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] HylaFax+ FaxAccounting
Georgi Stefanov wrote:
I have installed HylaFax 5.0.0 IAXModem 0.1.14 and Asterisk 1.2.12 n a Debian Sarge system. HylaFax is working good but I want to store accounting data into MySQL server.
I have red that it is possible to create a /var/spool/hylafax/etc/FaxAccounting a excutable file which is excuted on every fax or fax query. But I don't now how to take the real account data. I have tried to create a bash script but I don't anything about the data - only that it is comming the way it is viewed in the xferfaxlog. I have seen parser scripts that get the data direct from the log file but I think that is not a good choice for realtime.
Could anybody tell me how to get the account data via FaxAccount
Notice that your xferfaxlog will show a RECV record like this:
11/10/06 13:32 RECV 001213275 ttyG002 "" fax
"+1.555.888.3721" "<UNSPECIFIED>" 2170921 1 0:27 0:27
"" "5557770090" "5558884437" "" "" "00 46 1F 21 01 01 01
01 01 04"
So etc/FaxAccounting will be invoked such that in a shell script (but
you can use your programming language of choice) you would do something
like this:
#!/bin/sh
if [ "$2" = "RECV" ]; then
DATETIME="$1"; shift;
RECTYPE="$1"; shift;
COMMID="$1"; shift;
MODEM="$1"; shift;
fi
... and so forth. Then you would run a mysql query with your favorite
mechanism using $DATETIME, $RECTYPE, $COMMID, $MODEM, etc.
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*