[asterisk-users] 1.6.1-b4: Can't get fax2mail work from System()

OCG Technical Support support at ocg.ca
Wed Jan 14 16:39:24 CST 2009


Start with your mail log.  Any errors visible?
How about system log - PAM....permission errors?

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of sean darcy
Sent: January 14, 2009 5:31 PM
To: Asterisk Users List
Subject: [asterisk-users] 1.6.1-b4: Can't get fax2mail work from System()

On 1.6.1-beta4:

Trying to receive faxes over a pstn line. extensions.conf:

[incoming-pstn-line]
exten => fax,1,NoOp(Fax Detected)
exten => fax,2,GoTo(incoming-fax,s,1)
exten => fax,n,Hangup()
............

[incoming-fax]
exten => 
s,1,Set(FAXFILE=/var/spool/asterisk/fax/${STRFTIME(${EPOCH},,%Y%m%d%H%M)}-0$
{CALLERIDNUM})
exten => s,2,ReceiveFAX(${FAXFILE}.tif)
exten => s,3,Hangup()
exten=>h,1,System(/usr/local/bin/fax2mail.1.sh --dest-name "Sean" 
--dest-email "${Sean_email}" -f "${FAXFILE}")

which looks like it works just fine from the cli:

     -- DAHDI/2-1 is ringing
     -- Redirecting DAHDI/4-1 to fax extension
     -- Hungup 'DAHDI/2-1'
   == Spawn extension (incoming-pstn-line, fax, 1) exited non-zero on 
'DAHDI/4-1'
     -- Executing [fax at incoming-pstn-line:1] NoOp("DAHDI/4-1", "Fax 
Detected") in new stack
     -- Executing [fax at incoming-pstn-line:2] Goto("DAHDI/4-1", 
"incoming-fax,s,1") in new stack
     -- Goto (incoming-fax,s,1)
     -- Executing [s at incoming-fax:1] Set("DAHDI/4-1", 
"FAXFILE=/var/spool/asterisk/fax/200901141711-0") in new stack
     -- Executing [s at incoming-fax:2] ReceiveFAX("DAHDI/4-1", 
"/var/spool/asterisk/fax/200901141711-0.tif") in new stack
     -- Executing [s at incoming-fax:3] Hangup("DAHDI/4-1", "") in new stack
   == Spawn extension (incoming-fax, s, 3) exited non-zero on 'DAHDI/4-1'
     -- Executing [h at incoming-fax:1] System("DAHDI/4-1", 
"/usr/local/bin/fax2mail.1.sh --dest-name "Sean" --dest-email 
"seandarcy2 at gmail.com" -f "/var/spool/asterisk/fax/200901141711-0"") in 
new stack
     -- Hungup 'DAHDI/4-1'

But it doesn't - no email is ever sent. BUT, if I execute the fax2mail 
cmd from the terminal (pasting from the cli output) it sends the email:

/usr/local/bin/fax2mail.1.sh --dest-name "Sean" --dest-email 
"seandarcy2 at gmail.com" -f "/var/spool/asterisk/fax/200901141711-0"

Am I screwing up the System() command somehow? Is System() screwed up in 
1.6.1?

Any clues how to debug this? I did find one relevant thread 
http://asteriskforum.ru/viewtopic.php?p=15629 , which is unfortunatley 
in Russian. In that thread someone figured out how to turn on DEBUG for 
app_fax. How did you do that?

sean


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list