[asterisk-users] Mailing a fax with mutt does not succeed

Bruce Marriner bruce at bmts.us
Fri Jun 21 15:00:35 CDT 2013


  I (sorry) haven't read this whole thread of e-mails but I am currently 
using asterisk (11.3) to send received faxes via e-mail on a CentOS 6.4 
system and it's working just fine.  Perhaps my receive fax macro 
dialplan that I'm testing with would be helpful...  I'm using mailx 
instead of mutt so if mutt is a requirement then I'm again sorry but 
perhaps mailx could be an alternative for the OP..


[macro-ReceiveFAX]
; ${ARG1}  - Email address(s) to send e-mail to.

exten => s,1,Verbose(0, macro-ReceiveFAX)
  same => n,Set(CHANNEL(hangup_handler_push)=fax-hdlr,1(args));
  same => n,Set(FAXPATH=/var/spool/asterisk/fax)
  same => n,Set(FAXBASE=${STRFTIME(,,%C%y%m%d%H%M)})
  same => n,Set(FAXFULL=${FAXPATH}/${FAXBASE}.tif)
  same => n,Set(FAXMAIL=${ARG1})
  same => n,NoOp(**** RECEIVING FAX : ${FAXFULL} to ${FAXMAIL} ****)
  same => n,ReceiveFax(${FAXFULL},df)
exten => fax-hdlr,1,Verbose(0, ReceiveFax Handler : Fax Status = 
${FAXSTATUS})
  same => n,Goto(fax-${FAXOPT(status)},1)
  same => n,Return()

exten => fax-SUCCESS,1,Verbose(0, ReceiveFAX SUCCESS Handler)
  same => n,System(echo "Your fax is attached to this e-mail." | mail -s 
"[FAX] Received ${FAXOPT(pages)} page fax from ${CALLERID(number)}" -a 
${FAXPATH}/${FAXBASE}.tif ${FAXMAIL})
  same => n,Return()

exten => fax-FAILED,1,Verbose(0, ReceiveFAX FAILED Handler)
  same => n,System(echo "Unable to receive fax from caller." | mail -s 
"[FAX] ${FAXOPT(status)} error: ${FAXOPT(error)} from 
${CALLERID(number)}" ${FAXMAIL})
  same => n,Return()

------ Original Message ------
From: isrlgb at gmail.com
To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
<asterisk-users at lists.digium.com>
Sent: 6/21/2013 6:19:42 AM
Subject: Re: [asterisk-users] Mailing a fax with mutt does not succeed
>How about sending the whole path to mutt in the system call
>System(/usr/sbin/mutt) where ever it is
>
>-----Original Message-----
>From: Ishfaq Malik <ish at pack-net.co.uk>
>Sender: asterisk-users-bounces at lists.digium.com
>Date: Fri, 21 Jun 2013 08:49:30
>To: Asterisk Users Mailing List - Non-Commercial 
>Discussion<asterisk-users at lists.digium.com>
>Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
>  <asterisk-users at lists.digium.com>
>Subject: Re: [asterisk-users] Mailing a fax with mutt does not succeed
>
>On Wed, 2013-06-19 at 13:03 -0500, Daniel - Asterisk wrote:
>>  Hello everyone,
>>
>>  I'm trying to send a received fax with mutt, when I try it from the
>>  Linux shel it works, but when trying with Asterisk's System command 
>>it
>>  doesn't.
>>
>>  Successful Linux command:
>>  echo | mutt -s "New fax" earohuanca at gmail.com
>>  -a /tmp/faxes/201306191111.tif
>>
>>  Unsuccessful Asterisk Command:
>>  same => n,System(mutt -s "New fax" elder.arohuanca at gmail.com -a
>>  ${FAXDEST}/${tempfax}.tif)
>>
>>  I'm using Asterisk 1.8.19.0 on Debian 6.0.6, Asterisk was installed 
>>by
>>  root.
>>
>>  Any hint will be appreciated.
>>
>>  Elder D. Arohuanca
>>  Lima - Peru
>>
>>  --
>I' though I sent this once already but here goes again...
>
>Have you tried changing to asterisk user and then do the same command?
>
>i.e.
>
>sudo su asterisk
>
>You may find that the asterisk user doesn't have a full shell
>environment and you will ahve to set one using
>
>chsh
>
>Regards
>
>Ish
>
>--
>Ishfaq Malik <ish at pack-net.co.uk>
>Department: VOIP Support
>Company: Packnet Limited
>t: +44 (0)845 004 4994
>f: +44 (0)161 660 9825
>e: ish at pack-net.co.uk
>w: http://www.pack-net.co.uk
>
>Registered Address: PACKNET LIMITED, 2A ENTERPRISE HOUSE, LLOYD STREET
>NORTH, MANCHESTER
>SCIENCE PARK, MANCHESTER, M156SE
>COMPANY REG NO. 04920552
>
>
>--
>_____________________________________________________________________
>-- Bandwidth and Colocation Provided by http://www.api-digital.com --
>New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
>asterisk-users mailing list
>To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>--
>_____________________________________________________________________
>-- Bandwidth and Colocation Provided by http://www.api-digital.com --
>New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
>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