[Home]

Summary:ASTERISK-14968: Fax detection broken when upgrading from 1.6.0.9 to 1.6.0.15
Reporter:dlnoah (dlnoah)Labels:
Date Opened:2009-10-09 14:08:51Date Closed:2010-01-06 09:19:39.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_dahdi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) console_log.txt
( 1) console_output.txt
Description:I have a system that has an analog fax machine connected to a DAHDI line, and Asterisk performing faxdetect on incoming DAHDI calls.  In 1.6.0.9, this works as expected and automatically detects faxes and sends them to the fax machine.  In 1.6.0.15, I am getting an error in the console that Asterisk is trying to send the fax to extension "ÿ", which is an invalid extension (since my dialplan is set expecting the extension "fax".  Reverting to 1.6.0.9 fixes the fax detection behavior without any configuration file edits.
Comments:By: Kevin P. Fleming (kpfleming) 2009-10-09 16:37:12

This doesn't make a lot of sense, since there were no changes in chan_dahdi between 1.6.0.9 and 1.6.0.15 in this area of the code, nor were there any changes in pbx.c (which handles ast_async_goto()) in the relevant area of the code either. Can you post a console log made with 'core set verbose 10' and 'core set debug 10' so I can see if anything else strange is happening?

By: dlnoah (dlnoah) 2009-10-16 12:21:49

I still intend to get to this, but haven't had time to be able to re-upgrade the server in question, as it is in production.  Time permitting, I will do it tomorrow.  Sorry for the delay.

By: Leif Madsen (lmadsen) 2009-10-21 09:59:11

Changing this to feedback as we're waiting on some additional information from the reporter. Thanks!

By: Leif Madsen (lmadsen) 2009-10-26 12:29:53

DLNoah: how'd your upgrade go?

By: dlnoah (dlnoah) 2009-10-26 12:58:13

Console output with verbose and debug 10 is attached.  Same symptoms as when originally reported, I made sure to re-compile from a fresh tarball.

By: Kevin P. Fleming (kpfleming) 2009-10-26 18:03:21

Sorry, I should have been more explicit in my instructions... sometimes I get in a hurry. In addition to those settings you need to ensure that the 'console' channel in /etc/asterisk/logger.conf has 'verbose,debug,error,warning,notice', so that all output is sent to the console. Thanks.

By: Kevin P. Fleming (kpfleming) 2009-11-23 13:47:32.000-0600

We still need detailed console logs to be able to debug this issue. Thanks.

By: dlnoah (dlnoah) 2009-12-03 11:18:56.000-0600

Console_log.txt should be the log you asked for.  Lines 349-353 are the lines that appear to show Asterisk redirecting the call to the fax extension, but using the special character ÿ instead of the extension fax like 1.6.0.9 does.

By: Leif Madsen (lmadsen) 2009-12-07 12:09:13.000-0600

Oh, I've seen this same thing on another customers box, but not using fax (or maybe they were using fax and didn't know it).

I will try and get the person who saw this to report back here.

By: Jim Van Meggelen (jimvanm) 2009-12-07 13:41:28.000-0600

I have this happening on a system that's using ChannelRedirect(). I didn't want to report it because my dialplan code is very complex, and I've probably got a logic error in there somewhere, and I didn't want to put in a bug until I could reproduce it.

The console shows this:

--
[Dec  7 08:41:28] VERBOSE[14759] pbx.c:     -- Executing [navigating@InitiateChat:3] ChannelRedirect("DAHDI/28-1", "DAHDI/27-1,AcceptChatRequest,554369,1") in new stack
--
[Dec  7 08:41:28] VERBOSE[14758] pbx.c:     -- Sent into invalid extension 'ÿ' in context 'AcceptChatRequest' on DAHDI/27-1


So ChannelRedirect() seems to have the information it needs to send the call to extension 554369 (which is valid in that context), but instead sends it to this "ÿ" extension. I'm still testing to try and reproduce the exact conditions that cause this (it does not happen all the time), so I'm just adding this info because Leif asked me to. I'll submit a separate (non-fax) bug if I ever get a solid read on what exactly is going on.

By: Jim Van Meggelen (jimvanm) 2009-12-21 10:09:09.000-0600

Just an additional note, I rolled the customer's code back from 1.6.1.11 to 1.6.1.0, and the problem went away. Not much help in debugging, I know, but it does suggest the problem is in Asterisk, not my dialplan logic.

By: Leif Madsen (lmadsen) 2009-12-21 12:14:57.000-0600

JimVanM: you probably only needed to go back to 1.6.1.5 as I believe this issue crept up after 1.6.0.9 (and I think 1.6.1.5 is equivalent)

By: Jim Van Meggelen (jimvanm) 2009-12-21 12:20:06.000-0600

Good to know. Thanks.

By: Bob M (manchicken) 2009-12-29 04:15:16.000-0600

FYI just a 'me too', I'm getting this in 1.6.1.12 with pretty much the same debug:

chan_dahdi.c: DTMF digit: f on DAHDI/1-1
chan_dahdi.c:     -- Redirecting DAHDI/1-1 to fax extension
channel.c: Soft-Hanging up channel 'DAHDI/1-1'
channel.c: Scheduling timer at (0 requested / 0 actual) timer ticks per second
channel.c: Scheduling timer at (0 requested / 0 actual) timer ticks per second
pbx.c:     -- Sent into invalid extension '?' in context 'incoming' on DAHDI/1-1

Oddly, after getting a bunch of fax tone voicemails from someone, I did a test send of my own from remote and it went through to the 'fax' extension properly...  But all subsequent tests so far have failed every time.

By: Bob M (manchicken) 2009-12-29 04:39:59.000-0600

I think I just figured out the specifics on this -- If the 1100Hz tone comes in during playback via Background(), the jump to the invalid extension occurs.  However if the tone comes in while * is doing other things, or is in a Playback() or even WaitExten() in my case, it properly redirects to the 'fax' extension.

By: dlnoah (dlnoah) 2009-12-29 07:54:52.000-0600

I can confirm that on my server, the fax detection is happening while a Background() playback is occuring.

By: Bob M (manchicken) 2009-12-30 01:42:44.000-0600

As in 'happening properly'?

I tested this at length today with a stripped down simple dialplan that plays a long sound via Background() - if I send a fax tone at any time while it's playing, it detects but jumps to the bogus extension.  If I wait until the sound is done and my dialplan hits a WaitExten(), or I replace Background() with Playback(), it detects and jumps to the correct 'fax' extension.

By: dlnoah (dlnoah) 2009-12-30 07:11:18.000-0600

Sorry, yeah, that was a really unclear post.

I can confirm that on my server, the fax detection is occurring during a Background().  During that Background, it jumps to the bogus extension.

By: Kevin P. Fleming (kpfleming) 2009-12-30 08:12:33.000-0600

Based on that excellent detective work, I'd say the suspect revision is r193120 that changed the Background application in main/pbx.c. Those of you that are having this problem, you can try reverting to the background code from revision 193119 to see if the problem is resolved.

By: Bob M (manchicken) 2009-12-30 23:13:22.000-0600

I just grabbed and built r193119 and indeed it does work.  It looks like the change actually came in r193122.

By: Russell Bryant (russell) 2010-01-05 11:00:33.000-0600

A change went in yesterday to address a regression caused by that revision.  Please try the latest code in whatever branch you are using and let us know if it is now resolved.

By: Bob M (manchicken) 2010-01-06 02:55:54.000-0600

Looks like it's working for me (1.6.1)

By: Leif Madsen (lmadsen) 2010-01-06 09:19:38.000-0600

Looks like this is now resolved in the branch, and will be available in the next release.