Ticket #5819 (new Bugs)

Opened 1 year ago

Last modified 8 months ago

faxdetect=yes in sip_general_additional.conf causing dropped outbound calls

Reported by: AdHominem Assigned to:
Priority: major Milestone: 2.11
Component: Fax Version: 2.10-branch
Keywords: faxdetect Cc:
Confirmation: Need Feedback Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description (Last modified by AdHominem)

Over the past year or so, I've had a dozen or so calls that have been dropped for no apparent reason. I just chalked it up to "the internet." However, today it happened twice in a row, and so I checked my logs.

I found that, in each case, Asterisk had detected a fax and attempted to transfer the call to the Fax Extension (which doesn't exist). I dug further and found that FreePBX includes faxdetect=yes in sip_general_additional.conf, and affords no way to disable it.

I don't see why this appears in sip_general_additional.conf. And it seems to me that it should not for the following reasons:

1. Most people who use FreePBX don't use the fax capability at all.

2. faxdetect=yes can be included in the trunk settings for trunks that need that feature.

3. If faxdetect=yes is going to be included in the [general] section, then there should be a corresponding option in the Asterisk SIP Settings module or the Fax Module to turn it off.

Change History

05/09/12 15:59:09 changed by AdHominem

  • description changed.

05/09/12 16:31:44 changed by AdHominem

  • owner deleted.
  • component changed from Asterisk SIP Settings to Fax.

Further investigation reveals that the faxdetect=yes line is added to sip_general_additional.conf when you install the Fax Configuration module and is removed when you disable or uninstall that module.

So, I'm changing this bug's component to "Fax."

Also, I've noted that going to Asterisk SIP Settings and adding "faxdetect=no" without the quotes in the section at the bottom will turn this off as well.

05/09/12 17:20:56 changed by tonyclewis

Yes the module will enable it as FreePBX still support old legacy faxing where faxing was a system wide thing. If you don't want fax detect on than remove the Fax Module.

I think adding a setting for this will create more confusion since than people might turn fax detect off than wonder why when they fax between 2 users on the same system it fails.

But I wont close the ticket yet tell we get more feedback on this.

05/09/12 17:25:07 changed by AdHominem

I think the opposite is true. Nobody would expect that merely installing a module would change how the system operates. Rather, installing the module should give you access to the options to change system functions.

If faxdetect=yes in the general settings is needed to enable fax detection (and I'm not sure that it is - it could probably just be in the trunk config), then the first option in the fax configuration module should be:

"Enable Faxdetect?"

05/09/12 18:37:51 changed by tonyclewis

I think more importance why is Asterisk detecting a fax that is not their is the bigger issue that should be dealt with because otherwise people that need fax detect will still have this issue.

05/09/12 18:44:02 changed by AdHominem

I agree with you 100%.

BUT- If we know that there's a feature that is buggy and that most people don't use, why enable it? And if we are going to enable it, we shouldn't do so in a stealthy manner, i.e. enabling is automatically simply by installing a module. Some people, myself included, like to install all the modules just to see what's there. I never imagined that just installing the module would enable any features, or impact the operation of my phone system.

We all know that Asterisk has bugs. The "no-internet-hangs-dns" bug is one example. You didn't respond to that bug by forcing Asterisk to do DNS lookups. You responded by installing DNSMASQ. That was a wise choice.

You should do the same here by NOT enabling faxdetect upon installation of the module, but instead allowing the users to select to enable it IN the module.

This is just my humble opinion. Either way, I've got a workaround. :)

I also want to take a moment to say that I really appreciate everything that you and Phillippe have done with FreePBX. Please don't interpret my comments here (or in any other bug report or feature request) as being negative or critical. I offer this comment (and others) in the hope that you'll make this software better!

05/09/12 21:55:16 changed by tonyclewis

I am not saying one way or another on weather it should be set or not but it has been this way for 7 years and this is the first time it has come up as a potential issue.

I just hate taking a setting that has been in place forever and blindly turning it off than people will scream because fax is no longer working because we made a change. I am still waiting for more feedback from others.

05/10/12 00:16:43 changed by AdHominem

I don't think that it has been set this way for 7 years.

This is being set by the Schmooze.com Fax Configuration module. It wasn't added to FreePBX until you officially joined the FreePBX team, as part of 2.9.

This is relatively new, which is why all the complaints on this issue (and there are quite a few on the forums) are within the last 12 months.

05/10/12 10:34:47 changed by tonyclewis

OK well to correct you. Since FreePBX introduced Fax in pre 2.5 days fax detect has always been set to yes.

All we did with the Fax Module is remove faxing from Core and put it in its own module. Core has always set this. I can see it set back in 2.5 and prior to 2.7 having its own Fax Module settings this their was no way to really turn it off since you could not just uninstall Fax. Also Fax Module was put into FreePBX in 2.7 not 2.9.

As a side note Schmooze joined the FreePBX project starting with FreePXB 2.5 not 2.9. Not sure where you got this information from.

05/10/12 11:55:57 changed by AdHominem

With respect to faxdetect, I'm definitely confused. I'm finding that, today, if you install FreePBX without the Fax Module, faxdetect is not set (and so it defaults to no). I assumed, perhaps incorrectly, that it had always been this way.

What you're saying now is that faxdetect has always been set to yes. for the last seven years.

That's not been my experience.

I have several PIAF installs with 2.8 that don't have faxdetect=yes set, and I just did a brand new PIAF install and it didn't have faxdetect=yes set in sip_gen_addl either.

Also, faxdetect=yes appears to be removed from the top line of s_g_a.conf if you remove the fax module.

Its possible that it appears somewhere else, and I've just missed it.

I only became aware Schmooze's involvement when the Distro was released. My bad.

05/10/12 12:09:29 changed by AdHominem

I've double checked and confirmed that:

1. Faxdetect=yes is NOT set by default on install of FreePBX 2.10. It is only set to yes when you install the Fax Configuration module.

2. I've checked several installs of FPBX 2.8 from 1-2 years ago and none of them have Faxdetect=yes set (because none of them have the module).

My position remains that installing a module should not change system functionality. Merely installing the fax configuration module should not add faxdetect=yes to the s_g_a.conf file, but it currently does.

Instead, installing the module should give users the option to enable Fax Detection. Since its necessary for faxing to work, it should be the first option (and probably have a note indicating that faxing won't work unless it is enabled).

If your finding that your systems had faxdetect=yes, it is probably because you don't run them in the default configuration.

05/10/12 13:55:27 changed by tonyclewis

I think you are missing the key thing here. Fax Detect starting with 2.7 or newer when the fax module was introduced into FreePBX GUI will have it set to yes if you have the fax module installed otherwise the fax module is useless without it. It will not be set if you do not have the Fax Module.

Pre 2.7 days Fax was part of FreePBX Core so Core would auto set Fax Detect to Yes.

What you are stating reconfirms exactly what I keep stating. If Fax Module is installed Fax Detect is set to yes or the module is useless and why install the module if you are not going to use Fax.

05/10/12 14:01:23 changed by AdHominem

Well, you might install the module because you want to see what it does. Also, it comes preinstalled with the Distro. There are lots of modules that people install and don't use, or don't use until later.

I do see your points, but I respectfully disagree with them. Merely installing a module shouldn't change functionality of the system. So, if you want faxdetect=yes on FreePBX, then enable it all the time, whether the module is installed or not. If you want the user to be able to change it, make it the very first option in the fax module:

"Enable Fax Detection: x yes x no"

I promise I'll be quiet now!

07/09/12 20:04:50 changed by p_lindheimer

  • confirmation changed from Unreviewed to Need Feedback.

I'm a little late to the game and trying to decide what to do here. My inclination is to close the ticket and leave things as they are as it really seems Asterisk may have been flakey here and I haven't seen other issues popping up on this. However, I'm also trying to determine in these cases exactly what happened since it seems further flawed. Are you saying that since no fax extension was available to transfer the call to, Asterisk chose to just terminate it vs. ignoring the "phantom" detection and letting it continue in the dialplan?

07/09/12 20:23:46 changed by p_lindheimer

After a little more discussion, maybe we can "filter" this a bit more, and refrain from setting faxdetec=yes when there are no inbound routes that are in fact using it. Right now, it sets it IF the conditions exist such that it could work whether or not someone setup a DID or catchall to do fax reception.

07/09/12 20:24:45 changed by AdHominem

Yes, that's correct. If you turn faxdetect on (which the fax configuration module does automatically without telling the user), then Asterisk will listen to all calls for faxes, all the time. If it thinks it hears a fax (which it does incorrectly quite often), it will look for a fax extension and not find one (because FreePBX doesn't set one), and then drop the call.

I suspect you haven't gotten complaints on this because most people don't review their logs when a call drops. They just chalk it up to "the internet" and call back. There are a few mentions of this problem in the forums, and I've personally had it happen three times in a few minutes, while talking to one guy who apparently sounds like a fax machine to Digium.

I recommend that you add a field to the Fax Configuration module allowing users to turn Faxdetect on or off, and have a tooltip explaining the pros and cons. There is no need to have faxdetect on globally to use the fax module. Quite often, people use the Fax Module in connection with a dedicated fax number, which eliminates the need to detect faxes ever.

08/15/12 20:59:56 changed by TimMillerDyck

Hi,

We have a Linksys SPA-3102 ATA in front of an analog fax machine. Incoming faxes would sometimes work (especially if the fax was just one page) but also fail regularly.

The following log message was related to these failures:

NOTICE[14558] chan_sip.c: FAX CNG detected but no fax extension

I had ensured that faxdetect=no was set for the SPA-3102 extension in sip_additional.conf as I didn't want Asterisk to interfere at all with the SIP stream to this device. However, when I started searching for the source of these log errors, I found faxdetect=yes was set in sip_general_additional.conf and then I found this bug report.

Uninstalling the "Fax Configuration" module removed the setting from sip_general_additional.conf and inbound faxes were much improved.

So, this default setting was an unanticipated problem in our scenario. As this module is installed by default, it would be helpful to have faxdetect globally default to no, or have it be able to be enabled on a trunk-by-trunk or DID-by-DID basis with a trunk default of no.

Regards,

Tim Miller Dyck

08/15/12 23:25:48 changed by AdHominem

You have to put faxdetect=no in the trunk settings or in the Asterisk SIP Settings module (in the custom fields at the bottom).

08/20/12 16:23:13 changed by TimMillerDyck

Hi AdHominem?, just uninstalling the Fax Configuration module worked for me, as this also removed the "faxdetect=yes" line from sip_general_additional.conf, restoring the default setting of no.

Or are you referring to options that work even if the Fax Configuration module is left installed?

08/20/12 16:28:30 changed by AdHominem

Yes. My "fix" works even if you leave the Fax Configuration module installed. You might do that, for example, if you have a dedicated fax number which routes all incoming calls to the fax system. In that case, you wouldn't need fax detection at all.

Also, even if you wanted to use fax detection, you might prefer to use it on a "per trunk" basis, i.e. putting faxdetect=yes in the trunks that support fax and faxdetect=no in the Asterisk SIP Settings module (or in each particular trunk that won't need it), to prevent false fax detections.

Ideally, either Asterisk would fix the problem with false detections, or FreePBX would find a way to allow the system to do something other than simply hanging up the call.

08/20/12 16:38:42 changed by TimMillerDyck

Great, thanks for pointing out these other options.