]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_fax: Warn that minrate=2400 is not valid for V.27 instead of failing load.
authorCorey Farrell <git@cfware.com>
Thu, 27 Feb 2014 16:03:56 +0000 (16:03 +0000)
committerCorey Farrell <git@cfware.com>
Thu, 27 Feb 2014 16:03:56 +0000 (16:03 +0000)
Change minrate from 2400 to 4800 on config reload in response to changes from
ASTERISK-22790 only.  Any config with minrate of 2400 that would fail before
r405693 will still fail.

Comment out many settings in res_fax.conf.sample. The defaults are set in
res_fax.c, so setting the same value in sample config does nothing but make
the sample config more fragile.

(closes issue ASTERISK-23231)
Reported by: David Brillert
Review: https://reviewboard.asterisk.org/r/3261/
........

Merged revisions 409052 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409053 65c4cc65-6c06-0410-ace0-fbb531ad65f3

configs/res_fax.conf.sample
res/res_fax.c

index 47ea35e04453578577f4a4e3b0094cf7cb5dcc78..dfaa4ce93bddbfb405e8133e176debc0776fe645 100644 (file)
@@ -4,12 +4,12 @@
 ; Maximum Transmission Rate
 ; Possible values are { 2400 | 4800 | 7200 | 9600 | 12000 | 14400 }
 ; Set this value to the maximum desired transfer rate.  Default: 14400
-maxrate=14400
+;maxrate=14400
 
 ; Minimum Transmission Rate
 ; Possible values are { 2400 | 4800 | 7200 | 9600 | 12000 | 14400 }
 ; Set this value to the minimum desired transfer rate.  Default: 4800
-minrate=4800
+;minrate=4800
 
 ; Send Progress/Status events to manager session
 ; Manager events with 'call' class permissions will receive events indicating the
@@ -21,8 +21,8 @@ statusevents=yes
 ; modem capabilities
 ; Possible values are { v17 | v27 | v29 }
 ; Set this value to modify the default modem options.  Default: v17,v27,v29
-modems=v17,v27,v29
+;modems=v17,v27,v29
 
 ; Enable/disable T.30 ECM (error correction mode) by default.
 ; Default: Enabled
-ecm=yes
+;ecm=yes
index 853bfb4653d6233d32c44f7312598f1b4d730130..080233b897a9a6b1856d0aa1894d8be70a001cbf 100644 (file)
@@ -3883,6 +3883,13 @@ static int set_config(int reload)
                goto end;
        }
 
+       if (options.minrate == 2400 && (options.modems & AST_FAX_MODEM_V27) && !(options.modems & (AST_FAX_MODEM_V34))) {
+               ast_fax_modem_to_str(options.modems, modems, sizeof(modems));
+               ast_log(LOG_WARNING, "'modems' setting '%s' is no longer accepted with 'minrate' setting %d\n", modems, options.minrate);
+               ast_log(LOG_WARNING, "'minrate' has been reset to 4800, please update res_fax.conf.\n");
+               options.minrate = 4800;
+       }
+
        if (check_modem_rate(options.modems, options.minrate)) {
                ast_fax_modem_to_str(options.modems, modems, sizeof(modems));
                ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'minrate' setting %d\n", modems, options.minrate);