<div dir="ltr"><div><div><div><div>Lista, boa tarde.<br><br></div>Estou tentando instalar pela primeira vez um FAX no Asterisk 1.8. Observei que essa versão já vem com o módulo res_fax.so instalado. Primeiro tentei fazer uma ligação para o número 9300, para ouvir o sinal de FAX, <b>&quot;a ligação cai&quot;</b> e aparece a seguinte mensagem abaixo:<br>
<br>Using SIP RTP CoS mark 5<br>    -- Executing [9300@ramais:1] Goto(&quot;SIP/voipcallcenter-0000000f&quot;, &quot;fax,1,fax&quot;) in new stack<br>[Nov 25 12:07:06] NOTICE[3079]: pbx.c:4514 pbx_extension_helper: Cannot find extension &#39;1&#39; in context &#39;fax&#39;<br>
[Nov 25 12:07:06] WARNING[3079]: pbx.c:10888 pbx_parseable_goto: Priority &#39;fax&#39; must be a number &gt; 0, or valid label<br>  == Spawn extension (ramais, 9300, 1) exited non-zero on &#39;SIP/voipcallcenter-0000000f&#39;<b><br>
</b><br><br></div><b>Como posso saber se o meu FAX está detectando e se foi instalado da forma correta, alguém pode dar uma dica?<br></b></div><div><b>Além do extensions.conf precisa criar mais alguma configuração em um outro arquivo?</b><br>
</div><div><br><br></div>Segue configurações extensions.conf  abaixo:<br><br>[ramais]<br>exten=&gt; 9300,1,Goto(fax,1,fax)<br> <br>[fax]<br>exten =&gt; fax,1,Set(FAXFILE=/var/spool/asterisk/fax/fax-${STRFTIME(${EPOCH},GMT+8,%C%y%m%d%H%M)})<br>
exten =&gt; fax,n,Set(FAXFILENAME=fax-${STRFTIME(${EPOCH},GMT+8,%C%y%m%d%H%M)})<br>exten =&gt; fax,n,ReceiveFax(${FAXFILE}.tiff,f)<br>exten =&gt; fax,n,Hangup()<br> <br>exten =&gt; h,1,System(/usr/local/bin/<a href="http://fax2email.pl">fax2email.pl</a> ${FAXFILE}.tiff ${FAXFILENAME}.pdf usurio@dominio)<br>
<br></div><br><div>Obrigado a todos.<br><br><br></div><div><br><div><div><br><br><br><br><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">Em 10 de novembro de 2013 16:07, Elieser Junior <span dir="ltr">&lt;<a href="mailto:zeljunior@gmail.com" target="_blank">zeljunior@gmail.com</a>&gt;</span> escreveu:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Valeu Mike</p>
<div class="gmail_quote">Em 10/11/2013 15:51, &quot;Mike Tesliuk&quot; &lt;<a href="mailto:mike@tesliuk.com" target="_blank">mike@tesliuk.com</a>&gt; escreveu:<div><div class="h5"><br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div><br>
      o módulo é o res_fax, ele usa o spandsp, nao existe um
      res_fax_spandsp<br>
      <br>
      Em 09/11/13 20:17, Elieser Junior escreveu:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Lista boa noite, baixei e tentei instalar o spandsp. Fiz o
          seguinte:<br>
          <br>
          <b>Instalaei as libs abaixo: </b><br>
          # aptitude install libtiff-tools fltk1.3-doc fltk1.1-doc
          libtiff5-dev libtiff-devel libaudiofile-dev fftw2 fftw-dev
          fftw-docs<br>
          <br>
          <b>Baxei e compilei o spandsp</b><br>
          # wget <a href="http://soft-switch.org/downloads/spandsp/spandsp-0.0.6pre18.tgz" target="_blank">http://soft-switch.org/downloads/spandsp/spandsp-0.0.6pre18.tgz</a><br>
          # cd spandsp-0.0.6/<br>
          # ./configure<br>
          # make clean<br>
          # make <br>
          # make install<br>
          <b><br>
            Recompilei o asterisk 1.8</b><br>
          # cd asterisk-1.8.23.0/<br>
          # ./configure<br>
          # make menuselect   (<b>Não aparece o módulo res_fax_spandsp</b>)<br>
          <br>
          <br>
          <b>Ao entrar no asterisk mostra o seguinte modulo abaixo
            instalado:</b><br>
          srv-asterisk2*CLI&gt; module show like <br>
          res_adsi.so            res_ael_share.so      
          res_agi.so             res_calendar.so       
          res_clialiases.so      res_convert.so        
          res_crypto.so          <b>res_fax.so</b>            
          res_limit.so           res_monitor.so        
          res_musiconhold.so     res_mutestream.so     
          res_phoneprov.so       res_realtime.so       
          res_rtp_asterisk.so    res_rtp_multicast.so  
          res_security_log.so    res_smdi.so           
          res_speech.so          res_stun_monitor.so   
          res_timing_dahdi.so    res_timing_pthread.so 
          res_timing_timerfd.so  res_clioriginate.so <br>
          <br>
          <font><b>A dúvida:<br>
            </b>Para receber os fax pelo asterisk posso utilizar esse
            modulo<b> &quot;</b></font><font><b><b>res_fax.so&quot;</b></b>,<b><b>
              </b></b>ou necessariamente precisa resolver a compilação
            do spandsp? <b><br>
            </b>O módulo<b> &quot;</b></font><font><b><b>res_fax_spandsp</b></b><b><b>&quot;
              </b></b>não está aparecendo depois de compilar!</font><br>
          <br>
          <br>
        </div>
        Alguém pode ajudar?<br>
        <div><br>
        </div>
        <div>Obrigado.<br>
          <br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">Em 7 de novembro de 2013 11:37, Mike
          Tesliuk <span dir="ltr">&lt;<a href="mailto:mike@tesliuk.com" target="_blank">mike@tesliuk.com</a>&gt;</span>
          escreveu:<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>Fale por email, eu moro nos estados unidos e estou em
                horario de trabalho, manda email que eu respondo.<br>
                <br>
                Em 07/11/13 06:03, Elieser Junior escreveu:<br>
              </div>
              <div>
                <div>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>
                        <div>Mike, bom dia.<br>
                          <br>
                          Se não for incomodo, tem como você enviar seu
                          contato pessoal (Celular ou fixo) para eu
                          esclarecer uma dúvida sobre o script?<br>
                          Sou muito novo com asterisk e não conheço
                          muito de <b>&quot;script em perl&quot;</b>.<br>
                          <br>
                        </div>
                        Muito obrigado mesmo.<br>
                        <br>
                      </div>
                      <br>
                    </div>
                    <div class="gmail_extra"><br>
                      <br>
                      <div class="gmail_quote">2013/11/7 jefaokpta <span dir="ltr">&lt;<a href="mailto:jefaokpta@hotmail.com" target="_blank">jefaokpta@hotmail.com</a>&gt;</span><br>
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Mike, vlw pelo script.<br>
                          <br>
                          Flws<br>
                          <br>
                          Em 06-11-2013 16:29, Mike Tesliuk escreveu:<br>
                          <div>
                            <div>&gt; #!/usr/bin/perl<br>
                              &gt;<br>
                              &gt;<br>
                              &gt; use MIME::Lite;;<br>
                              &gt; use Net::SMTP;<br>
                              &gt;<br>
                              &gt; @ARGV;<br>
                              &gt;<br>
                              &gt; my $faxfile = $ARGV[&#39;0&#39;];<br>
                              &gt; my $faxname = $ARGV[&#39;1&#39;];<br>
                              &gt; my $destination = $ARGV[&#39;2&#39;];<br>
                              &gt; my $faxname2 =
                              &quot;/var/spool/asterisk/fax/&quot; . $faxname;<br>
                              &gt;<br>
                              &gt; system(&quot;tiff2pdf -o $faxname2
                              $faxfile&quot;);<br>
                              &gt;<br>
                              &gt; my ($sec,$min,$hour,$mday,$mon,$year,<br>
                              &gt;           $wday,$yday,$isdst) =
                              localtime time;<br>
                              &gt;<br>
                              &gt; if(!$destination){<br>
                              &gt;     $destination = &quot;EU\@MEUDOMINIO&quot;;<br>
                              &gt; }<br>
                              &gt;<br>
                              &gt; $msg = MIME::Lite-&gt;new(<br>
                              &gt;     From =&gt;
                              &#39;pabx_COMPANIA@DOMINIO&#39;,<br>
                              &gt;     To =&gt; &#39;$destination&#39;,<br>
                              &gt;     Subject =&gt; &quot;Fax recebido em
                              $mday/&quot; . ($mon + 1) . &quot;/&quot; . ($year +<br>
                              &gt; 1900) . &quot; as $hour:$min:$sec &quot;,<br>
                              &gt;     Type =&gt; &#39;multipart/mixed&#39;<br>
                              &gt; );<br>
                              &gt;<br>
                              &gt; $msg-&gt;attach(<br>
                              &gt;     Type =&gt; &#39;TEXT&#39;,<br>
                              &gt;     Data =&gt; &quot;Ola!, \n\nVoce
                              recebeu um novo fax, o arquivo esta em<br>
                              &gt; anexo.\n\nAtt. Equipe de Tecnologia
                              COMPANIA\n&quot;<br>
                              &gt; );<br>
                              &gt;<br>
                              &gt; $msg-&gt;attach(<br>
                              &gt;     Type =&gt; &#39;application/x-pdf&#39;,<br>
                              &gt;     Path =&gt; &quot;$faxname2&quot;,<br>
                              &gt;     Filename =&gt; &quot;$faxname&quot;,<br>
                              &gt;     Disposition =&gt; &#39;attachment&#39;<br>
                              &gt; );<br>
                              &gt;<br>
                              &gt; $smtp = Net::SMTP-&gt;new(Host =&gt;
                              &quot;SERVIDOR_SMTP&quot;,<br>
                              &gt;     Debug =&gt; 1,<br>
                              &gt; );<br>
                              &gt; $smtp-&gt;auth(&quot;USUARIO\@DOMINIO&quot;,
                              &quot;SENHA&quot;);<br>
                              &gt; $smtp-&gt;mail(&quot;USUARIO\@DOMINIO&quot;);<br>
                              &gt; $smtp-&gt;to(&quot;$destination&quot;);<br>
                              &gt; $smtp-&gt;data();<br>
                              &gt; $smtp-&gt;datasend(
                              $msg-&gt;as_string );<br>
                              &gt; $smtp-&gt;dataend();<br>
                              &gt; $smtp-&gt;quit();<br>
                              <br>
                            </div>
                          </div>
                          <div>
                            <div>_______________________________________________<br>
                              KHOMP: completa linha de placas externas
                              FXO, FXS, GSM e E1;<br>
                              Media Gateways de 1 a 64 E1s para SIP com
                              R2, ISDN e SS7;<br>
                              Intercomunicadores para acesso remoto via
                              rede IP. Conheça em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.<br>
_______________________________________________<br>
                              ALIGERA – Fabricante nacional de Gateways
                              SIP-E1 para R2, ISDN e SS7.<br>
                              Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou
                              PCI Express.<br>
                              Channel Bank – Appliance Asterisk - Acesse
                              <a href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.<br>
_______________________________________________<br>
                              Para remover seu email desta lista, basta
                              enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><br>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div></div></div>
</blockquote></div><br></div>