Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: [hylafax-users] commID and more
* moritz winterberg <winterberg@xxxxxxxxxx> [051207 07:28]:
> Hi there,
>
> I'm currently writing a FAX Daemon in Perl. It is getting pdf and
> faxnumber from a webinterface via socket and uses its own ftp/client
> module for communication with hylafax.
> All this works quite fine already and now I'd like to tune it a little
> by getting more information on faxjob status.
> Since I am using isdn/capi hardware (eicon diva server) I'd be
> interested in getting more information on fax trasmit failures. To be
> more specific, I'd like to know the type of error that occured if there
> is one such as "line busy" or "number unavailable" and so on. Also I'd
> like to know how many pages have been sent if the fax partially failed.
>
> Does somebody have a hint how to get those infos ?
>
> I already know there are some of these in the c000* log files
> under /var/spool/hylafax/log. But in order to parse those I'd need
> the commID where I only have the JobID and I don't know how to get this
The last commid is stored in the job:
#!/usr/bin/perl
use Net::FTP;
my %OPTIONS =
(
hylafax => localhost,
port => 4559,
debug => 1,
);
my $ftp = Net::FTP->new($OPTIONS{hylafax}, Debug => ($OPTIONS{debug} > 2), Port => $OPTIONS{port})
or die "Cannot connect to $OPTIONS{hylafax}: $@";
$ftp->login('aidan') or die "Couldnt' login in: $@";
foreach my $jobid (@ARGV)
{
$ftp->quot('JOB', $jobid);
$ftp->quot('JPARM COMMID');
my $commid = $ftp->message(); chomp $commid;
$ftp->cwd('/log');
$ftp->get("c$commid", \*STDOUT);
}
$ftp->quit;
a.
--
Aidan Van Dyk aidan@xxxxxxxx
Senior Software Developer +1 215 438-4638 x8103
iFAX Solutions, Inc. http://www.ifax.com/
Attachment:
signature.asc
Description: Digital signature