Eric Chatham schrieb:
>>>
>>> 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})
> 

Hi !

Your proc-fax2mail looks bogus to me. You have two #1 priorities in there. 
Further, I would move the
post fax handling to the h extension of your context.
In your example place after the RxFAX a statement like this:
exten => s,n,GotoIf($[${FAXPAGES} = 0]?do_hangup)
und change your Hangup statement to:
exten => s,n(do_hangup),Hangup()

Hans


_______________________________________________
Callweaver-users mailing list
[email protected]
http://lists.callweaver.org/mailman/listinfo/callweaver-users

Reply via email to