morpheus51
12/05/2011, 13h18
Bonjour,
J'ai defini un context pour gerer un fax.Dans le CLI asterisk il semble bien pris en compte pour autant aucun fichier n'est generé ni envoyer ,je ne comprend pas pourquoi :
mon contexte:
[moncontexte]
; -----------------
;Gestion des fax
; -----------------
exten => XXXX,1,Set(EMAILADDR=email1@mondomaine)
exten => XXXX,2,Goto(appext-fax,in_fax,1)
[appext-fax]
exten => s,1,Answer
exten => s,2,Goto(in_fax,1)
exten => in_fax,1,StopPlayTones
exten => in_fax,2,Macro(faxreceive)
exten => in_fax,3,Hangup
exten => analog_fax,1,GotoIf($["${FAX_RX}" = "disabled"]?4:2)
exten => analog_fax,2,Set(DIAL=${DB(DEVICE/${FAX_RX}/dial)})
exten => analog_fax,3,Dial(${DIAL},20,d)
exten => analog_fax,4,Hangup
exten => out_fax,1,txfax(${TXFAX_NAME},caller)
exten => out_fax,2,Hangup
exten => h,1,system(tiff2pdf -p a4 -o ${FAXFILE}.pdf ${FAXFILE})
exten => h,2,system(mime-construct --to email1@mondomaine --subject "Reception Fax de ${CALLERID(number)} ${CALLERID(name)}" --attachment ${FAXFILE}.pdf --type application/pdf --file ${FAXFILE}.pdf)
exten => h,3,Hangup()
[macro-faxreceive]
exten => s,1,Set(FAXFILE=${ASTSPOOLDIR}/fax/${UNIQUEID}.tif)
exten => s,2,Set(EMAILADDR=${FAX_RX_EMAIL})
exten => s,3,rxfax(${FAXFILE})
exten => s,103,Set(EMAILADDR=${FAX_RX_EMAIL})
exten => s,104,Goto(3)
Bien entendu j'ai installé la librairie tifftools pour la conversion du tiff en pdf et j'ai compiler asterisk en activant le module spandsp.
Maintenant voici une copie de la CLI asterisk :
Executing [XXXX@moncontexte:1] Set("SIP/YYYY-0000000f", "EMAILADDR=email1@mondomaine") in new stack
-- Executing [XXXX@moncontexte:2] Goto("SIP/YYYY-0000000f", "appext-fax,in_fax,1") in new stack
-- Goto (appext-fax,in_fax,1)
-- Executing [in_fax@appext-fax:1] StopPlayTones("SIP/YYYY-0000000f", "") in new stack
-- Executing [in_fax@appext-fax:2] Macro("SIP/YYYY-0000000f", "faxreceive") in new stack
-- Executing [s@macro-faxreceive:1] Set("SIP/YYYY-0000000f", "FAXFILE=/var/spool/asterisk/fax/1305198351.15.tif") in new stack
-- Executing [s@macro-faxreceive:2] Set("SIP/YYYY-0000000f", "EMAILADDR=noreply@mydomain.tld") in new stack
== Spawn extension (macro-faxreceive, s, 3) exited non-zero on 'SIP/YYYY-0000000f' in macro 'faxreceive'
== Spawn extension (appext-fax, in_fax, 2) exited non-zero on 'SIP/YYYY-0000000f'
-- Executing [h@appext-fax:1] System("SIP/YYYY-0000000f", "tiff2pdf -p a4 -o /var/spool/asterisk/fax/1305198351.15.tif.pdf /var/spool/asterisk/fax/1305198351.15.tif") in new stack
-- Executing [h@appext-fax:2] System("SIP/YYYY-0000000f", "mime-construct --to email1@mondomaine --subject "Reception Fax de 170557526 " --attachment /var/spool/asterisk/fax/1305198351.15.tif.pdf --type application/pdf --file /var/spool/asterisk/fax/1305198351.15.tif.pdf") in new stack
== Spawn extension (appext-fax, h, 2) exited non-zero on 'SIP/YYYY-0000000f'
Voila donc si quelqu'un a une idée sur la non generation de mes fichiers je suis preneurs.Merci
J'ai defini un context pour gerer un fax.Dans le CLI asterisk il semble bien pris en compte pour autant aucun fichier n'est generé ni envoyer ,je ne comprend pas pourquoi :
mon contexte:
[moncontexte]
; -----------------
;Gestion des fax
; -----------------
exten => XXXX,1,Set(EMAILADDR=email1@mondomaine)
exten => XXXX,2,Goto(appext-fax,in_fax,1)
[appext-fax]
exten => s,1,Answer
exten => s,2,Goto(in_fax,1)
exten => in_fax,1,StopPlayTones
exten => in_fax,2,Macro(faxreceive)
exten => in_fax,3,Hangup
exten => analog_fax,1,GotoIf($["${FAX_RX}" = "disabled"]?4:2)
exten => analog_fax,2,Set(DIAL=${DB(DEVICE/${FAX_RX}/dial)})
exten => analog_fax,3,Dial(${DIAL},20,d)
exten => analog_fax,4,Hangup
exten => out_fax,1,txfax(${TXFAX_NAME},caller)
exten => out_fax,2,Hangup
exten => h,1,system(tiff2pdf -p a4 -o ${FAXFILE}.pdf ${FAXFILE})
exten => h,2,system(mime-construct --to email1@mondomaine --subject "Reception Fax de ${CALLERID(number)} ${CALLERID(name)}" --attachment ${FAXFILE}.pdf --type application/pdf --file ${FAXFILE}.pdf)
exten => h,3,Hangup()
[macro-faxreceive]
exten => s,1,Set(FAXFILE=${ASTSPOOLDIR}/fax/${UNIQUEID}.tif)
exten => s,2,Set(EMAILADDR=${FAX_RX_EMAIL})
exten => s,3,rxfax(${FAXFILE})
exten => s,103,Set(EMAILADDR=${FAX_RX_EMAIL})
exten => s,104,Goto(3)
Bien entendu j'ai installé la librairie tifftools pour la conversion du tiff en pdf et j'ai compiler asterisk en activant le module spandsp.
Maintenant voici une copie de la CLI asterisk :
Executing [XXXX@moncontexte:1] Set("SIP/YYYY-0000000f", "EMAILADDR=email1@mondomaine") in new stack
-- Executing [XXXX@moncontexte:2] Goto("SIP/YYYY-0000000f", "appext-fax,in_fax,1") in new stack
-- Goto (appext-fax,in_fax,1)
-- Executing [in_fax@appext-fax:1] StopPlayTones("SIP/YYYY-0000000f", "") in new stack
-- Executing [in_fax@appext-fax:2] Macro("SIP/YYYY-0000000f", "faxreceive") in new stack
-- Executing [s@macro-faxreceive:1] Set("SIP/YYYY-0000000f", "FAXFILE=/var/spool/asterisk/fax/1305198351.15.tif") in new stack
-- Executing [s@macro-faxreceive:2] Set("SIP/YYYY-0000000f", "EMAILADDR=noreply@mydomain.tld") in new stack
== Spawn extension (macro-faxreceive, s, 3) exited non-zero on 'SIP/YYYY-0000000f' in macro 'faxreceive'
== Spawn extension (appext-fax, in_fax, 2) exited non-zero on 'SIP/YYYY-0000000f'
-- Executing [h@appext-fax:1] System("SIP/YYYY-0000000f", "tiff2pdf -p a4 -o /var/spool/asterisk/fax/1305198351.15.tif.pdf /var/spool/asterisk/fax/1305198351.15.tif") in new stack
-- Executing [h@appext-fax:2] System("SIP/YYYY-0000000f", "mime-construct --to email1@mondomaine --subject "Reception Fax de 170557526 " --attachment /var/spool/asterisk/fax/1305198351.15.tif.pdf --type application/pdf --file /var/spool/asterisk/fax/1305198351.15.tif.pdf") in new stack
== Spawn extension (appext-fax, h, 2) exited non-zero on 'SIP/YYYY-0000000f'
Voila donc si quelqu'un a une idée sur la non generation de mes fichiers je suis preneurs.Merci