Hi João.<div><br></div><div>We made up a script that sends received faxes trough a smtp server as an attachment.</div><div><br></div><div>the FAX.ael</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">context FAX</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
{</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">        s =&gt; {</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
                Answer();</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">                Set(TIMEOUT(absolute)=600);     // 10 min</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
                Wait(3);</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">                if(&quot;${CALLERID(num)}&quot;=&quot;&quot;) {                     //</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">                        Set(Number=withhold);                   // If number is private</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
                }                                               //</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">                else {</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
                        Set(Number=${CALLERID(num)});           // If number is NOT private</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">                }</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">                Set(recordFile=${UNIQUEID}_${Number}.tiff);                                                     // Record file to RAM first,</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">                Set(recordPath=/var/log/asterisk/fax/${CALLERID(dnid)}/${STRFTIME(${EPOCH},GMT+0,%F)});         // then run /usr/local/bin/mailfax $1 $2</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">                ReceiveFax(/ramdrive/${recordFile});</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
                Wait(5);</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">                Hangup();</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
        };</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">        h =&gt; {</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
        </blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">                System(/usr/local/bin/faxmail &quot;${recordPath}&quot; &quot;${recordFile}&quot;);</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">        };</blockquote><div>}</div></blockquote><div><br></div><div><br></div>and the script @ /usr/local/bin/faxmail has got something like:<div>
<br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><br><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">#!/bin/sh</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">PATH=/usr/sbin:/sbin:/bin:/usr/bin:/usr/local/bin</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">if [ -d &quot;$1&quot; ]; then</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<span class="Apple-tab-span" style="white-space:pre">        </span>mv &quot;/ramdrive/$2&quot; &quot;$1&quot;;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-tab-span" style="white-space:pre">        </span>chmod a+rx &quot;$1/$2&quot;;</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">else</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-tab-span" style="white-space:pre">        </span>mkdir -p &quot;$1&quot;;</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-tab-span" style="white-space:pre">        </span>mv &quot;/ramdrive/$2&quot; &quot;$1&quot;;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<span class="Apple-tab-span" style="white-space:pre">        </span>chmod a+rx &quot;$1/$2&quot;;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">fi</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">#chmod a+rx &quot;/ramdrive/$2&quot;;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">{</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
  (</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    sleep 1</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &quot;ehlo <a href="http://tretas.eu">tretas.eu</a>&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    sleep 1</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &quot;AUTH LOGIN&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    sleep 0</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo -n &quot;<a href="mailto:asterisk@tretas.eu">asterisk@tretas.eu</a>&quot;|base64</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    sleep 0</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo -n &quot;tretas&quot;|base64</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &quot;MAIL FROM: &lt;<a href="mailto:asterisk@tretas.eu">asterisk@tretas.eu</a>&gt;&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    sleep 0</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;RCPT TO: &lt;<a href="mailto:tiago.geada@gmail.com">tiago.geada@gmail.com</a>&gt;&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &quot;RCPT TO: &lt;<a href="mailto:fax@tretas.eu">fax@tretas.eu</a>&gt;&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    sleep 1</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;data&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;Subject: FAX $2&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &quot;FROM: &lt;<a href="mailto:asterisk@tretas.eu">asterisk@tretas.eu</a>&gt;&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;TO: &lt;<a href="mailto:fax@tretas.eu">fax@tretas.eu</a>&gt;&quot;</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    sleep 1</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &#39;Content-Type: multipart/mixed; boundary=Y3VzY28udHJldGFzLmV1&#39;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;&quot;</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;--Y3VzY28udHJldGFzLmV1&quot;</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &#39;Content-Type: multipart/alternative; boundary=&quot;Y3VzY28udHJldGFzLmV2&quot;&#39;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &quot;&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &quot;--Y3VzY28udHJldGFzLmV2&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &#39;Content-Type: text/plain; charset=&quot;ISO-8859-1&quot;&#39;</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;Fax em $(date)&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &quot;$1/$2&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;--Y3VzY28udHJldGFzLmV2&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &#39;Content-Type: text/html; charset=&quot;ISO-8859-1&quot;&#39;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;&quot;</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;Fax em $(date)&lt;br&gt;$1/$2&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &quot;&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &quot;--Y3VzY28udHJldGFzLmV2--&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;--Y3VzY28udHJldGFzLmV1&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &#39;Content-Type: image/tiff; name=&quot;fax.tiff&quot;&#39;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &#39;Content-Disposition: attachment; filename=&quot;fax.tiff&quot;&#39;</blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;Content-Transfer-Encoding: base64&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    echo &quot;X-Attachment-Id: 0.1&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    sleep 1;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
    cat &quot;$1/$2&quot;|base64</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    sleep 1;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;--Y3VzY28udHJldGFzLmV1--&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">    echo &quot;.&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
#    echo &quot;quit&quot;</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">   ) | telnet <a href="http://smtp.tretas.eu">smtp.tretas.eu</a> 25</blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
}</blockquote><div><br></div></blockquote>Boa sorte!<div><br></div><div><br><div><div><div><div class="gmail_quote">On 30 March 2010 16:29, Joao Gomes Pereira <span dir="ltr">&lt;<a href="mailto:gomespereira@startel.pt">gomespereira@startel.pt</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello<br>
Im trying to configure Fax2Mail in my Asterisk 1.4.23.1 server, wich<br>
receievs the Faxes through a SIP trunk.<br>
I found a lot of solutions in <a href="http://voip-info.org" target="_blank">voip-info.org</a><br>
So, I would like to know what&#39;s the best free Fax2Mail solution and if I<br>
really need to install Dahdi or Zaptel.<br>
Thanks<br>
Regards<br>
Joao Pereira<br>
<br>
--<br>
StarTel - A Rede Livre<br>
Joao Gomes Pereira<br>
<a href="http://www.startel.pt" target="_blank">www.startel.pt</a><br>
+351 304500650<br>
sip: <a href="mailto:gomespereira@startel.pt">gomespereira@startel.pt</a><br>
<br>
<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>
               <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>
   <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></div></div>