Setting FAXOPT(maxrate) ignored by ReceiveFax?

Community-based Support for users of Free Fax For Asterisk

Setting FAXOPT(maxrate) ignored by ReceiveFax?

Postby willemm » Sun Feb 07, 2010 8:54 am

Hi all.

We are using Asterisk 1.4.29, with res_fax 1.4-1.1.6 and res_fax_digium 1.4-1.1.6.

Asterisk is connected via a Sangoma A500 BRI to the ISDN telephone network,
and we have a Sangoma A200 card connecting to our analog fax machine (Xerox Workcentre with fax module).

Because we have problems receiving faxes, we are trying to use ReceiveFax to capture the incoming fax directly from the ISDN line (which is G711_ALAW format).

We would like to lower the maxrate of allowed transmission to something to 9600 or below.
But the ReceiveFax application is ignoring the FAXOPT(maxrate) setting !
We are using a similar dialplan as in the Digium manual (setting it before calling ReceiveFax, and using NoOp to print the setting). The NoOp command shows the different setting (for example 9600) but the debug output always shows STAT_NEG_V17_14400 when ReceiveFax first starts to negotiate the transmission parameters !

We tried with SendFax and it too ignores the setting.
We tried then to make a res_fax.conf file with a [general] header and containing a maxrate setting.
This changed the SendFax behaviour: it followed the setting in res_fax.conf .
But ReceiveFax still ignores it.

The problem is that when the fax transmission starts at higher bitrates, the training succeeds mostly at 14400 or 12000 bps, but when the image transmissions starts, it fails with a T2_TIMEOUT error.
So we would like to force to start negotiating at 9600 if possible. (With Sendfax, we were able to send at 7200 or 9600bps)

Anyone knows why ReceiveFax ignores res_fax.conf and FAXOPT settings ?
Posts: 4
Joined: Sun Feb 07, 2010 8:37 am

Re: Setting FAXOPT(maxrate) ignored by ReceiveFax?

Postby francescos » Wed Mar 03, 2010 3:48 am

Me too, I have the same problem:
Code: Select all
exten => my-fax,n,Set(FAXOPT(maxrate)=9600)

command seems to be ignored both by SendFAX and ReceiveFAX functions. Fax rate negotiation always starts at 14400 bps; and sometimes negotiation is ok at 14400 but we get error during image transmission/reception, so I'd like a lot to be able to force speed down to 9600.

I'm running Free FFA 1.4_1.1.6 under Asterisk 1.4.24, no analog or BRI cards (we are receiving fax via a SIP G.711A trunk from a local VoIP PBX).

Posts: 4
Joined: Mon Jan 18, 2010 6:17 am

Re: Setting FAXOPT(maxrate) ignored by ReceiveFax?

Postby kjohnsoncda » Mon Mar 22, 2010 2:54 pm

I'm expreriencing the same issue. I opened a support ticket, but they stumped on the fact that I was running greater than ( Lame

Application version 1.6.1_1.0.15
t38 driver version: 1.6.1_1.0.11
G.711 driver version: 1.6.1_1.0.11

Calls are coming in over a digium TE210B card with hardware echo cancelation.

Dahdi is version 2.2.1

I'm getting quite a few truncated pages over the fax module, and wanted to try slowing it down to 9600 bps in hopes of getting more reliability.
Posts: 3
Joined: Mon Nov 30, 2009 1:42 pm

Re: Setting FAXOPT(maxrate) ignored by ReceiveFax?

Postby m4t » Wed Apr 20, 2011 8:03 am

Did anyone get to the bottom of this ?

I'm using Digium FAX Driver: (optimized for generic_64) and trying to set my maximum receive rate to 9600 in the same way and faxes are still coming in at 14400
Posts: 2
Joined: Mon Oct 01, 2007 3:04 am

Re: Setting FAXOPT(maxrate) ignored by ReceiveFax?

Postby Wentworth » Mon Aug 29, 2011 1:42 pm

Hello everyone,

Just dropping by to see if anyone has figured this out yet. There is a new thread at but it doesnt look like anyone there has any idea of how to fix this.
Posts: 11
Joined: Wed Aug 24, 2011 9:44 am

Re: Setting FAXOPT(maxrate) ignored by ReceiveFax?

Postby jnankin » Tue Feb 28, 2012 1:10 pm

Just got off the phone with Digium support on this (I have a paid FFA). I was told that occasionally setting the baud rate manually like this does not always work if you are set to emulate all types of modems (V21, V29, V17). Since V17 uses TCM modulation at 12k and 14.4k, you should remove it from your modems list in res_fax.conf to get the lower speeds.

This has worked for me on 1.8.5.
Posts: 3
Joined: Mon Aug 15, 2011 11:03 am

Re: Setting FAXOPT(maxrate) ignored by ReceiveFax?

Postby Wentworth » Tue Jun 19, 2012 8:39 am

Thanks, Jnankin! This worked perfectly for me. I wanted to limit the rate of inbound faxes only, so I did your recommended changes and added

exten => s,n,Set(FAXOPT(modem)=v17,v27,v29)

To my outbound fax context. Everything is working just right now :D
Posts: 11
Joined: Wed Aug 24, 2011 9:44 am

Re: Setting FAXOPT(maxrate) ignored by ReceiveFax?

Postby mwhite41 » Mon Jul 30, 2012 12:07 am

Frustratingly, this issue is causing me to give up on FFA.

We've a great SIP gateway provider that supports inbound faxing, but outbound faxing fails because it's enforcing a max speed of 9600 for T.38 faxes. Asterisk - despite res_fax.conf and dialplan settings to the contrary, seems to want to use 14400 as a fax speed. So we get an incompatibility and the call hangs up.

Interestingly, the above happens for both and; I went into the res_fax.c file to see if I could just remove 14400 as an option from the code and recompiled, but it still showed 14400:

o=root 1634653494 1634653497 IN IP4
s=Asterisk PBX 1.8.11-cert4
c=IN IP4
t=0 0
m=image 4838 udptl t38

Anyway, on suggestion from the provider I tried the same trunks with a basic Freeswitch/mod_spandsp setup, and it worked seamlessly first-time.

So while otherwise an Asterisk fan..... gotta go with what works, annoying as an entirely additional platform is.

Has *anyone* found a working solution to this problem?
Posts: 14
Joined: Tue Sep 01, 2009 7:06 am

Return to Fax For Asterisk

Who is online

Users browsing this forum: No registered users and 1 guest