This feature request is an offshoot of this discussion in the forums:
http://www.freepbx.org/forum/freepbx/users/non-existant-fax-extensions
Anyhow, I think it would be prudent to define a default fax destination for FreePBX. Fax destinations defined in Inbound Routes and elsewhere would override this default destination.
As it currently stands, if DAHDi, Sangoma, SIP, or any other channel detects a fax while the call is in a context for which there is no fax destination defined, the call seems to run off the end of the dialplan because there is no defined fax destination. The end result is that the system hangs up on the client.
While many such problems might be rectified by better configuration of fax detection at the channel layer, defining a default destination throughout FreePBX would help in these ways:
1.) We should never just be hanging up on people (or fax machines for that matter). Because DAHDi, or in my case Sangoma Wanrouter may send a "switch to Fax" event no matter what context the call is in, it is only prudent to make sure that call goes somewhere if that happens.
2.) The current symptoms of this problem (hangup) are difficult to trace, as they manifest no differently than any other disconnection (caller's cell phone loss of signal, etc.). Bouncing the call to a fax machine, an error message ( "your call was directed to a non-existant extension"), or back to a user specified location would make it easier for users to identify what is going wrong.
3.) For users with simple Fax needs, one destination for all calls might be easier and preferable to the current (and excellent, I might add) ability to specify destinations based on Inbound Route.
Just a thought.
Tom
Snippet from /var/log/asterisk/full:
[Dec 20 06:36:20] VERBOSE[7390] chan_dahdi.c: -- Accepting call from '6037760176' to '7246066' on channel 0/1, span 1
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [7246066@from-pstn:1] Set("DAHDI/1-1", "__FROM_DID=7246066") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [7246066@from-pstn:2] Gosub("DAHDI/1-1", "app-blacklist-check,s,1") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [s@app-blacklist-check:1] GotoIf("DAHDI/1-1", "0?blacklisted") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [s@app-blacklist-check:2] Set("DAHDI/1-1", "CALLED_BLACKLIST=1") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [s@app-blacklist-check:3] Return("DAHDI/1-1", "") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [7246066@from-pstn:3] ExecIf("DAHDI/1-1", "1 ?Set(CALLERID(name)=6037760176)") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [7246066@from-pstn:4] Set("DAHDI/1-1", "__CALLINGPRES_SV=allowed") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [7246066@from-pstn:5] Set("DAHDI/1-1", "CALLERPRES()=allowed_not_screened") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [7246066@from-pstn:6] Set("DAHDI/1-1", "_RGPREFIX=Inside") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [7246066@from-pstn:7] Set("DAHDI/1-1", "CALLERID(name)=Inside6037760176") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [7246066@from-pstn:8] Goto("DAHDI/1-1", "ivr-3,s,1") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Goto (ivr-3,s,1)
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [s@ivr-3:1] Set("DAHDI/1-1", "MSG=custom/ivr") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [s@ivr-3:2] Set("DAHDI/1-1", "LOOPCOUNT=0") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [s@ivr-3:3] Set("DAHDI/1-1", "__DIR-CONTEXT=default") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [s@ivr-3:4] Set("DAHDI/1-1", "_IVR_CONTEXT_ivr-3=") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [s@ivr-3:5] Set("DAHDI/1-1", "_IVR_CONTEXT=ivr-3") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [s@ivr-3:6] GotoIf("DAHDI/1-1", "0?begin") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [s@ivr-3:7] Answer("DAHDI/1-1", "") in new stack
[Dec 20 06:36:20] VERBOSE[30822] pbx.c: -- Executing [s@ivr-3:8] Wait("DAHDI/1-1", "1") in new stack
[Dec 20 06:36:21] VERBOSE[30822] pbx.c: -- Executing [s@ivr-3:9] Set("DAHDI/1-1", "TIMEOUT(digit)=3") in new stack
[Dec 20 06:36:21] VERBOSE[30822] func_timeout.c: -- Digit timeout set to 3.000
[Dec 20 06:36:21] VERBOSE[30822] pbx.c: -- Executing [s@ivr-3:10] Set("DAHDI/1-1", "TIMEOUT(response)=10") in new stack
[Dec 20 06:36:21] VERBOSE[30822] func_timeout.c: -- Response timeout set to 10.000
[Dec 20 06:36:21] VERBOSE[30822] pbx.c: -- Executing [s@ivr-3:11] Set("DAHDI/1-1", "__IVR_RETVM=") in new stack
[Dec 20 06:36:21] VERBOSE[30822] pbx.c: -- Executing [s@ivr-3:12] ExecIf("DAHDI/1-1", "1?Background(custom/ivr)") in new stack
[Dec 20 06:36:21] VERBOSE[30822] file.c: -- <DAHDI/1-1> Playing 'custom/ivr.gsm' (language 'en')
[Dec 20 06:36:23] VERBOSE[30822] chan_dahdi.c: -- Redirecting DAHDI/1-1 to fax extension
[Dec 20 06:36:23] VERBOSE[30822] pbx.c: == Spawn extension (ivr-3, fax, 1) exited non-zero on 'DAHDI/1-1'
[Dec 20 06:36:23] VERBOSE[30822] pbx.c: -- Executing [fax@ivr-3:1] Goto("DAHDI/1-1", ",,") in new stack
[Dec 20 06:36:23] NOTICE[30822] pbx.c: Cannot find extension context ''
[Dec 20 06:36:23] WARNING[30822] pbx.c: Priority '' must be a number > 0, or valid label
[Dec 20 06:36:23] VERBOSE[30822] pbx.c: == Spawn extension (ivr-3, fax, 1) exited non-zero on 'DAHDI/1-1'
[Dec 20 06:36:23] VERBOSE[30822] pbx.c: -- Executing [h@ivr-3:1] Hangup("DAHDI/1-1", "") in new stack
[Dec 20 06:36:23] VERBOSE[30822] pbx.c: == Spawn extension (ivr-3, h, 1) exited non-zero on 'DAHDI/1-1'
[Dec 20 06:36:23] VERBOSE[30822] chan_dahdi.c: -- Hungup 'DAHDI/1-1'