<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Have you tried calling a bash script that in turns calls mutt. That way you could debug much easier, adding echo to a log file.<br><br>Sent from my iPhone</div><div><br>On 2013-06-20, at 5:27 PM, Daniel - Asterisk &lt;<a href="mailto:earohuanca@gmail.com">earohuanca@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>Hello jg:</div><div>&nbsp;</div><div>When mutt is called from Asterisk's dialplan there's no output at mail.log</div><div>&nbsp;</div><div>When I use: </div><div>echo | /usr/bin/mutt -s "New fax" <a href="mailto:earohuanca@gmail.com">earohuanca@gmail.com</a> -a ${FAXDEST}/${tempfax} &gt; /tmp/ocurrencias.txt 2&gt;&amp;1</div>
<div>replacing FAXDEST and TEMPFAX with proper values, the output is as follows:</div><div>&nbsp;</div><div>Jun 20 16:16:16 SERVER-NAME sendmail[21276]: My unqualified host name (SERVER-NAME) unknown; sleeping for retry<br>Jun 20 16:17:16 SERVER-NAME sendmail[21276]: unable to qualify my own domain name (SERVER-NAME) -- using short name<br>
Jun 20 16:17:16 SERVER-NAME sendmail[21276]: r5KLHGgk021276: from=root, size=116501, class=0, nrcpts=1, msgid=&lt;20130620211615.GA21267@SERVER-NAME&gt;, relay=root@localhost<br>Jun 20 16:17:17 SERVER-NAME sm-mta[21285]: r5KLHGNY021285: from=&lt;root@SERVER-NAME&gt;, size=116646, class=0, nrcpts=1, msgid=&lt;20130620211615.GA21267@SERVER-NAME&gt;, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]<br>
Jun 20 16:17:17 SERVER-NAME sendmail[21276]: r5KLHGgk021276: to=<a href="mailto:earohuanca@gmail.com">earohuanca@gmail.com</a>, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=146501, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (r5KLHGNY021285 Message accepted for delivery)<br>
Jun 20 16:17:19 SERVER-NAME sm-mta[21287]: STARTTLS=client, relay=<a href="http://gmail-smtp-in.l.google.com">gmail-smtp-in.l.google.com</a>., version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-SHA, bits=128/128<br>Jun 20 16:17:20 SERVER-NAME sm-mta[21287]: r5KLHGNY021285: to=&lt;<a href="mailto:earohuanca@gmail.com">earohuanca@gmail.com</a>&gt;, ctladdr=&lt;root@SERVER-NAME&gt; (0/0), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=236646, relay=<a href="http://gmail-smtp-in.l.google.com">gmail-smtp-in.l.google.com</a>. [173.194.76.26], dsn=2.0.0, stat=Sent (OK 1371763040 f6si834075qaf.111 - gsmtp)<br>
</div><div>ocurrencias.txt is empty also.</div><div>&nbsp;</div><div>Elder Arohuanca</div><div>&nbsp;</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 19, 2013 at 3:12 PM, jg <span dir="ltr">&lt;<a href="mailto:webaccounts@jgoettgens.de" target="_blank">webaccounts@jgoettgens.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>More things to try:<br>
      <br>
      (1) Is there any entry in /var/log/maillog (or equivalent log
      file)? If so, mutt basically works and the messages should give
      some clues.<br>
      (2) What happens if you call mutt without any attachments?<br>
      <br>
      I am using mutt in exactly the same way and it works.<br>
      <br>
      jg<br>
      <br>
      Am 19.06.2013 21:50, schrieb Daniel - Asterisk:<br>
    </div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">
        <div>Hi Andre:</div>
        <div>&nbsp;</div>
        <div>I added echo to provide STDIN, I'm sure on variable
          contents, please see bellow</div>
        <div>&nbsp;</div>
        <div>&nbsp;</div>
        <div>Hello Steve,</div>
        <div>&nbsp;</div>
        <div>1. I've just addd echo at my sentence, please see output
          bellow.</div>
        <div>2. Asterisk is executing as root, I think Asterisk has
          access to read TIF files since I've used ls, chmod, cp &amp;
          mv from Asterisk's CLI with '!' character.</div>
        <div>3. I don't get you, please give some advice to try using
          Verbose instead System</div>
        <div>4. I don't know how to get this, but I'm using
          /usr/bin/mutt as you can see bellow.</div>
        <div>5. I have redirected output of System this way :
          System(echo | /usr/bin/mutt -s "New fax" <a href="mailto:earohuanca@gmail.com" target="_blank">earohuanca@gmail.com</a>
          -a ${FAXDEST}/${tempfax} &gt; /tmp/ocurrencies.txt
          2&gt;&amp;1), ocurrencies.txt is empty.</div>
        <div>&nbsp;</div>
        <div>&nbsp;</div>
        <div>DIALPLAN:</div>
        <div>[ Context 'default' created by 'pbx_config' ]<br>
          &nbsp; '*95' =&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1. NoOp(trying to send a fax to an
          email)&nbsp;&nbsp;&nbsp;&nbsp; <br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.
          Set(FAXDEST=/tmp/faxes)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3. Set(tempfax=${SHELL(ls
          /tmp/faxes/*.tif):11}) <br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4. NoOp(file name is:
          ${tempfax})&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.
          Goto(incoming-fax,fax,7)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div>
        <div>&nbsp;</div>
        <div>[ Context 'incoming-fax' created by 'pbx_config' ]<br>
          &nbsp; 'fax' =&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1. Verbose(3,Incoming
          fax)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...</div>
        <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.
          ReceiveFax(${FAXDEST}/${tempfax})&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6. Verbose(3,- Fax receipt completed with
          status: ${FAXSTATUS}) <br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7. System(echo | /usr/bin/mutt -s "New
          fax" <a href="mailto:earohuanca@gmail.com" target="_blank">earohuanca@gmail.com</a>
          -a ${FAXDEST}/${tempfax}) <br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8. NoOp(System command status is:
          ${SYSTEMSTATUS}) <br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9. Hangup()</div>
        <div>&nbsp;</div>
        <div>ASTERISK CLI OUTPUT:<br>
          &nbsp;&nbsp;&nbsp; -- Goto (default,*95,1)<br>
          &nbsp;&nbsp;&nbsp; -- Executing [*95@default:1] NoOp("SIP/40106-00001ea1",
          "trying to send a fax to an email") in new stack<br>
          &nbsp;&nbsp;&nbsp; -- Executing [*95@default:2] Set("SIP/40106-00001ea1",
          "FAXDEST=/tmp/faxes") in new stack<br>
          &nbsp;&nbsp;&nbsp; -- Executing [*95@default:3] Set("SIP/40106-00001ea1",
          "tempfax=201306191111.tif") in new stack<br>
          &nbsp;&nbsp;&nbsp; -- Executing [*95@default:4] NoOp("SIP/40106-00001ea1",
          "file name is: 201306191111.tif") in new stack<br>
          &nbsp;&nbsp;&nbsp; -- Executing [*95@default:5] Goto("SIP/40106-00001ea1",
          "incoming-fax,fax,7") in new stack<br>
          &nbsp;&nbsp;&nbsp; -- Goto (incoming-fax,fax,7)<br>
          &nbsp;&nbsp;&nbsp; -- Executing [fax@incoming-fax:7]
          System("SIP/40106-00001ea1", "echo | /usr/bin/mutt -s "New
          fax" <a href="mailto:earohuanca@gmail.com" target="_blank">earohuanca@gmail.com</a>
          -a /tmp/faxes/201306191111.tif") in new stack<br>
          &nbsp;&nbsp;&nbsp; -- Executing [fax@incoming-fax:8]
          NoOp("SIP/40106-00001ea1", "System command status is:
          APPERROR") in new stack<br>
          &nbsp;&nbsp;&nbsp; -- Executing [fax@incoming-fax:9]
          Hangup("SIP/40106-00001ea1", "") in new stack<br>
          &nbsp;</div>
        <div>&nbsp;</div>
        <div>Elder D. Arohuanca</div>
        <div>Lima - Peru</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Wed, Jun 19, 2013 at 1:38 PM, Andre
          Courchesne <span dir="ltr">&lt;<a href="mailto:voipforces@gmail.com" target="_blank">voipforces@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
            <div>Why "echo |" ?
              <div><br>
              </div>
              <div>Alsy are you sire of the content of&nbsp;${FAXDEST}
                and&nbsp;${tempfax}.</div>
              <div><br>
              </div>
              <div>Add some NoOp before.</div>
              <div>
                <div>
                  <div><br>
                  </div>
                  <div><br>
                    <div>
                      <div>On 2013-06-19, at 2:29 PM, Daniel - Asterisk
                        &lt;<a href="mailto:earohuanca@gmail.com" target="_blank">earohuanca@gmail.com</a>&gt;
                        wrote:</div>
                      <br>
                      <blockquote type="cite">
                        <div dir="ltr">
                          <div>Hi Andre,</div>
                          <div>&nbsp;</div>
                          <div>I've tried with: </div>
                          <div>System(echo | /usr/bin/mutt -s "New fax"
                            <a href="mailto:earohuanca@gmail.com" target="_blank">earohuanca@gmail.com</a>
                            -a ${FAXDEST}/${tempfax})</div>
                          <div>&nbsp;</div>
                          <div>with no success, value of SYSTEMSTATUS
                            variable is APPERROR</div>
                          <div>&nbsp;</div>
                          <div>Again it works from Linux shell.</div>
                          <div>&nbsp;</div>
                          <div>Thanks in advance</div>
                          <div>&nbsp;</div>
                          <div>Elder</div>
                        </div>
                        <div class="gmail_extra">
                          <br>
                          <br>
                          <div class="gmail_quote">On Wed, Jun 19, 2013
                            at 1:08 PM, Andre Courchesne <span dir="ltr">&lt;<a href="mailto:voipforces@gmail.com" target="_blank">voipforces@gmail.com</a>&gt;</span>
                            wrote:<br>
                            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
                              <div>Probably Asterisk does not know where
                                mutt is, specify it's path in your
                                System command.
                                <div><br>
                                  <div>
                                    <div>
                                      <div>
                                        <div>On 2013-06-19, at 2:03 PM,
                                          Daniel - Asterisk &lt;<a href="mailto:earohuanca@gmail.com" target="_blank">earohuanca@gmail.com</a>&gt;
                                          wrote:</div>
                                        <br>
                                      </div>
                                    </div>
                                    <blockquote type="cite">
                                      <div>
                                        <div>
                                          <div dir="ltr">
                                            <div>Hello everyone,</div>
                                            <div>&nbsp;</div>
                                            <div>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.</div>
                                            <div>&nbsp;</div>
                                            <div>Successful Linux
                                              command: </div>
                                            <div>echo | mutt -s "New
                                              fax" <a href="mailto:earohuanca@gmail.com" target="_blank">earohuanca@gmail.com</a>
                                              -a
                                              /tmp/faxes/201306191111.tif</div>
                                            <div>&nbsp;</div>
                                            <div>
                                              Unsuccessful Asterisk
                                              Command:</div>
                                            <div>same =&gt;
                                              n,System(mutt -s "New fax"
                                              <a href="mailto:elder.arohuanca@gmail.com" target="_blank">elder.arohuanca@gmail.com</a>
                                              -a
                                              ${FAXDEST}/${tempfax}.tif)</div>
                                            <div>&nbsp;</div>
                                            <div>I'm using Asterisk
                                              1.8.19.0 on Debian 6.0.6,
                                              Asterisk was installed by
                                              root.</div>
                                            <div>&nbsp;</div>
                                            <div>Any hint will be
                                              appreciated.</div>
                                            <div>&nbsp;</div>
                                            <div>Elder D. Arohuanca</div>
                                            <div>Lima - Peru<br>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                      <span><font color="#888888">
                                          --<br>
_____________________________________________________________________<br>
                                          -- Bandwidth and Colocation
                                          Provided by <a href="http://www.api-digital.com/" target="_blank">http://www.api-digital.com</a>
                                          --<br>
                                          New to Asterisk? Join us for a
                                          live introductory webinar
                                          every Thurs:<br>
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
                                          <br>
                                          asterisk-users mailing list<br>
                                          To UNSUBSCRIBE or update
                                          options visit:<br>
                                          &nbsp;&nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></font></span></blockquote>
                                  </div>
                                  <br>
                                </div>
                              </div>
                              <br>
                              --<br>
_____________________________________________________________________<br>
                              -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com/" target="_blank">http://www.api-digital.com</a>
                              --<br>
                              New to Asterisk? Join us for a live
                              introductory webinar every Thurs:<br>
                              &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
                              <br>
                              asterisk-users mailing list<br>
                              To UNSUBSCRIBE or update options visit:<br>
                              &nbsp; &nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
                            </blockquote>
                          </div>
                          <br>
                        </div>
                        --<br>
_____________________________________________________________________<br>
                        -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a>
                        --<br>
                        New to Asterisk? Join us for a live introductory
                        webinar every Thurs:<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
                        <br>
                        asterisk-users mailing list<br>
                        To UNSUBSCRIBE or update options visit:<br>
                        &nbsp;&nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote>
                    </div>
                    <br>
                  </div>
                </div>
              </div>
            </div>
            <br>
            --<br>
_____________________________________________________________________<br>
            -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
            New to Asterisk? Join us for a live introductory webinar
            every Thurs:<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
            <br>
            asterisk-users mailing list<br>
            To UNSUBSCRIBE or update options visit:<br>
            &nbsp; &nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a>

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></pre>
    </blockquote>
    <br>
  </div></div></div>

<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
&nbsp; &nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>--</span><br><span>_____________________________________________________________________</span><br><span>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a> --</span><br><span>New to Asterisk? Join us for a live introductory webinar every Thurs:</span><br><span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.asterisk.org/hello">http://www.asterisk.org/hello</a></span><br><span></span><br><span>asterisk-users mailing list</span><br><span>To UNSUBSCRIBE or update options visit:</span><br><span> &nbsp;&nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></span></div></blockquote></body></html>