The following info was taken from this location: http://www.voip-info.org/tiki-index.php?page=NVFaxDetect Sample Usage (extensions.conf) [context-incoming] ; Answer and do some detection work exten => s,1,Answer exten => s,2,NVFaxDetect() exten => s,3,Hangup ; If user presses "1", dial main line exten => 1,1,Dial(SIP/5500) exten => 1,2,Hangup ; If this is a fax, dial fax line exten => fax,1,Dial(SIP/5501) exten => fax,2,Hangup ; If user is talking, send him to Debra exten => talk,1,Dial(SIP/5502) exten => talk,2,Hangup Another Example (extensions.conf) ; ring extensions with fax detect [macro-faxexten] exten => s,1,Dial(${ARG1},17) ; wait 3 rings exten => s,2,Answer exten => s,3,Playtones(ring) ; play fake ring so caller doesn't wonder whats going on exten => s,4,NVFaxDetect(4|dt) ; while playing ring sound, detect faxes for 4 seconds (goes to "fax" extension if detected) exten => s,5,Goto(s-${DIALSTATUS},1) ; if no fax, branch on dialstatus exten => s-NOANSWER,1,Voicemail(u${MACRO_EXTEN}) exten => s-NOANSWER,2,Hangup() exten => s-BUSY,1,Voicemail(b${MACRO_EXTEN}) exten => s-BUSY,2,Hangup() exten => _s-.,1,Goto(s-NOANSWER,1) ; everything else is treated as no answer ; If this is a fax, get it exten => fax,1,StopPlaytones ; you must do this or it will play ring sounds over your fax exten => fax,2,SetVar(FAXFILE=/var/spool/asterisk/fax/${DNID}_${UNIQUEID}) exten => fax,3,Goto(fax,s,1) [fax] exten => s,1,rxfax(${FAXFILE}.tif) exten => h,1,DEADAGI(faxtoemail.agi|${FAXFILE}.tif) ; you need to download the faxtoemail script or something similar here.