Add faxdetect on from-internal context

This is a request of sorts. We have departments who fax each other, rather than email each other. With the fax improvements in 2.7, I’ve moved a few of these departments to fax to email setups, but the recipients configured as such are no longer able to recieve faxes from other departments.

I can force the extension to recieve faxes by modifying from-internal-custom in the extensions_custom.conf
exten => 399,1,Answer ; F-A-X
exten => 399,n,Wait(1)
exten => 399,n,NVfaxdetect(5)
;exten => 399,n,Hangup ;Don’t need this line.
exten => 399,n,Goto(ext-fax,399,1)

So I believe it’s simply skipping fax detection on the from-internal context.

Also, is anyone having any success getting 20+ page faxes to send or recieve using the SendFax app? I’m getting T1_timout errors, etc, with the Free fax for asterisk, and also the traditional txfax app.



…guess it’s this:

in /etc/asterisk/extensions.conf

[from-internal-xfer] ; applications are now mostly all found in from-internal-additional in _custom.conf include => from-internal-custom include => parkedcalls ;allow phones to dial other extensions include => ext-fax ;allow phones to access generated contexts

include => from-internal-xfer
include => bad-number

Is this about the same as here:

In my opinion, this should be considered a bug…

Yes, this looks like we have the same issue. I’m also running into this when connecting from a second server over a dahdi to zap trunk. The context on that trunk is from-internal as well, so it skips fax detection. My other server is a development/test server, and I was using it for troubleshooting faxing. (why people insist on sending 20+ page faxes escapes me, but it needs to work.)

pwalker and kjohnsoncda,

unless I am mistaken, the fax detection code has always been limited to the inbound routes only as that is where the detection code was always set and email addresses were always supplied for it.

It is possible that the dialplan previously had a fax extension somewhere within the from-internal context (or equivalent) that may have resulted in detection occurring but that would have resulted in faxes going to the default email address and not to a user’s email address.

So the request would be a new feature request (which you are welcome to submit into the tracker system).

If you say you had previously been able to do this to individual user emails internally then you have me a little baffled but maybe it is the lack of caffeine this morning…


As for it previously working, it was simply because I had an ATA and a fax machine at the extension before. (It worked due to dumb luck!)

I’m off to find the feature request button.


so in other words, you could have just sent it to ‘666’ and you would have had the same results.

(… must be the lack of coffee, but it just occurred to me that the choice of 666 for the internal fax option, by the original developer who added it, was certainly no coincidence…lol)

Okey, I’m having a FreePBX 2.5 here (well, somewhere remote): Fax Handling is in the Inbound Routes.
Next - another one, FreePBX 2.3: “Fax Handling” (incl. “Fax Email” address) is right in the Extension config!

can you paste in a snapshop of the dialplan for 2.5, maybe I’m just caffeine deprived and my memory isn’t working like it used to.

I don’t have a 2.5 system to look at what is generated to see trigger my mind and see where I’m thinking wrong.

Had my coffee now I understand the confusion.

The fax handling in the 2.3 in the extension page was always confusing. Those settings only applied to the inbound DIDs that were created. Nothing is generated at the extension level.

Those settings and some of the other ones were only associated with the directdid settings. All of that was re-merged with inbound routes and the ‘links’ created between them.

Have a look at the dialplan on any of those systems and look for “FAX_RX_EMAIL” you will find that it is only sent for inbound routes, plus the global default value, and then used down in fax processing.


That was actually incorrect dialplan that made no tangible difference.

The ext-fax context from that era was this:

exten => s,1,Answer
exten => s,2,Goto(in_fax,1)
exten => in_fax,1,StopPlayTones
exten => in_fax,2,GotoIf($["${FAX_RX}" = "system"]?3:analog_fax,1)
exten => in_fax,3,Macro(faxreceive)
exten => in_fax,4,Hangup
exten => analog_fax,1,GotoIf($["${FAX_RX}" = "disabled"]?4:2)  ;if fax is disabled, just hang up
exten => analog_fax,2,Set(DIAL=${DB(DEVICE/${FAX_RX}/dial)});
exten => analog_fax,3,Dial(${DIAL},20,d)
exten => analog_fax,4,Hangup
;exten => out_fax,1,wait(7)
exten => out_fax,1,txfax(${TXFAX_NAME},caller)
exten => out_fax,2,Hangup
exten => h,1,system(/var/lib/asterisk/bin/ --to ${EMAILADDR} --from ${FAX_RX_FROM} --subject "Fax from ${URIENCODE(${CALLERID(number)})} ${URIENCODE(${CALLERID(name)})}" --attachment fax_${URIENCODE(${CALLERID(number)})}.pdf --type application/pdf --file ${FAXFILE});
exten => h,2,Hangup()

There is nothing you can dial in there… The include should never have been there but it didn’t hurt anything either (other than maybe minute amounts of performance for Asterisk to have to look there for stuff it would never find when dialing).