Fax issues

Hi,

I’m having some problems with faxing and I’d appreciate any help you can offer.

First my basic setup:

TDM400P configured as 1 FXS / 2 FXO (TDM12B).
Two POTS lines in a hunt group on the FXO ports.
3 SIP phones on our local network.
1 Fax machine (Brother MFC-7820N) attached to the FXS port.

I get “poor line condition” errors from my fax machine whenever I attempt to fax over one of the fxo ports - either direction. I also cannot fax using spandsp/rxfax on incomming calls on the fxo ports. The only thing that seems to work is if I fax from the fax machine to spandsp directly over the fxs port.

To recap:

This works:
Fax Machine on FXS port —> rxfax on spandsp extention

These won’t work:
Fax Machine on FXS port —> outbound FXO —> someone else’s fax

Fax Machine on FXS port —> outbound FXO —> inbound FXO —> spandsp

Someone else’s fax —> inbound FXO —> spandsp

Someone else’s fax —> inbound FXO —> Fax machine on FXS port

I’ve set echocancelwhenbridged=no. I’ve even tried totally turning echo cancellation off - even though I don’t want to keep it this way because we need it for regular voice calls.

Fax detection does seem to work in that when our IVR answers the inbound FXO call and hears the beep, it will route to spandsp or the FXS port depending on how I have it configured.

The only problem seems to be that if a fax travels over the FXO port, it corrupts the condition of the line so that the fax machine can’t even train on it. I don’t get garbled faxes, I don’t get any at all.

I’ve also played with rxgain/txgain settings, but nothing seems to help.

Any ideas? Any way to debug this better?

BTW - I’ve tried Asterisk 1.0.9, 1.2.0-beta1 and the current CVS head. all have the same problem.

Thanks,
Matt

I have gotten a fax on an FXS to safely pass through an FXO and deliver faxes reliably.

I wonder if it’s a speed issue. I was using an EXTREMELY old fax machine that very probably topped out at 14.4 for a connect speed. (Possibly even 9600.)

I don’t know of many fax machines where you can control the connect speed, but I suspect that might be part of the problem.

Anyway, just to be complete about the troubleshooting effort, did you:

  1. Try swapping the lines connected to your FXO ports? (maybe it IS poor line quality?)
  2. Try disabling one of the FXO ports and forcing the calls through the other? (possibly just one line or one FXO module is having trouble?)

echocancelwhenbridged=yes is generally reserved for bridging across the same board with completely TDM circuits involved. You might try turning that back on.

Could we have a look at your zapata.conf file?

BTW, I have had lots of trouble with my FXS port recently. I haven’t had time to chase it down, but after a period of time, I hear tons of static when I pick up the receiver on the phone on the FXS port.

If I stop Asterisk, re-start the Zaptel service, and start Asterisk again, it goes away.

Yeah, I tried both swaping the lines and also trying different ports. Neither helped. I know the lines are good because I can fax just fine if take asterisk out of the picture and fax directly on the line.

No speed setting on my fax machine, so I can’t try that.

As far as echo cancellation - everything I’ve read says that you don’t want to use it with faxing or any other type of data connection. Besides, I’ve tried it both ways and it doesn’t help.

I would think that FXO to FXS, on the same TDM card, with no echo cancelation, would be a pure TDM bridge and be essentially like physically switching the line over. But it must be doing something else in there.

Not experiencing that FXS problem you described. In fact FXS only (FXS to spandsp) works great. FXO to FXS fails, and FXO only (FXO to spandsp) fails. So I’ve taken everything out of the picture except the FXO port itself, or a configuration issue.

Here’s my zapta.conf:

[channels]
language=en
context=default
musiconhold=default
switchtype=national
faxdetect=incoming
immediate=no
usecallerid=yes
echocancelwhenbridged=no

; FXO PORTS
group=1
echocancel=yes
echotraining=yes
signalling=fxs_ks
channel => 3
channel => 4

; FXS PORT
group=2
echocancel=no
echotraining=no
signalling=fxo_ks
channel => 1

I ran across this:

lists.digium.com/pipermail/aster … 71301.html

And was able to find a local test number. I now have

rxgain=9.3
txgain=-2.1

And my output from ztmonitor is very near perfect (according to that post).

It still doesn’t work. :frowning: