RES: [AsteriskBrasil] Recebimento de FAX, aplicação RxFax
Luiz Henrique Gomes
lhgomes em treynet.com.br
Quinta Maio 10 11:14:33 BRT 2007
Eduardo, vc fez alguma atualização no servidor ?
Luiz
-----Mensagem original-----
De: asteriskbrasil-bounces em listas.asteriskbrasil.org
[mailto:asteriskbrasil-bounces em listas.asteriskbrasil.org] Em nome de Eduardo
Pereira
Enviada em: Thursday, May 10, 2007 3:36 AM
Para: Asterisk Brasil
Cc: Eduardo Pereira
Assunto: [AsteriskBrasil] Recebimento de FAX, aplicação RxFax
Pessoal,
quem ja trabalhou com fax, peço ajuda!
tenho um asterisk 1.2, na verdade é a A em H. Estava funcionando o recebimento
de fax, mas parou e não encontro o problema.
a coisa esta tão preta que o asterisk até me desconecta do CLI quando cai na
aplicação RxFax()
Vejam:
[root em asterisk1 asterisk]# asterisk -r
Asterisk 1.2.5, Copyright (C) 1999 - 2006 Digium, Inc. and others.
Created by Mark Spencer <markster em digium.com> Asterisk comes with ABSOLUTELY
NO WARRANTY; type 'show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it
under certain conditions. Type 'show license' for details.
=========================================================================
Connected to Asterisk 1.2.5 currently running on asterisk1 (pid = 2771)
Verbosity is at least 3
-- Accepting call from '6232413448' to '9172' on channel 0/6, span 1
-- Executing SetVar("Zap/6-1", "FROM_DID=9172") in new stack
-- Executing SetVar("Zap/6-1", "FAX_RX=system") in new stack
-- Executing SetVar("Zap/6-1", "FAX_RX_EMAIL=xxxxxx em xxxxxxx.com.br")
in new stack
-- Executing Answer("Zap/6-1", "") in new stack
-- Executing Wait("Zap/6-1", "") in new stack
-- Executing Goto("Zap/6-1", "from-pstn|s|1") in new stack
-- Goto (from-pstn,s,1)
-- Executing GotoIfTime("Zap/6-1","
11:00-23:59|*|*|*?from-pstn-reghours|s|1:") in new stack
-- Goto (from-pstn-reghours,s,1)
-- Executing GotoIf("Zap/6-1", "0?from-pstn-reghours-nofax|s|1:2") in new
stack
-- Goto (from-pstn-reghours,s,2)
-- Executing Answer("Zap/6-1", "") in new stack
-- Executing Wait("Zap/6-1", "1") in new stack
-- Executing SetVar("Zap/6-1", "intype=") in new stack
-- Executing Cut("Zap/6-1", "intype=intype|-|1") in new stack
-- Executing GotoIf("Zap/6-1", "0?7:9") in new stack
-- Goto (from-pstn-reghours,s,9)
-- Executing GotoIf("Zap/6-1", "0?10:12") in new stack
-- Goto (from-pstn-reghours,s,12)
-- Executing GotoIf("Zap/6-1", "0?13:15") in new stack
-- Goto (from-pstn-reghours,s,15)
-- Executing Goto("Zap/6-1", "|s|1") in new stack
-- Goto (from-pstn-reghours,s,1)
-- Executing GotoIf("Zap/6-1", "0?from-pstn-reghours-nofax|s|1:2") in new
stack
-- Goto (from-pstn-reghours,s,2)
-- Executing Answer("Zap/6-1", "") in new stack
-- Executing Wait("Zap/6-1", "1") in new stack
-- Redirecting Zap/6-1 to fax extension ======> aqui, depois de
testar algumas coisas e descobrir que é fax ele redireciona para o fax ==
Spawn extension (from-pstn-reghours, fax, 0) exited non-zero on 'Zap/6-1'
-- Executing Goto("Zap/6-1", "ext-fax|in_fax|1") in new stack
-- Goto (ext-fax,in_fax,1)
-- Executing GotoIf("Zap/6-1", "1?2:analog_fax|1") in new stack
-- Goto (ext-fax,in_fax,2)
-- Executing Macro("Zap/6-1", "faxreceive") in new stack
-- Executing SetVar("Zap/6-1",
"FAXFILE=/var/spool/asterisk/fax/1178775358.0.tif") in new stack
-- Executing SetVar("Zap/6-1", "EMAILADDR=xxxxxxxx em xxxxxxxx.com.br")
in new stack
-- Executing RxFAX("Zap/6-1",
"/var/spool/asterisk/fax/1178775358.0.tif") in new stack asterisk1*CLI>
Disconnected from Asterisk server
[root em asterisk1 asterisk]#
no extensions.conf temos
[ext-fax]
exten => s,1,Answer
exten => s,2,Goto(in_fax,1)
exten => in_fax,1,GotoIf($[${FAX_RX} = system]?2:analog_fax,1) exten =>
in_fax,2,Macro(faxreceive) ;exten => in_fax,3,system(tiff2ps -2eaz -w 8.5 -h
11 ${FAXFILE} | ps2pdf
- ${FAXFILE}.pdf)
exten => in_fax,3,system(mime-construct --to ${EMAILADDR} --subject "Fax
from ${CALLERIDNUM} ${CALLERIDNAME}" --attachment ${FAXFILE} --type
application/tiff --file ${FAXFILE}) ;exten => in_fax,5,system(rm ${FAXFILE}
${FAXFILE}.pdf) exten => in_fax,4,Hangup exten =>
analog_fax,1,GotoIf($[${FAX_RX} = disabled]?3:2) ;if fax is disabled, just
hang up exten => analog_fax,2,DBGet(DIAL=DEVICE/${FAX_RX}/dial);
exten => analog_fax,3,Dial(${DIAL},20,d) exten => analog_fax,4,Hangup ;exten
=> out_fax,1,wait(7) exten => out_fax,1,txfax(${TXFAX_NAME}|caller)
exten => out_fax,2,Hangup
exten => h,1,Hangup()
[macro-faxreceive]
exten => s,1,SetVar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif)
exten => s,2,SetVar(EMAILADDR=${FAX_RX_EMAIL})
exten => s,3,rxfax(${FAXFILE})
exten => s,103,SetVar(EMAILADDR=${FAX_RX_EMAIL})
exten => s,104,Goto(3)
Ajudas?
----------------------------------------
Estação VoIP 2006
5 e 6 Dezembro
Curitiba PR
http://www.estacaovoip.com.br
_______________________________________________
LIsta de discussões AsteriskBrasil.org
AsteriskBrasil em listas.asteriskbrasil.org
http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil
_______________________________________________
Acesse o wiki AsteriskBrasil.org:
http://www.asteriskbrasil.org
Mais detalhes sobre a lista de discussão AsteriskBrasil