Bug with faxdetect switch codec error

Community-based Support for users of Free Fax For Asterisk

Bug with faxdetect switch codec error

Postby mykhyggz » Tue Apr 14, 2009 8:36 pm

I've played with this for a bit with partial success. Receiving a fax directly works fine.

Problem is, when *switching context* to "fax", the tones that signal to receive fail and the fax never is sent from the remote machine...

IOW, dedicating the context to just fax, there is no problem.

But, if I Answer() Wait() and then a fax is detected and put to exten =>fax,1 from exten => s,n the codec apparently is switched and the tones fail to generate.

Changing the dialplan to just pick up as fax, works fine. (At first I thought I'd need something else like nvfaxdetect or whatever to do the fax detection, but no, this does work. But then it breaks when receiving....)

So, the detection is enabled, fine, but the tone to signal the fax to start sending breaks -- just like here in frame.c:

} else if (s->format != f->subclass) {
ast_log(LOG_WARNING, "Smoother was working on %d format frames, now trying to feed %d?\n", s->format, f->subclass);
return -1;
}

I don't know how to fix this one, unfortunately... Hoping this can be cleared up. ;-)
mykhyggz
Newsterisk
 
Posts: 12
Joined: Tue Apr 14, 2009 2:46 pm

more actual debug stuff

Postby mykhyggz » Tue Apr 14, 2009 11:20 pm

-- Channel 'DAHDI/1-1' fax session '3' started
-- Channel 'DAHDI/1-1' fax session '3', [ 000.007750 ], >>>>>> (to stack) completed sending ' 0' frames ( 0 ms) of 'energy ', now sending 'energy '.
[Apr 14 21:50:46] WARNING[3862]: frame.c:214 __ast_smoother_feed: Smoother was working on 4 format frames, now trying to feed 64?
[Apr 14 21:50:46] ERROR[3862]: res_fax.c:910 generic_fax_exec: channel 'DAHDI/1-1' fax session '3' failure, reason: 'Failed to feed the smoother'
-- Channel 'DAHDI/1-1' fax session '3', [ 000.206793 ], <<<<<< (to chan) completed sending ' 0' frames ( 0 ms) of 'energy ', now sending 'energy '.
-- Channel 'DAHDI/1-1' fax session '3', [ 005.254107 ], STAT_EVT_TX_V21_DONE st: WT_DIS_RSP rt: WDSRNT21

[ ... ]

-- Executing [h@fax-rx:11] NoOp("DAHDI/1-1", "FAXOPT(status) : FAILED") in new stack
-- Executing [h@fax-rx:12] NoOp("DAHDI/1-1", "FAXOPT(statusstr) : FAX_NO_FAX") in new stack
-- Executing [h@fax-rx:13] NoOp("DAHDI/1-1", "FAXOPT(error) : T1_TIMEOUT") in new stack


And no fax.

Again, this error doesn't appear when the line is "dedicated" to fax, just when I try to use exten => fax,1

Or, I'm doing something wrong, of course, but it *looks* like a bug, somehow. Hope I'm wrong. '-)
mykhyggz
Newsterisk
 
Posts: 12
Joined: Tue Apr 14, 2009 2:46 pm

Postby selectron » Sat Apr 25, 2009 12:33 am

FWIW I'm having a similar problem - not sure if it is exactly what you're seeing though.

Server is running AsteriskNow 1.5 - I've complied app_nv_faxdetect and it works, but when the detected fax is redirected to the fax extension, the audio is one way. I have the exact same problem using the built-in Zap/DAHDI fax detection.

This is entirely for receiving faxes into the Asterisk system from the PSTN via a directly attached PRI.
selectron
Newsterisk
 
Posts: 2
Joined: Sat Dec 27, 2008 12:39 am

Postby mykhyggz » Mon Apr 27, 2009 11:34 pm

selectron wrote:Server is running AsteriskNow 1.5 - I've complied app_nv_faxdetect and it works, but when the detected fax is redirected to the fax extension, the audio is one way. I have the exact same problem using the built-in Zap/DAHDI fax detection.


It would seem that the fax detection isn't the problem.

My guess is switching to receive is the problem. You say audio is "one way", but not which way. '-)

I could see that the tones were coming to asterisk -- the error reported was what appeared (to me) to be a period/buffer size mismatch, therefore no audio was being sent to the remote machine, that it would begin transmission. Eventually, 'receivefax' just timed out.

Makes me wonder if there's a different problem entirely, like having the call 'Answered()' before initiating the fax receive, or something. It seemed to work with no problem if the channel is 'dedicated' to receive faxes... but I only have one dahdi channel. :(

