> Another Thing you cam comment the line where de script send a email when the 
> fax fails
> ;)

>> On Mon, Aug 3, 2009 at 11:11 AM, Johann Steinwendtner 
>> <[email protected]> wrote:
>> Eric Chatham schrieb:
>> Hello,
>>
>>
>>
>> Is there a way to setup Callweaver only to send an e-mail if there it's
>> a fax.  We still get e-mails if someone dials the fax number as if it
>> were a telephone number.
>
> You should check the channel var ${FAXPAGES} before your faxscript gets 
> invoked.

Hello (Guten Tag).  Where is this located at on the script?  Here is an example 
of our fax2mail script:

[proc-fax2mail]
exten => s,1,Set(LOCALSTATIONID=CallWeaver FAX)
exten => s,n,Set(LOCALHEADERINFO=CallWeaver fax termination)
exten => s,n,Set(FAXFILE=/tmp/${CALLERIDNUM}-${CALLERID(dnid)})
exten => s,n,Set(FAXFILEPDF=/tmp/${CALLERIDNUM}-${CALLERID(dnid)}.tif)
exten => s,n,Set(EMAILADDR=${ARG1})
exten => s,n,Set(SIP_CODEC=ulaw)
exten => s,n,FaxDetect(6,ring,d,1000,100,0)
exten => s,n,SipDTMFMode(inband)
exten => s,n,SipT38SwitchOver()
exten => s,n,RxFAX(${FAXFILE},ecm)
exten => s,n,System(cp ${FAXFILE} ${FAXFILE}.tif)
exten => s,n,System(uuencode ${FAXFILEPDF} ${FAXFILEPDF} | mail -s 
FAX_MESSAGE_FROM:${CALLERIDNUM} ${EMAILADDR} -- -f [email protected])
;exten => s,n,System(uuencode ${FAXFILEPDF} ${FAXFILEPDF} | mail -s 
FAX_MESSAGE_FROM:${CALLERIDNUM} ${EMAILADDR} -- -f [email protected] < 
/tmp/faxmessage.txt)
exten => s,n,System(rm -f ${FAXFILE}.tif)
exten => s,n,System(rm -f ${FAXFILE})
exten => s,n,System(rm -f ${FAXFILE}.pdf)
exten => s,n,Wait(2)
exten => s,n,Hangup()
exten => s,1,NoOp(RxFAX completed)
exten => s,n,NoOp(RX: REMOTESTATIONID is ${REMOTESTATIONID})
exten => s,n,NoOp(RX: FAXPAGES is ${FAXPAGES})
exten => s,n,NoOp(RX: FAXRESOLUTION  is ${FAXRESOLUTION})
exten => s,n,NoOp(RX: FAXBITRATE is ${FAXBITRATE})
exten => s,n,NoOp(RX: PHASEESTATUS is ${PHASEESTATUS})
exten => s,n,NoOp(RX: PHASESTRING is ${PHASEESTRING})

CONFIDENTIAL.  This e-mail and any attached files are confidential and should 
be destroyed and/or returned if you are not the intended and proper recipient.
_______________________________________________
Callweaver-users mailing list
[email protected]
http://lists.callweaver.org/mailman/listinfo/callweaver-users

Reply via email to