{"id":8,"date":"2010-07-04T17:40:05","date_gmt":"2010-07-04T20:40:05","guid":{"rendered":"http:\/\/blog.digavoip.com.br\/2010\/07\/04\/fax-com-hylafax-e-iaxmodem\/"},"modified":"2011-11-11T14:36:54","modified_gmt":"2011-11-11T17:36:54","slug":"fax-com-hylafax-e-iaxmodem","status":"publish","type":"post","link":"https:\/\/blog.abratel.com.br\/?p=8","title":{"rendered":"Fax com Hylafax e IAXModem"},"content":{"rendered":"<p>repostorios usados:<br \/>\n deb http:\/\/ftp.br.debian.org\/debian sarge main contrib<br \/>\n        #<br \/>\n          ## Repositorio Debian Stable<br \/>\n deb ftp:\/\/ftp.debian.org\/debian stable main contrib non-free<\/p>\n<p> deb ftp:\/\/ftp.br.debian.org\/debian\/ stable main<br \/>\n deb-src ftp:\/\/ftp.br.debian.org\/debian\/ stable main<\/p>\n<p>1 &#8211; Installation IAXmodem<\/p>\n<p>a &#8211; Instalar as lib apt-get -y install g++ libtiff-tools libtiff4 libtiff4-dev<br \/>\nb &#8211; Baixar o iaxmodem (http:\/\/iaxmodem.sourceforge.net\/) e descompactar ele em uma pasta criada no \/etc\/ (mkdir iaxmodem)<br \/>\ncd \/etc<br \/>\nmkdir iaxmodem<br \/>\nwget http:\/\/downloads.sourceforge.net\/project\/iaxmodem\/iaxmodem\/iaxmodem-1.2.0\/iaxmodem-1.2.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fiaxmodem%2Ffiles%2Fiaxmodem%2F&#038;ts=1320744773&#038;use_mirror=ufpr<\/p>\n<p>mv iaxmodem-1.2.0.tar.gz\\?r\\=http\\:%2F%2Fsourceforge.net%2Fprojects%2Fiaxmodem%2Ffiles%2Fiaxmodem%2F \/etc\/iaxmodem-1.2.0.tar.gz<br \/>\ntar -xzvf iaxmodem-1.2.0.tar.gz<br \/>\ncd iaxmodem-1.2.0\/<\/p>\n<p>c &#8211; Entro em \/etc\/iaxmodem-&#8220;versao&#8221; e compilo est\u00e1tico pra n\u00e3o arriscar) incompatibilidade de lib:<br \/>\ncd lib\/libiax2;<br \/>\n.\/configure<br \/>\nmake<br \/>\ncd ..\/spandsp<br \/>\n.\/configure<br \/>\nmake<\/p>\n<p>d &#8211; Depois instalar o proprio IAXMODEM, na pasta:<br \/>\ncd \/etc\/iaxmodem-&#8220;versao&#8221;<br \/>\n.\/configure<br \/>\nmake<\/p>\n<p>e &#8211; Instalando o bin\u00e1rio e o initscript do iaxmodem:<br \/>\ncp iaxmodem \/usr\/bin\/<br \/>\nchmod +x \/usr\/bin\/iaxmodem<br \/>\ncp iaxmodem.init.debian \/etc\/init.d\/iaxmodem<br \/>\nchkdupexe &#8211;add iaxmodem<br \/>\nchmod +x \/etc\/init.d\/iaxmodem<br \/>\nDepois colocar ele para start no rc2.d (runlevel de acordo com seu SO).<br \/>\nln -s \/etc\/init.d\/iaxmodem \/etc\/rc2.d\/S50iaxmodem<\/p>\n<p>No debian 6 ou posterior lembrar que o procedimento de start \u00e9 diferente.<br \/>\nSegue:<br \/>\nAp\u00f3s o comando chmod +x \/etc\/init.d\/iaxmodem<br \/>\nEntrar no diret\u00f3rio cd \/etc\/init.d\/<br \/>\nEditar o iaxmodem colocando o cabe\u00e7alho abaixo:<br \/>\n#!\/bin\/sh<\/p>\n<p># Startup script for the iaxmodem monitor<br \/>\n#<br \/>\n# This starts the &#8220;iaxmodem&#8221; tool, which in turn starts<br \/>\n# all of the other iamodem server programs.<\/p>\n<p>### BEGIN INIT INFO<br \/>\n# Provides:          iaxmodem<br \/>\n# Required-Start:    $remote_fs $network<br \/>\n# Should-Start:      $all<br \/>\n# Required-Stop:     $remote_fs<br \/>\n# Default-Start:     2 3 4 5<br \/>\n# Default-Stop:      0 1 6<br \/>\n# Short-Description: iaxmodem<br \/>\n# Description:       iaxmodem<br \/>\n#                    (Also monitors the local host.)<br \/>\n### END INIT INFO<\/p>\n<p>Ap\u00f3s salvar envia-lo para runlevel (rc2.d)<br \/>\ninsserv iaxmodem<\/p>\n<p>veja se apareceu na runlevel ok:<br \/>\nls \/etc\/rc2.d\/<\/p>\n<p>2 &#8211; Instalar o HYLAFAX seguindo:<br \/>\na &#8211; Instalar as lib necessarias:<br \/>\napt-get -y install libtiff-tools libtiff4 libtiff4-dev gs<br \/>\nb &#8211; baixar e compilar no \/usr\/src (http:\/\/www.hylafax.org)<br \/>\nExemplo:<br \/>\nwget wget ftp:\/\/ftp.hylafax.org\/source\/hylafax-6.0.5.tar.gz<br \/>\ndebian:\/usr\/src# tar xfz hylafax-&#8220;versao&#8221;<br \/>\ndebian:\/usr\/src# cd hylafax-&#8220;versao&#8221;<br \/>\ndebian:\/usr\/src\/hylafax-4.3.1# .\/configure<\/p>\n<p>c &#8211; Na primeira pergunta:<br \/>\nAre these ok [yes]?<br \/>\nColocar o numero 13<br \/>\nApos colocar A4<br \/>\nNa segunda pergunta<br \/>\nAre these ok [yes]?<br \/>\nColocar o numero 14<br \/>\nApos colocar 196<br \/>\nNas demais colocar YES<\/p>\n<p>Executar:<br \/>\nmake<br \/>\nmake install (para termino da instala\u00e7\u00e3o)<\/p>\n<p>No debian 6 precisei fazer algumas altera\u00e7oes no \/etc\/init.d\/hylafax<br \/>\nRemover o rm \/etc\/rc2.d\/S97hylafax<br \/>\ninsserv -r hylafax<\/p>\n<p>Adicionar ao cabe\u00e7alho do arquivo \/etc\/init.d\/hylafax<br \/>\n#!\/bin\/sh<\/p>\n<p># Startup script for the hylafax monitor<br \/>\n#<br \/>\n# This starts the &#8220;hylafax&#8221; tool, which in turn starts<br \/>\n# all of the other hylafax server programs.<\/p>\n<p>### BEGIN INIT INFO<br \/>\n# Provides:          hylafax<br \/>\n# Required-Start:    $remote_fs $network<br \/>\n# Should-Start:      $all<br \/>\n# Required-Stop:     $remote_fs<br \/>\n# Default-Start:     2 3 4 5<br \/>\n# Default-Stop:      0 1 6<br \/>\n# Short-Description: hylafax<br \/>\n# Description:       hylafax<br \/>\n#                    (Also monitors the local host.)<br \/>\n### END INIT INFO<\/p>\n<p>Dar o comando:<br \/>\ninsserv hylafax<br \/>\nColocar para start depois do iaxmodem:<br \/>\nmv \/etc\/rc2.d\/S17hylafax \/etc\/rc2.d\/S20hylafax<\/p>\n<p>d &#8211; Copiar os exemplos de conf para os arquivos.<br \/>\nColocando as configur\u00f5es dos modems para o hylafax:<br \/>\nEm (cd \/etc\/iaxmodem\/iaxmodem-&#8220;vers\u00e3o&#8221;)<br \/>\ncp config.ttyIAX \/var\/spool\/hylafax\/etc\/config.ttyIAX<br \/>\ncp config.ttyIAX \/var\/spool\/hylafax\/etc\/config.ttyIAX2<br \/>\n(qntas tu desejar, eu fa\u00e7o 4 para meu fluxo)<\/p>\n<p>Veja o que cont\u00e9m dentro do arquivo:<br \/>\n# $Id: iaxmodem,v 1.1 2006\/04\/02 23:18:30 darren Exp $<\/p>\n<p>#<br \/>\n# prototype config for the IAXmodem softmodem which uses<br \/>\n# the spandsp soft-DSP library<br \/>\n#<br \/>\nCountryCode:            55<br \/>\nAreaCode:               32<br \/>\nFAXNumber:              &#8220;3237224004&#8221;<br \/>\nLongDistancePrefix:     1<br \/>\nInternationalPrefix:    011<br \/>\nDialStringRules:        etc\/dialrules<br \/>\nServerTracing:          1<br \/>\nSessionTracing:         11<br \/>\nRecvFileMode:           0644<br \/>\nLogFileMode:            0644<br \/>\nDeviceMode:             0644<br \/>\nRingsBeforeAnswer:      2<br \/>\nSpeakerVolume:          off<br \/>\nGettyArgs:              &#8220;-h %l dx_%s&#8221;<br \/>\nLocalIdentifier:        &#8220;NothingSetup&#8221;<br \/>\nTagLineFont:            etc\/lutRS18.pcf<br \/>\nTagLineFormat:          &#8220;From %%l|%c|Page %%P of %%T&#8221;<br \/>\nMaxRecvPages:           25<br \/>\n#<br \/>\n#<br \/>\n#<br \/>\n## AvantFAX configuration<br \/>\n#<br \/>\nFaxrcvdCmd:     bin\/faxrcvd.php<br \/>\nDynamicConfig:  bin\/dynconf.php<br \/>\nUseJobTSI:      true<\/p>\n<p># Modem-related stuff: should reflect modem command interface<br \/>\n# and hardware connection\/cabling (e.g. flow control).<br \/>\n#<br \/>\nModemType:              Class1          # use this to supply a hint<\/p>\n<p>#<br \/>\n# The modem is taken off-hook during initialization, and then<br \/>\n# placed back on-hook when done to prevent glare.<br \/>\n#<br \/>\nModemResetCmds:         &#8220;ATH1\\nAT+VCID=1&#8221;       # enables CallID display<br \/>\nModemReadyCmds:         ATH0<\/p>\n<p>Class1AdaptRecvCmd:     AT+FAR=1<br \/>\nClass1TMConnectDelay:   400             # counteract quick CONNECT response<br \/>\nClass1RMQueryCmd:       &#8220;!24,48,72,96&#8221;  # V.17 fast-train recv doesn&#8217;t work well<\/p>\n<p>CallIDPattern:          &#8220;NMBR=&#8221;<br \/>\nCallIDPattern:          &#8220;NAME=&#8221;<br \/>\nCallIDPattern:          &#8220;ANID=&#8221;<br \/>\nCallIDPattern:          &#8220;NDID=&#8221;<br \/>\n# Uncomment these if you really want them, but you probably don&#8217;t.<br \/>\n#CallIDPattern:          &#8220;DATE=&#8221;<br \/>\n#CallIDPattern:          &#8220;TIME=&#8221;<\/p>\n<p>Criando as configura\u00e7\u00f5es de autentica\u00e7\u00e3o no asterisk para o iaxmodem:<\/p>\n<p>cp iaxmodem-cfg.ttyIAX \/etc\/iaxmodem\/ttyIAX<br \/>\ncp iaxmodem-cfg.ttyIAX \/etc\/iaxmodem\/ttyIAX2<br \/>\netc (qntas desejar)<\/p>\n<p>Exemplo do arquivo:<br \/>\ndevice          \/dev\/ttyIAX1<br \/>\nowner           uucp:uucp<br \/>\nmode            660<br \/>\nport            4571<br \/>\nrefresh         3600<br \/>\nserver          127.0.0.1<br \/>\npeername        iaxfax1<br \/>\nsecret          123456<br \/>\ncidname         Fax1<br \/>\ncidnumber       (32)3722-4004<br \/>\ncodec           alaw<\/p>\n<p>Obs: Lembrar de sempre trocar o <em>device<\/em> e as contas iax <em>(peername e secret)<\/em><\/p>\n<p>e &#8211; Criar os peers no iax.conf do \/etc\/asterisk<br \/>\nvim \/etc\/asterisk\/iax.conf<br \/>\n[iaxfax1]<br \/>\nusername=iaxfax1<br \/>\ntype=friend<br \/>\nsecret=123456<br \/>\nqualify=no<br \/>\nnotransfer=yes<br \/>\nhost=dynamic<br \/>\ncontext=default<br \/>\ncallerid=&#8221;Fax&#8221; <0000><br \/>\ndisallow=all<br \/>\nallow=alaw<\/p>\n<p>[iaxfax2]<br \/>\nusername=iaxfax2<br \/>\ntype=friend<br \/>\nsecret=123456<br \/>\nqualify=no<br \/>\nnotransfer=yes<br \/>\nhost=dynamic<br \/>\ncontext=default<br \/>\ncallerid=&#8221;Fax2&#8243; <0000><br \/>\ndisallow=all<br \/>\nallow=alaw <\/p>\n<p>Salve e dar um reload na cli<br \/>\nasterisk -r<br \/>\niax2 reload<\/p>\n<p>f &#8211; Criando as configura\u00e7\u00f5es de autentica\u00e7\u00e3o no asterisk para o iaxmodem:<\/p>\n<p>Edite seus arquivos de conf.<\/p>\n<p>Exemplo (\/etc\/iaxmodem\/ttyIAX \/etc\/iaxmodem\/ttyIAX0 etc)<br \/>\nOBS: TROCAR OS CABE\u00c7ALHOS \/DEV\/xxxx<\/p>\n<p>device \/dev\/ttyIAX<br \/>\nowner uucp:uucp<br \/>\nmode 660<br \/>\nport 4570<br \/>\nrefresh 3600<br \/>\nserver 127.0.0.1<br \/>\npeername iaxfax1<br \/>\nsecret 123456<br \/>\ncodec alaw<\/p>\n<p>device \/dev\/ttyIAX0<br \/>\nowner uucp:uucp<br \/>\nmode 660<br \/>\nport 4571<br \/>\nrefresh 3600<br \/>\nserver 127.0.0.1<br \/>\npeername iaxfax2<br \/>\nsecret 123456<br \/>\ncodec alaw<\/p>\n<p>g &#8211; colocar as confs nos arquivos (\/var\/spool\/hylafax\/etc\/config.ttyIAX \/var\/spool\/hylafax\/etc\/config.ttyIAX0 etc) do tipo:<\/p>\n<p>CountryCode: 55<br \/>\nAreaCode: 33<br \/>\nFAXNumber: 12345678<br \/>\nLongDistancePrefix: 1<br \/>\nInternationalPrefix: 011<br \/>\nDialStringRules: etc\/dialrules<br \/>\nServerTracing: 0xFFF<br \/>\nSessionTracing: 0xFFF<br \/>\nRecvFileMode: 0600<br \/>\nLogFileMode: 0600<br \/>\nDeviceMode: 0600<br \/>\nRingsBeforeAnswer: 1<br \/>\nSpeakerVolume: off<br \/>\nGettyArgs: &#8220;-h %l dx_%s&#8221;<br \/>\nLocalIdentifier: &#8220;IAXmodem&#8221;<br \/>\nTagLineFont: etc\/lutRS18.pcf<br \/>\nTagLineFormat: &#8220;From %%l|%c|Page %%P of %%T&#8221;<br \/>\nMaxRecvPages: 200<br \/>\nModemType: Class1 # use this to supply a hint<br \/>\nClass1AdaptRecvCmd: AT+FAR=1<br \/>\nClass1TMConnectDelay: 400 # counteract quick CONNECT response<br \/>\nModemResetCmds: AT+VCID=1 # enables CallID display<br \/>\nRingsBeforeAnswer: 3<br \/>\nPagerTTYParity: none<br \/>\nCallIDPattern: &#8220;NMBR=&#8221;<br \/>\nCallIDPattern: &#8220;NAME=&#8221;<br \/>\nCallIDPattern: &#8220;ANID=&#8221;<br \/>\nCallIDPattern: &#8220;NDID=&#8221;<\/p>\n<p>chown uucp.uucp \/etc\/iaxmodem\/ttyIAX*<br \/>\nchmod 660 \/etc\/iaxmodem\/ttyIAX*<\/p>\n<p>h &#8211; Adiciona linhas no inittab para o faxgetty ficar monitorando os dois &#8220;modems&#8221;&#8230;<br \/>\nvim \/etc\/inittab<\/p>\n<p>#FAXGETTY FICAR MONITORANDO<br \/>\nfax1:2345:respawn:\/usr\/local\/sbin\/faxgetty ttyIAX<br \/>\nfax2:2345:respawn:\/usr\/local\/sbin\/faxgetty ttyIAX0<br \/>\nfax3:2345:respawn:\/usr\/local\/sbin\/faxgetty ttyIAX1<br \/>\nfax4:2345:respawn:\/usr\/local\/sbin\/faxgetty ttyIAX2<\/p>\n<p>i &#8211; Adiciona linhas no inittab para o iaxmodem conectar aos peers:<\/p>\n<p># IAXMODEM<br \/>\nIA00:23:respawn:\/usr\/bin\/iaxmodem ttyIAX<br \/>\nIA01:23:respawn:\/usr\/bin\/iaxmodem ttyIAX0<br \/>\nIA02:23:respawn:\/usr\/bin\/iaxmodem ttyIAX1<br \/>\nIA03:23:respawn:\/usr\/bin\/iaxmodem ttyIAX2<\/p>\n<p>Tivemos que criar antes um cache:<br \/>\nvim \/var\/spool\/hylafax\/etc\/setup.cache<br \/>\nPara ap\u00f3s restartar o hylafax -> \/etc\/init.d\/hylafax stop apos etc\/init.d\/hylafax start<br \/>\nreload do inittab -> init q<br \/>\nrestartar o servidor por via de duvidas&#8230;<br \/>\nCaso queira ver o processo de recebimento de fax digite:<\/p>\n<p>watch cat \/var\/spool\/hylafax\/status\/ttyIAX<\/p>\n<p>j &#8211; Se possuir digium, alterar o zapata para fazer a dete\u00e7\u00e3o de fax entrante:<br \/>\nfaxdetect=incoming<br \/>\nE se possuir digivoice:<br \/>\nfaxdetection=1<\/p>\n<p>Dar o comando faxsetup caso necess\u00e1rio configurar os ttys novamente.<\/p>\n<p>Precisei fazer um link ln -s \/etc\/iaxmodem-1.2.0 \/etc\/iaxmodem<br \/>\nPrecisei criar um arquivo de<br \/>\nmkdir \/var\/log\/iaxmodem<br \/>\ntouch \/var\/log\/iaxmodem\/iaxmodem<\/p>\n<p>l &#8211; Comando para verificar se os iaxmodem est\u00e3o conectados com sucesso:<\/p>\n<p>\/usr\/bin\/iaxmodem ttyIAX<br \/>\n\/usr\/bin\/iaxmodem ttyIAX0<br \/>\netc<br \/>\nTem que aparecer algo do tipo:<br \/>\ndebian:\/home\/ulisses# \/usr\/bin\/iaxmodem ttyIAX<br \/>\n[2008-03-25 00:46:42] Modem started<br \/>\n[2008-03-25 00:46:42] Setting device = &#8216;\/dev\/ttyIAX&#8217;<br \/>\n[2008-03-25 00:46:42] Setting owner = &#8216;uucp:uucp&#8217;<br \/>\n[2008-03-25 00:46:42] Setting mode = &#8216;660&#8217;<br \/>\n[2008-03-25 00:46:42] Setting port = 4576<br \/>\n[2008-03-25 00:46:42] Setting refresh = 3600<br \/>\n[2008-03-25 00:46:42] Setting server = &#8216;127.0.0.1&#8217;<br \/>\n[2008-03-25 00:46:42] Setting peername = &#8216;iaxfax&#8217;<br \/>\n[2008-03-25 00:46:42] Setting secret = &#8216;123456&#8217;<br \/>\n[2008-03-25 00:46:42] Setting codec = alaw<br \/>\n[2008-03-25 00:46:42] Opened pty, slave device: \/dev\/pts\/13<br \/>\n[2008-03-25 00:46:42] Created \/dev\/ttyIAX symbolic link<br \/>\n[2008-03-25 00:46:42] Registration completed successfully.<\/p>\n<p>Iniciando os servi\u00e7os:<br \/>\nIAXModem:<br \/>\n\/etc\/init.d\/iaxmodem start<br \/>\nHylaFAX:<br \/>\nDigite faxstat para checar se todos os servi\u00e7os est\u00e3o rodando corretamente:<br \/>\nasteriks:~# faxstat<br \/>\nHylaFAX scheduler on asteriks: Running<br \/>\nModem ttyIAX (+47 33676271): Running and idle<\/p>\n<p>m &#8211; Fazer as regras no extensions.conf do asterisk:<br \/>\nExemplo:<br \/>\nexten => 900,1,Dial(IAX2\/iaxfax1\/${EXTEN},5,r)<br \/>\nexten => 900,n,Dial(IAX2\/iaxfax2\/${EXTEN},5,r)<br \/>\nexten => 900,n,Dial(IAX2\/iaxfax3\/${EXTEN},5,r)<br \/>\nexten => 900,n,Busy()<br \/>\nexten => 900,n,Hangup()<\/p>\n<p>n &#8211; Para enviar fax por email ou imprimir:<br \/>\nCriar o conf \/var\/spool\/hylafax\/etc\/FaxDispatch e jogar dentro dele ..<\/p>\n<p>SENDTO=root@midominio.com;<br \/>\nFILETYPE=pdf;<br \/>\ncase &#8220;$DEVICE&#8221; in<br \/>\nttyIAX) SENDTO=destino1@midominio.com;;<br \/>\nttyIAX1) SENDTO=destino1@midominio.com;;<br \/>\nttyIAX2) SENDTO=destino2@midominio.com;\/usr\/bin\/tiff2ps -a $FILE | lpr -P Laboral;;esac<\/p>\n<p>o &#8211; Para enviar fax eh necess\u00e1rio configurar uma sa\u00edda:<br \/>\n(ou como muitos for\u00e7ando o codec)<br \/>\n[from-hylafax]<br \/>\nexten => _X.,1,Set(__SIP_CODEC=alaw)<br \/>\nexten => _X.,2,Goto(from-internal,${EXTEN},1)<\/p>\n<p>p &#8211; instalar nas esta\u00e7\u00f5es o programa para envio siga o tutorial abaixo:<br \/>\nTexto abaixo retirado de http:\/\/winprinthylafax.sourceforge.net\/ ou http:\/\/wpkg.org\/email2fax<\/p>\n<p>========================================================================================================================================================<br \/>\n<strong> PARA INSTALAR O AVANT FAX lembrar de seguir  as instala\u00e7\u00f5es:<\/strong><\/p>\n<p>apt-get install apache2-mpm-prefork apache2-utils apache2.2-common<br \/>\n# apt-get install libapache2-mod-php5 libapr1 libaprutil1 libpq4 libsqlite3-0 php5-cli php5-common<br \/>\n# apt-get install mysql-server imagemagick libtiff4-dev netpbm libnetpbm10-dev libungif-bin<br \/>\n# apt-get install libungif4-dev sudo postfix php-mail php-mail-mime php-file php-db php5-mysql<br \/>\n# apt-get install psutils wdiff<\/p>\n<p> cd \/usr\/src<br \/>\n# wget http:\/\/easynews.dl.sourceforge.net\/sourceforge\/avantfax\/avantfax-2.3.0.tgz <\/p>\n<p># tar zvxf avantfax-2.3.0.tgz<br \/>\n# cd avantfax-2.3.0 <\/p>\n<p>Mova o AvantFax para o acesso web e d\u00ea permiss\u00e3o: <\/p>\n<p># mv \/usr\/src\/avantfax-2.3.0\/avantfax \/var\/www\/<br \/>\n# chmod -R 777 \/var\/www\/avantfax\/tmp \/var\/www\/avantfax\/faxes <\/p>\n<p>Renomeie o arquivo original faxrcvd e siga os passos: <\/p>\n<p># cd \/var\/spool\/hylafax\/bin<br \/>\n# mv faxrcvd faxrcvd.old<br \/>\n# mv notify notify.old<br \/>\n# ln -s \/var\/www\/avantfax\/includes\/faxrcvd.php \/var\/spool\/hylafax\/bin\/faxrcvd<br \/>\n# ln -s \/var\/www\/avantfax\/includes\/notify.php \/var\/spool\/hylafax\/bin\/notify<br \/>\n# mv \/usr\/bin\/faxcover \/usr\/bin\/faxcover.old<br \/>\n# ln -s \/var\/www\/avantfax\/includes\/faxcover.php \/usr\/bin\/faxcover <\/p>\n<p>Edite create_tables.sql para usar as tabelas no AvantFax:<br \/>\n# vi create_tables.sql <\/p>\n<p>Adicione USE avantfax; no topo do arquivo editado acima. <\/p>\n<p>mysql -p < create_user.sql\nmysql -p < create_tables.sql\n\nPermiss\u00f5es de arquivos:\ndrwxrwxrwx 11 www-data www-data   4096 Abr 27 02:57 avantfax\n\nVerificar se tem esses binarios FUNDAMENTAIS ao funcionamento:\n-rwxr-xr-x  1 root   root      10309 Out 26  2008 edit-faxcover\n-rwxr-xr-x  1 root   root      11968 Ago  2  2010 fax2ps\n-rwxr-xr-x  1 root   root      11256 Ago  2  2010 fax2tiff\n-rwxr-xr-x  1 root   root      15032 Out 26  2008 faxalter\nlrwxrwxrwx  1 root   root         39 Dez 27  2010 faxcover -> \/var\/www\/avantfax\/includes\/faxcover.php<br \/>\n-rwxr-xr-x  1 root   root      20804 Out 26  2008 faxcover.old<br \/>\n-rwxr-xr-x  1 root   root      58480 Out 26  2008 faxmail<br \/>\n-rwxr-xr-x  1 root   root       9428 Out 26  2008 faxrm<br \/>\n-rwxr-xr-x  1 root   root      12368 Out 26  2008 faxstat<br \/>\n-rwxr-xr-x  1 root   root      21352 Out 26  2008 sendfax<\/p>\n<p>Adicionar em cada \/var\/spool\/hylafax\/etc\/config.tty<br \/>\n#<br \/>\n## AvantFAX configuration<br \/>\n#<br \/>\nFaxrcvdCmd:     bin\/faxrcvd.php<br \/>\nDynamicConfig:  bin\/dynconf.php<br \/>\nUseJobTSI:      true<\/p>\n<p># Adicionar em visudo<br \/>\n(tudo na mesma linha)<br \/>\napache ALL = NOPASSWD: \/sbin\/reboot, \/sbin\/halt,<br \/>\n\/usr\/sbin\/faxdeluser, \/usr\/sbin\/faxadduser -u * -p * *<\/p>\n<p># Em crontab -e  adiocinar<\/p>\n<p>Se der o comando faxstat e pedir senha entao basta remover<br \/>\nusuario pois foi criado usuario e agora solicita senha<\/p>\n<p>faxdeluser nome_do_usuaio<br \/>\nfaxdeluser admin<br \/>\nfaxdeluser <\/p>\n<p># runs once an hour to update the phone book<br \/>\n0 * * * * \/var\/www\/avantfax\/includes\/phb.php<br \/>\n# runs once a day to remove old files<br \/>\n0 0 * * * \/var\/www\/avantfax\/includes\/remold.php <\/p>\n<p>Mude suas configura\u00e7\u00f5es do Apache: <\/p>\n<p># vi \/etc\/apache2\/sites-enabled\/000-default <\/p>\n<p>============================================================================<\/p>\n<p>Para enviar por email instalar primeiro o postfix, sendmail e somente depois o exim4 pois aparentemente o avantfax depende de algum plugin que n\u00e3o consta no exim4 mas se instalar os outros dois primeiramente e apos ocorrer a remocao parcial dele o funcionamento fica perfeito.<\/p>\n<p>============================================================================<\/p>\n<p>Reinicie o Apache: <\/p>\n<p># \/etc\/init.d\/apache2 restart <\/p>\n<p>Outro tutorial para avant no proprio site: http:\/\/www.avantfax.com\/install.php<br \/>\n=================================<\/p>\n<p>Installation Instructions<br \/>\nWinprint HylaFAX is a Windows print monitor designed to send its output directly to a HylaFAX Server. Once installed, you can print to a HylaFAX Server from any application, and it will pop up a simple dialog box, allowing you to enter the destination FAX number. It&#8217;s not intended to be fancy or all encompassing, just a quick and easy way to send FAXes from any Windows application<\/p>\n<p>It can be downloaded here. To go to the sourceforge pages for this software to comment, report bugs, or get source code, click here. <\/p>\n<p>It is packaged in the form of a Windows Installer, which installs the required sets of .DLL files and registers the monitor with the system. This adds support for a new type of port to your system, called a &#8220;WinPrint HylaFAX Port.&#8221; Once you&#8217;ve successfully installed the files, setup is straightforward, but it has a number of steps. First, you&#8217;ll want to create an appropriate PostScript printer using the &#8220;Add Printer&#8221; button. You want to select a &#8220;Local printer,&#8221; but since it&#8217;s not a physical printer, uncheck the &#8220;Automatically detect and install my Plug and Play printer&#8221; box. <\/p>\n<p>Next, you&#8217;ll be asked what port to use. Select the radio button &#8220;create a new port type.&#8221; If the installation went well, you should see &#8220;Winprint Hylafax&#8221; as one of the options. The drop list might scroll, so it may not be obvious that it&#8217;s at the bottom of the list. (If it doesn&#8217;t appear on the list at all, something went wrong with your installation.) <\/p>\n<p>Next, a box will pop up for you to name the port. The name doesn&#8217;t actually matter, but naming it HFAX1: will help to identify it.<\/p>\n<p>Next, select the printer type. Experience has shown that the Apple LaserWriter 12\/640 PS is a good choice, and I recommend it. Most any other PostScript printer will probably work.<\/p>\n<p>Of course, name it whatever you want, preferably something that says, &#8220;hey, this is going to a FAX machine.&#8221;<\/p>\n<p>Do not share the printer. This is rather silly anyway, since you can locally install Winprint HylaFAX on any system that needs it, and it communicates directly with the HylaFAX server. Since it pops up the dialog box asking where to send the FAX job locally, this would be ugly, at best. Also, don&#8217;t print a test page, since you&#8217;re not done configuring the printer yet.<\/p>\n<p>Right-click on the printer to call up its properties, and select the &#8220;Ports&#8221; tab. Locate the port you just created.<\/p>\n<p>Press the &#8220;Configure Port&#8221; button to configure the connection to your HylaFAX server. <\/p>\n<p>Most people who have problems are going to have problems because their HylaFAX server won&#8217;t let them connect. Break out your HylaFAX server documentation, and make sure that you have set up the correct permissions, which can be as simple as putting the IP address of your client into \/var\/spool\/fax\/etc\/hosts.hfaxd. You may not need the username -or- password, in which case, you can leave password blank, but the username is always required, even if it isn&#8217;t authenticated.<\/p>\n<p>Okay, now you&#8217;re ready to print a test job. When you send anything to this printer, a dialog box will appear:<\/p>\n<p>The FAX number is completely unedited and unverified. It relies on HylaFAX&#8217;s dialing rules to make sense of it. As you would expect, the HylaFAX server will send an e-mail confirming delivery (or failure to do so) to the specified e-mail address. <\/p>\n<p>Referencias gerais:<\/p>\n<p>http:\/\/www.mail-archive.com\/asteriskbrasil@listas.asteriskbrasil.org\/msg02953.html<br \/>\nhttp:\/\/www.voip-info.org\/wiki\/view\/Asterisk+IAXmodem<br \/>\nhttp:\/\/www.das-asterisk-buch.de\/stable\/installation-iaxmodem.html<br \/>\nhttp:\/\/www.das-asterisk-buch.de\/stable\/installation-hylafax.html<br \/>\nhttp:\/\/www.voip-info.org\/wiki\/view\/Asterisk+IAXmodem<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"8Y8hG3S2XF\"><p><a href=\"https:\/\/www.hylafax.org\/\">Home<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Home&#8221; &#8212; Open Source Fax Software\" src=\"https:\/\/www.hylafax.org\/embed\/#?secret=8Y8hG3S2XF\" data-secret=\"8Y8hG3S2XF\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><br \/>\nhttp:\/\/iaxmodem.sf.net<br \/>\nhttp:\/\/blog.julianmenendez.es\/asterisk-hylafax-iaxmodem<br \/>\nhttp:\/\/winprinthylafax.sourceforge.net\/<br \/>\nhttp:\/\/blog.evaristesys.com\/?p=24<\/p>\n","protected":false},"excerpt":{"rendered":"<p>repostorios usados: deb http:\/\/ftp.br.debian.org\/debian sarge main contrib # ## Repositorio Debian Stable deb ftp:\/\/ftp.debian.org\/debian stable main contrib non-free deb ftp:\/\/ftp.br.debian.org\/debian\/ stable main deb-src ftp:\/\/ftp.br.debian.org\/debian\/ stable main 1 &#8211; Installation IAXmodem a &#8211; Instalar as lib apt-get -y install g++ libtiff-tools libtiff4 libtiff4-dev b &#8211; Baixar&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts\/8"}],"collection":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8"}],"version-history":[{"count":0,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts\/8\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}