Asterisk and Fax Detect
So after months and months of fighting faxing in asterisk, i was able to come up with a solution. All over the internet is a lot of references of app_nv_fax detect. good luck finding it. Especially good luck with getting it to work on asterisk 1.6.
So here is my contribution to the world. I was able get it functioning, and here is the code, and what you need. This was testing on 1.6.1.6. It should work on 1.6.1 and higher.
Download the asterisk source, and then download these 2 files app_nv_backgrounddetect.c and app_nv_faxdetect.c and put them into your asterisk.x/apps/ directory
then run ./configure, make, and make install they should get installed into your install directory or if you didn’t choose one they are in /usr/lib/asterisk/modules/
since I only use backgrounddetect this is what my extentions.conf file looks like
exten => _X!,1,Answer()
exten => _X!,2,AGI(GetGreeting.agi)
exten => _X!,3,NVBackgroundDetect(${greeting},t)
exten => _X!,4,AGI(Capture.agi)
exten => _X!,5,Hangup
;Menuexten => *,1,AGI(Menu.agi)exten => *,2,Hangup
;Faxexten => fax,1,ReceiveFAX(${Faxfile})exten => fax,2,AGI(/Fax.agi)exten => fax,3,Hangup
The way my setup works is I lookup the DID and find out what greeting I’m suppose to use, and then i set the variable using Asterisk::AGI
So far my failure rate is about 1 in 500. Which for sip, and g711u is good enough for me. The largest fax I’ve recieved was 30 pages. If you have to get a fax larger than 30 pages use email. I’m sure it will take more, but the fax machine couldn’t fit any more pages in the read tray













