Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] DID on HylaFax



yes & no.... I found Hylafax far too restrictive for this purpose...
Therefore in the true sense of the GNU community I ran off and used
something else.... Im now using efax on the EICON PRI...

I have changed the fax shell script wrapper so that a AT#CID=7 is issued
before fax transmission.

Added a new variable:

DAD=`grep DAD $f | cut -f8 -d" " | cut -f1 -d"<"`

Which grabs the DAD from the transmission log

FAXMGR=`grep $DAD /etc/fax2mail | cut -d" " -f2`
NOTIFY='faxmail "$REMID" "$f" $FILES | $SENDMAIL $FAXMGR'

The following 2 lines then pick up the corresponding email address from a
file in the following format:

0600 test@foo.com
etc

Thus I have faxes routed to emails based upon DAD.

Im now working on replacing the flat file with a MySQL database store.
This will be done with a perl script that returns the email address from  a
command line arguement, therefore the DAD line will be changed to:

DAD=`\usr\bin\fax2mail.pl -d <DAD>`

The perl script will look something like this:

#!/usr/bin/perl -w
use DBI;
use Getopt::Std;
my $hostname = "IP of MYSQL Server";
my $database = "fax2mail";
my $data_source = "DBI:mysql:$database";
my $username = "mysql username";
my $password = "password";
my $dad
$email = 'null@businessserve.co.uk';
getopt("d:");
if ($opt_d) {
        my $dbh = DBI->connect("DBI:mysql:$database:$hostname",$username,
$passw
ord);
        my $sql = "SELECT * FROM allocation WHERE dad = '$opt_d'";
        $sth = $dbh->prepare($sql);
        $sth->execute;
while (@data = $sth->fetchrow_array()) {
            if ($data[2] ne "") { $dad = $data[0];
            $email = $data[1];
                }

}
        print "$email\n";
$sth->finish;
$dbh->disconnect;
}

This second version works and is in testing.... however for simple system
implementation the flat file system should be fine.


PS: Sorry guys @ hylafax list... You were very helpful and I believe for
certain implementatoin hylafax is FAR superior, however you gotta take that
path of least resistance.

Cheers

Mat
-----Original Message-----
From: gambino [mailto:gambino@inwind.it]
Sent: 11 July 2003 10:49
To: MatthewHattersley
Subject: DID on HylaFax


I read your discussion on HylaFax mailing List.
Did you solve problem after all?
Can I know how? (I'm newbye of this problem too).
Thanks
   Claudio Gambino

____________________ 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@hylafax.org.*



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services