[Asterisk-Users] SpanDSP rxfax, no tiff.

Jason Walker desktophero at gmail.com
Wed Jul 13 23:45:38 MST 2005


I may be a little late on this, but what permissions are on
/usr/local/sbin/mailfax?
 
I have a similar set up to execute a mysql query to grab the email address
based on DNIS (PRI T1 with multiple numbers on one circuit) and then email
the fax to the destination. I set the perm to 755 on the script so
everyone/thing can execute.
 
Also, what are the perms on /var/spool/asterisk/asterisk-fax?
 
Can you run the script from the command line by passing it the appropriate
values (i.e. /usr/local/sbin/mailfax
/var/spool/asterisk/asterisk-fax/#########.#.tiff me at mycompany.com?
 
In the event that something weird is going on with the command line
parameters, here are some considerations:
 

*	

	If the folder for the TIFFs is always the same, you could do a Set
(or SetVar depending on your Asterisk build) to have the UNIQUEID passed
only to the script
*	

	If the email reciepients are always on the same domain, you need to
only pass the name portion of the email address

For example:
Extensions.conf section ---

[fax]

exten => s,1,Answer

exten => s,2,Macro(faxreceive)

;exten => h,1,system(/usr/local/sbin/mailfax ${FAXFILE} ${EMAILADDR})
<< This line could go away

 

[macro-faxreceive]

exten => s,1,Set(FAX_OUT=${UNIQUEID})

exten => s,2,Set(FAXFILE=/var/spool/asterisk/asterisk-fax/${FAX_OUT}.tif)

exten => s,3,rxfax(${FAXFILE})

exten => s,4,system(/usr/local/sbin/mailfax ${FOX_OUT} MyName)

;exten => s,3,Set(EMAILADDR=yyyy at zzzzzzzzz.com)        << This line could go
away

 

Assuming #!/bin/bash ;)

 

#!/bin/bash

 

#    $ARG1 is the TIFF file name

#    $ARG2 is the name of the domain email user

 

EMAIL_ADDR=$2"@mycompany.com"

FAX_FILE="/var/spool/asterisk/asterisk-fax/"$1

 

#    Do the sendmail thing here

 

#--------------------------------------------------------------------------

 

Just my 40 cents.


  _____  

From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Rob Danz
Sent: Wednesday, July 13, 2005 8:18 AM
To: asterisk-users at lists.digium.com
Subject: [Asterisk-Users] SpanDSP rxfax, no tiff.



Hello,

Let me start by saying I have checked the wiki and the archives and did find
some relative information.  I tried the suggestions in those threads, but
still have the same problem.

 

I'm using the CVS Asterisk from July 11, 2005.

Redhat FC2

SpanDSP 0.0.2pre18

Libtiff 3.5.7

Digium PCI card 1 FXO, 1FXS.

 

I have a single POTS line coming, but I have 2 numbers and am using
distinctive ring detection in *.

When you call my "fax" number, the ring detection does work, and does send
it to the fax context correctly.

 

The debugs show the call is answered, rxfax is invoked and it is trying to
write to the fax file.  After the sending party hangs up, it tries to
execute a script that will ultimately mail me the fax file.  But since the
tiff file isn't there to begin with, that fails.  The permissions on that
folder are 777 for now. so permissions aren't the problem.  

 

I saw a post by Steve Underwood from last year on a similar problem, but it
was looking like timing slips on the T1/E1 for that user . I'm just using a
POTS line though.  I've also done ztmonitor to look at the Rx and Tx levels.
Rx is a little hotter than Tx, but they're both well on the right hand side
of the scale.  

 

Any help is appreciated.  Debugs & extensions.conf excerpt are below.

Thanks,

Rob

 

Debug output ---

Jul 13 10:04:34 NOTICE[7975]: chan_zap.c:5759 ss_thread: Got event 2
(Ring/Answered)...

    -- Detected ring pattern: 93,0,0

    -- Distinctive Ring matched context fax

    -- Executing Answer("Zap/4-1", "") in new stack

    -- Executing Macro("Zap/4-1", "faxreceive") in new stack

    -- Executing Set("Zap/4-1",
"FAXFILE=/var/spool/asterisk/asterisk-fax/1121267067.12.tif") in new stack

    -- Executing RxFAX("Zap/4-1",
"/var/spool/asterisk/asterisk-fax/1121267067.12.tif") in new stack

    -- Executing System("Zap/4-1", "/usr/local/sbin/mailfax
/var/spool/asterisk/asterisk-fax/1121267067.12.tif ") in new stack

Jul 13 10:05:03 WARNING[7975]: app_system.c:75 system_exec_helper: Unable to
execute '/usr/local/sbin/mailfax
/var/spool/asterisk/asterisk-fax/1121267067.12.tif '

    -- Hungup 'Zap/4-1'

 

 

Extensions.conf section ---

[fax]

exten => s,1,Answer

exten => s,2,Macro(faxreceive)

exten => h,1,system(/usr/local/sbin/mailfax ${FAXFILE} ${EMAILADDR})

 

[macro-faxreceive]

exten => s,1,Set(FAXFILE=/var/spool/asterisk/asterisk-fax/${UNIQUEID}.tif)

exten => s,2,rxfax(${FAXFILE})

exten => s,3,Set(EMAILADDR=yyyy at zzzzzzzzz.com)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050714/73d770ef/attachment.htm


More information about the asterisk-users mailing list