HylaFAX The world's most advanced open source fax server

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

[hylafax-users] Fwd: faxrcvd script





---------- Forwarded message ----------
From: Jon Farmer <viperdudeuk@xxxxxxxxx>
Date: 2008/10/21
Subject: Re: [hylafax-users] faxrcvd script
To: Scott.Chapman@xxxxxxxxxxxxxxxxxxx


Hmm well I have done this and when I call /var/spool/hylafax/bin/faxrcvd with relevant arguments from the commandline it all works including calling my PHP script. When faxgetty calls it on incoming fax the PHP script is not excuted and nothing in the error log!


 

From: hylafax-users-bounce@xxxxxxxxxxx [mailto:hylafax-users-bounce@xxxxxxxxxxx] On Behalf Of Scott.Chapman@xxxxxxxxxxxxxxxxxxx
Sent: Tuesday, October 21, 2008 9:57 AM
To: Jon Farmer; hylafax-users@xxxxxxxxxxx
Subject: Re: [hylafax-users] faxrcvd script

 

The way to debug this is to have faxrcvd be a shell script that executes faxrcvd.php (passing the argv's to it) and redirect the stdout and stderr of the php call to a file so you can see what's happening.

 

Here's the bottom portion of my faxrcvd script:


#
# Apply customizations.  All customizable variables should
# be set to their non-customized defaults prior to this.
#
if [ -f etc/FaxDispatch ]; then
    . etc/FaxDispatch           # NB: FaxDispatch sets SENDTO
fi

 

/var/spool/hylafax/notify_deliver/faxrcvd.py 1>> /var/spool/hylafax/notify_deliver/faxrcvd_stderr.log 2>&1

 

CleanupPrivateTmp

 

#

#

 

If you make /var/spool/hylafax/notify_deliver/faxrcvd.py be the path to your PHP file and change the location of the redirection accordingly, you should be able to make some progress.

 

Scott

-----Original Message-----
From: hylafax-users-bounce@xxxxxxxxxxx [mailto:hylafax-users-bounce@xxxxxxxxxxx]On Behalf Of Jon Farmer
Sent: Tuesday, October 21, 2008 10:50 AM
To: hylafax-users@xxxxxxxxxxx
Subject: [hylafax-users] faxrcvd script

Hi

I am trying to replace the faxrcvd script with a very simple script
written in PHP.

If I call the PHP script from the commandline with the arguments
passed by the fax server reported in syslog then it works. However
when a fax is received even though syslog reports its called the
script nothing happens.

Here is the line from the syslog

Oct 21 12:54:07 ivr FaxGetty[28048]: RECV FAX: bin/faxrcvd "recvq/
fax000000005.tif" "ttyIAX" "000000040" "" "1952291631" "<NONE>"
"<NONE>" "431912"

Here is the PHP faxrcvd script

#!/usr/bin/php -q
<?
exec("/bin/echo \"test\" | /usr/bin/mutt -a /var/spool/hylafax/" .
$argv[1] . " -s \"Fax Recevied\" em...@domain.com");
?>

Any ideas anyone?

Thanks

Jon

 
 
The information contained in this message and any attachment may be
proprietary, confidential, and privileged or subject to the work
product doctrine and thus protected from disclosure.  If the reader
of this message is not the intended recipient, or an employee or
agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify me
immediately by replying to this message and deleting it and all
copies and backups thereof.  Thank you.
 





Project hosted by iFAX Solutions