[Asterisk-Users] AMP - Fax Detections

Sean Cook scook at kinex.net
Tue Dec 21 06:52:11 MST 2004


Does anyone know of any obscur reference for detecting an incoming fax.
I currently have AMP running and everything else is working great.
Installed the spandsp patches and software... using the default AMP
extensions.conf, I start sending a fax, I hear it pick up and transfer
to voicemail after 20s.

Fax is set for system... Here is the detail from the extensions.conf

[global]
FAX_RX = system

[from-pstn-reghours]
exten => s,1,GotoIf($[${FAX_RX} =
disabled]?from-pstn-reghours-nofax,s,1:2)     ; if fax detection is
disabled, then jump to from-pstn-nofax - else continue
exten => s,2,Answer
exten => s,3,Wait(1)
exten => s,4,SetVar(intype=${INCOMING})
exten => s,5,Cut(intype=intype,-,1)
exten => s,6,GotoIf($[${intype} = EXT]?7:9)             ; If INCOMING
starts with EXT, then assume its an extension
exten =>
s,7,Wait(3)                                                    ;wait 3
more second to make sure this isn't a fax before dialing someone
exten => s,8,Goto(ext-local,${INCOMING:4},1)
exten => s,9,GotoIf($[${intype} = GRP]?10:11)   ; If INCOMING starts
with GRP, then assume its a ring group
exten => s,10,Goto(ext-group,${INCOMING:4},1)
exten => s,11,Goto(${INCOMING},s,1)                     ; not EXT or GR1
- it's an auto attendant
exten => fax,1,Goto(ext-fax,in_fax,1)
exten => h,1,Hangup


[ext-fax]
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,4,system(mime-construct --to ${EMAILADDR} --subject "Fax
from ${CALLERIDNUM} ${CALLERIDNAME}" --attachment ${CALLERIDNUM}.pdf
--type application/pdf --file ${FAXFILE}.pdf)
exten => in_fax,5,system(rm ${FAXFILE} ${FAXFILE}.pdf)
exten => in_fax,6,Hangup
exten => analog_fax,1,GotoIf($[${FAX_RX} = disabled]?3:2)  ;if fax is
disabled, just hang up
exten => analog_fax,2,Dial(${FAX_RX},20,d)
exten => analog_fax,3,Hangup
;exten => out_fax,1,wait(7)
exten => out_fax,1,txfax(${TXFAX_NAME}|caller)
exten => out_fax,2,Hangup
exten => h,1,Hangup()







More information about the asterisk-users mailing list