I suppose the thing to do is file a bug report and see if that nets any more developer feedback.
mykhyggz
Newsterisk
 
Posts: 12
Joined: Tue Apr 14, 2009 2:46 pm

Postby selectron » Tue Apr 28, 2009 4:05 am

The audio was one-way from Asterisk out to the remote (PSTN) fax.

I eventually tracked the problem down to something new in the wanpipe driver, so have fax detection and reception working again. I'll be filing a bug report with Sangoma as soon as I can find the time. The problem was present regardless of the faxdetect= parameter in chan_dahdi.conf.
selectron
Newsterisk
 
Posts: 2
Joined: Sat Dec 27, 2008 12:39 am

works for me in 1.6.1.0

Postby mykhyggz » Wed Apr 29, 2009 3:40 pm

Just updated to 1.6.1.0 release and some related code change has fixed for me as well.
mykhyggz
Newsterisk
 
Posts: 12
Joined: Tue Apr 14, 2009 2:46 pm

Re: works for me in 1.6.1.0

Postby VMikhelson » Tue Jun 02, 2009 11:50 pm

mykhyggz wrote:Just updated to 1.6.1.0 release and some related code change has fixed for me as well.


Running into the same issue. See log below. My understanding the bugs are fixed in 1.6.1.0. Do you know if compatible update is available for FreePBX?

My setup: AsteriskNOW 1.5, FreePBX 2.5.1.5, Asterisk 1.6.0.9.

Thank you,
Vladimir

[Jun 2 23:34:45] VERBOSE[23819] logger.c: -- Channel 'DAHDI/1-1' receiving fax '/var/spool/asterisk/fax/1244003680.33-rx.tif'
[Jun 2 23:34:45] VERBOSE[23819] logger.c: -- Channel 'DAHDI/1-1' fax session '2' started
[Jun 2 23:34:45] WARNING[23819] frame.c: Smoother was working on 4 format frames, now trying to feed 64?
[Jun 2 23:34:45] ERROR[23819] res_fax.c: channel 'DAHDI/1-1' fax session '2' failure, reason: 'Failed to feed the smoother'
[Jun 2 23:35:29] VERBOSE[23820] logger.c: -- Channel 'DAHDI/1-1' fax session '2' is complete, result: 'FAILED' (FAX_NO_FAX), error: 'T1_TIMEOUT', pages: 0, resolution: 'unknown', transfer rate: '2400', remoteSID: ''
VMikhelson
Newsterisk
 
Posts: 42
Joined: Wed Sep 24, 2008 9:04 pm

Sorry, nope

Postby mykhyggz » Wed Jun 03, 2009 9:56 am

I don't know about freepbx, or how it relates to asterisk. Sorry!
mykhyggz
Newsterisk
 
Posts: 12
Joined: Tue Apr 14, 2009 2:46 pm

Re: Sorry, nope

Postby VMikhelson » Wed Jun 03, 2009 11:51 am

mykhyggz wrote:I don't know about freepbx, or how it relates to asterisk. Sorry!


Thank you for the reply.

Can you please elaborate a little bit about your experience upgrading to 1.6.1? Did you need to do anything with your configuration or was it just a bug fix?

Thank you,
Vladimir
VMikhelson
Newsterisk
 
Posts: 42
Joined: Wed Sep 24, 2008 9:04 pm

Postby VMikhelson » Mon Jun 29, 2009 10:52 pm

selectron wrote:Server is running AsteriskNow 1.5 - I've complied app_nv_faxdetect and it works.


Still struggling with the same issue. Fax reception does not work on DAHDI lines, no CED tones, eventually times out.

Decided to try with SIP. It looked like NVFaxDetect was needed. Decided to follow instructions in http://nerdvittles.com/index.php?p=237 Cannot compile app_nv_faxdetect. Getting the following errors in make.

/root/fax/agx-ast-addons/app_devstate.c:45: warning: initialization from incompatible pointer type
/root/fax/agx-ast-addons/app_devstate.c:45: warning: initialization from incompatible pointer type
/root/fax/agx-ast-addons/app_devstate.c:122: error: 'AST_FORMAT_MAX_AUDIO' undeclared here (not in a function)
make[2]: *** [CMakeFiles/app_devstate.dir/app_devstate.o] Error 1
make[1]: *** [CMakeFiles/app_devstate.dir/all] Error 2
make: *** [all] Error 2

Any ideas?

Thank you,
Vladimir
VMikhelson
Newsterisk
 
Posts: 42
Joined: Wed Sep 24, 2008 9:04 pm


Return to Fax For Asterisk

Who is online

Users browsing this forum: No registered users and 1 guest