Can't figure out why FAX DETECTION doesn't work

Here’s my setup:

Asterisk 11
FreePBX 2.11
Fax Configuration

Here’s what I’m trying to do:
I don’t have a dedicated FAX line, I just want the system to detect incoming fax, through a SIP trunk, then receive it, then send an email with PDF’ed fax attached.
So up to now, here’s what I’ve been doing.

  1. In the inbound route.
    Set “Detect Faxes” to YES
    Set “Fax Detection type” to SIP
    (I think this might be the problem)
    Set “Fax Destination” to an extension (ex 12345)

  2. Create extension 12345
    In the “Fax” section
    Check the "Enabled?"
    set the “Fax email” to a valid email

  3. In Advanced SIP settings, add the line :
    faxdetect = YES

When I send a fax to the phone number associated with the inbound route, they get detected, then it hangs up.

Here’s what happens in the logs after fax detection:
Executing [[email protected]:1] Set(“SIP/”, “__FROM_DID=fax”) in new stack
– Executing [[email protected]:2] NoOp(“SIP/”, “Received an unknown call with DID set to fax”) in new stack
– Executing [[email protected]:3] Goto(“SIP/”, “s,a2”) in new stack
– Goto (from-trunk,s,2)
– Executing [[email protected]:2] Answer(“SIP/”, “”) in new stack
– Executing [[email protected]:3] Wait(“SIP/”, “2”) in new stack
– Executing [[email protected]:4] Playback(“SIP/”, “ss-noservice”) in new stack
– <SIP/> Playing ‘ss-noservice.gsm’ (language ‘fr’)
– Executing [[email protected]:5] SayAlpha(“SIP/”, “fax”) in new stack
– <SIP/> Playing ‘letters/f.gsm’ (language ‘fr’)
– <SIP/> Playing ‘letters/a.gsm’ (language ‘fr’)
– <SIP/> Playing ‘letters/x.gsm’ (language ‘fr’)
– Executing [[email protected]:6] Hangup(“SIP/”, “”) in new stack
== Spawn extension (from-trunk, s, 6) exited non-zero on ‘SIP/’
– Executing [[email protected]:1] Macro(“SIP/”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“SIP/”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] Hangup(“SIP/”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/’ in macro ‘hangupcall’
== Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/’

What am I doing wrong?


Is this the FreePBX distro?

Sadly it is not, I couldn’t make the install to work.

Therefore it is installed on latest LTS version of UBUNTU, with:
Asterisk 11
FreePBX 2.11

You need to configure a fax engine for res_fax inside asterisk. Will need to either purchase and install Fax For Asterisk or recompile Asterisk for SPANDSP and setup res_fax_spandsp

Another unencumbered solution is to setup iaxmodem (or if brave t38modem) and use hylafax, maybe frontend these to Avantfax for a nice free GUI. I think PIAF does that for you quite easily.