mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
res_fax: check_modem_rate() returned incorrect rate for V.27
According to the new standard for V.27 and V.32 they are able to transmit
at a bit rate of 4,800 or 9,600. The check_mode_rate function needed to be
updated to reflect this. Also, because of this change the default 'minrate'
value was updated to be 4800.
(closes issue ASTERISK-22790)
Reported by: Paolo Compagnini
Patches:
res_fax.txt uploaded by looserouting (license 6548)
........
Merged revisions 405656 from http://svn.asterisk.org/svn/asterisk/branches/1.8
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -323,7 +323,7 @@ struct fax_module {
|
||||
};
|
||||
static AST_RWLIST_HEAD_STATIC(faxmodules, fax_module);
|
||||
|
||||
#define RES_FAX_MINRATE 2400
|
||||
#define RES_FAX_MINRATE 4800
|
||||
#define RES_FAX_MAXRATE 14400
|
||||
#define RES_FAX_STATUSEVENTS 0
|
||||
#define RES_FAX_MODEM (AST_FAX_MODEM_V17 | AST_FAX_MODEM_V27 | AST_FAX_MODEM_V29)
|
||||
@@ -704,7 +704,7 @@ static int check_modem_rate(enum ast_fax_modems modems, unsigned int rate)
|
||||
{
|
||||
switch (rate) {
|
||||
case 2400:
|
||||
if (!(modems & (AST_FAX_MODEM_V27 | AST_FAX_MODEM_V34))) {
|
||||
if (!(modems & (AST_FAX_MODEM_V34))) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
@@ -714,11 +714,15 @@ static int check_modem_rate(enum ast_fax_modems modems, unsigned int rate)
|
||||
}
|
||||
break;
|
||||
case 7200:
|
||||
case 9600:
|
||||
if (!(modems & (AST_FAX_MODEM_V17 | AST_FAX_MODEM_V29 | AST_FAX_MODEM_V34))) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 9600:
|
||||
if (!(modems & (AST_FAX_MODEM_V17 | AST_FAX_MODEM_V27 | AST_FAX_MODEM_V29 | AST_FAX_MODEM_V34))) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case 12000:
|
||||
case 14400:
|
||||
if (!(modems & (AST_FAX_MODEM_V17 | AST_FAX_MODEM_V34))) {
|
||||
|
||||
Reference in New Issue
Block a user