[asterisk-users] fax problem

F6HQZ f6hqz-m at hamwlan.net
Wed Dec 23 15:46:14 CST 2009


Oops !
The sendmail macro was missing, sorry !

[macro-Sendmail]
;=======================================================
;       ARG1 = Address To
;       ARG2 = Address From
;       ARG3 = File attachment
;       ARG4 = Pages Qty
;       ARG5 = Rate
;       ARG6 = HeaderInfo
;       ARG7 = RemoteID
;       ARG8 = Resolution
;=======================================================
exten => s,1,NoOp( **** SENDMAIL ****)
exten => s,n,NoOp(To:${ARG1} From:${ARG2} Subject:Fax de ${ARG6} Attach:${ARG3} Pg:${ARG4} Rate:${ARG5} HeaderInfo:${ARG6}
RemoteID:${ARG7} Res:${ARG8})
exten => s,n,System(echo "Entete FAX : ${ARG6} - ${ARG4} pages -  Rate:${ARG5} - CID:${ARG7}, Resolution : ${ARG8}"|/bin/mailx -s
"FAX de : ${ARG6} - CID : ${ARG7}" -a ${ARG3} -r ${ARG2} ${ARG1})
exten => s,n,NoOp( **** SENT ****)
exten => s,n,System(rm ${ARG3})


-----Message d'origine-----
De : F6HQZ [mailto:f6hqz-m at hamwlan.net]
Envoyé : mercredi 23 décembre 2009 22:44
À : Asterisk Users Mailing List - Non-Commercial Discussion
Objet : RE: [asterisk-users] fax problem


Hi Francois,
here is Francois too  ;-)

Check that :

[fax-outbound-calls]
exten => _X.,1,Dial(${ACROPOLIS}/${EXTEN},,G(fax-tx^send^1))

[fax-tx]
exten => send,1,NoOp(**** SENDING FAX ****)
exten => send,n,Set(FaxTxDir=/var/spool/fax/tx/)
exten => send,n,Set(FAXFILEPDF=fax-${FAXCOUNT}-tx.pdf)
exten => send,n,Wait(6)
exten => send,n,Set(GLOBAL(FAXCOUNT)=$[ ${GLOBAL(FAXCOUNT)} + 1 ])
exten => send,n,Set(FAXCOUNT=${GLOBAL(FAXCOUNT)})
exten => send,n,Set(FAXFILE=test.tif)
; Set FAXOPTs
exten => send,n,NoOp(**** SETTING FAXOPT ****)
exten => send,n,Set(FAXOPT(filename)=${FAXFILE})
exten => send,n,Set(FAXOPT(ecm)=yes)
exten => send,n,Set(FAXOPT(headerinfo)=Fax from ${GLOBAL(LASTFAXCALLERNAME)} at ${GLOBAL(LASTFAXCALLERNUM)} was received.)
exten => send,n,Set(FAXOPT(localstationid)=0170619058)
exten => send,n,Set(FAXOPT(maxrate)=14400)
exten => send,n,Set(FAXOPT(minrate)=2400)
; Send the fax
exten => send,n,NoOp(**** SENDING FAX ****)
exten => send,n,SendFAX(${FaxTxDir}${FAXFILE}|d)
; Hangup! Print FAXOPTs
exten => h,1,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)})
exten => h,n,NoOp(FAXOPT(filename) : ${FAXOPT(filename)})
exten => h,n,NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)})
exten => h,n,NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)})
exten => h,n,NoOp(FAXOPT(maxrate) : ${FAXOPT(maxrate)})
exten => h,n,NoOp(FAXOPT(minrate) : ${FAXOPT(minrate)})
exten => h,n,NoOp(FAXOPT(pages) : ${FAXOPT(pages)})
exten => h,n,NoOp(FAXOPT(rate) : ${FAXOPT(rate)})
exten => h,n,NoOp(FAXOPT(remotestationid) : ${FAXOPT(remotestationid)})
exten => h,n,NoOp(FAXOPT(resolution) : ${FAXOPT(resolution)})
exten => h,n,NoOp(FAXOPT(status) : ${FAXOPT(status)})
exten => h,n,NoOp(FAXOPT(statusstr) : ${FAXOPT(statusstr)})
exten => h,n,NoOp(FAXOPT(error) : ${FAXOPT(error)})
; Sendmail options for reports by email :
exten => h,n,System(/usr/bin/tiff2pdf -o ${FaxTxDir}${FAXFILEPDF} ${FaxRxDir}${FAXFILE})
exten =>
h,n,macro(Sendmail,postmaster at acropolis.fr,asterisk at acropolis.fr,${FaxRxDir}${FAXFILEPDF},${FAXOPT(pages)},${FAXOPT(rate)},${FAXOPT(
headerinfo)},${FAXOPT(remotestationid)},${FAXOPT(resolution)})

Mainly extracted from the Digium FFA manual.

I hope this can help you.

Best Regards,
Francois


On Wed, Dec 23, 2009 at 10:49 AM, BERGANZ François
<francois at acropolistelecom.net> wrote:
> Hello,
>
>
>
> I need to send a tiff via fax with my asterisk 1.6.1.0.
>
> I tried in the dialplan
>
>
>
> [default]
>
> exten => _X.,1,SendFax(/root/test.tiff)




More information about the asterisk-users mailing list