summaryrefslogtreecommitdiff
path: root/res/res_fax.c
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2015-04-29 13:05:10 -0500
committerKevin Harwell <kharwell@digium.com>2015-04-29 15:39:11 -0500
commit5d0c1828858e2e1a16700a4871ae2cee4672dd8b (patch)
treeea7b3f20ccffe434700819c0da7c4bca4de4ea4f /res/res_fax.c
parent57cbb4bc8dda4cf4939f029e60290e3335a82c05 (diff)
res_fax: allow 2400 transmission rate according to v.27ter standard
A previous set of patches (see: ASTERISK-22790 & ASTERISK-23231) made it so a v.27 modem was not allowed to have a minimum transmission rate of 2400 bits per second. This reverts all or some of those patches since according to the v.27ter standard a rate of 2400 bits per second is also supported. One of the original patches also added 9600 bits per second support for v.27. This patch also removes that since v.27ter only supports 2400/4800 bits per second. Also, since Asterisk specifically supports v.27ter the enum was renamed to better reflect this. ASTERISK-24955 #close Reported by: Matt Jordan Change-Id: I4b9dfb6bf7eff08463ab47ee1a74224f27cae733
Diffstat (limited to 'res/res_fax.c')
-rw-r--r--res/res_fax.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/res/res_fax.c b/res/res_fax.c
index 39cb3b369..29ec315f7 100644
--- a/res/res_fax.c
+++ b/res/res_fax.c
@@ -523,7 +523,7 @@ static AST_RWLIST_HEAD_STATIC(faxmodules, fax_module);
#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)
+#define RES_FAX_MODEM (AST_FAX_MODEM_V17 | AST_FAX_MODEM_V27TER | AST_FAX_MODEM_V29)
#define RES_FAX_T38TIMEOUT 5000
struct fax_options {
@@ -828,7 +828,7 @@ static int update_modem_bits(enum ast_fax_modems *bits, const char *value)
if (!strcasecmp(m[j], "v17")) {
*bits |= AST_FAX_MODEM_V17;
} else if (!strcasecmp(m[j], "v27")) {
- *bits |= AST_FAX_MODEM_V27;
+ *bits |= AST_FAX_MODEM_V27TER;
} else if (!strcasecmp(m[j], "v29")) {
*bits |= AST_FAX_MODEM_V29;
} else if (!strcasecmp(m[j], "v34")) {
@@ -907,7 +907,7 @@ static int ast_fax_modem_to_str(enum ast_fax_modems bits, char *tbuf, size_t buf
strcat(tbuf, "V17");
count++;
}
- if (bits & AST_FAX_MODEM_V27) {
+ if (bits & AST_FAX_MODEM_V27TER) {
if (count) {
strcat(tbuf, ",");
}
@@ -936,22 +936,14 @@ static int check_modem_rate(enum ast_fax_modems modems, unsigned int rate)
{
switch (rate) {
case 2400:
- if (!(modems & (AST_FAX_MODEM_V34))) {
- return 1;
- }
- break;
case 4800:
- if (!(modems & (AST_FAX_MODEM_V27 | AST_FAX_MODEM_V34))) {
+ if (!(modems & (AST_FAX_MODEM_V27TER | AST_FAX_MODEM_V34))) {
return 1;
}
break;
case 7200:
- 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))) {
+ if (!(modems & (AST_FAX_MODEM_V17 | AST_FAX_MODEM_V29 | AST_FAX_MODEM_V34))) {
return 1;
}
break;