aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-03 15:21:52 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-03 15:21:52 +0000
commit22205bfee603bf997fd3087b6c71f25283925eda (patch)
tree34c1e9ac8272f8d95b92b41f8d126cdc100d9c82 /res
parentcd66a6b62b01e21e05657696c6933e547e40c427 (diff)
Print a DEBUG message instead of a WARNING message when the selected fax tech does not support reserving sessions.
Answer the channel before quering it for t.38 support. This is necessary for the query to work properly over local channels. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@297495 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_fax.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/res/res_fax.c b/res/res_fax.c
index 3e878d577..bfd4a51ab 100644
--- a/res/res_fax.c
+++ b/res/res_fax.c
@@ -714,7 +714,7 @@ static struct ast_fax_session *fax_session_reserve(struct ast_fax_session_detail
}
if (!s->tech->reserve_session) {
- ast_log(LOG_WARNING, "Selected FAX technology module (%s) does not support reserving sessions.\n", s->tech->description);
+ ast_debug(1, "Selected FAX technology module (%s) does not support reserving sessions.\n", s->tech->description);
return s;
}
@@ -1614,14 +1614,6 @@ static int receivefax_exec(struct ast_channel *chan, const char *data)
details->option.allow_audio = AST_FAX_OPTFLAG_TRUE;
}
- if (set_fax_t38_caps(chan, details)) {
- ast_string_field_set(details, error, "T38_NEG_ERROR");
- ast_string_field_set(details, resultstr, "error negotiating T.38");
- set_channel_variables(chan, details);
- ao2_ref(details, -1);
- return -1;
- }
-
if (!(s = fax_session_reserve(details))) {
ast_string_field_set(details, resultstr, "error reserving fax session");
set_channel_variables(chan, details);
@@ -1642,6 +1634,15 @@ static int receivefax_exec(struct ast_channel *chan, const char *data)
}
}
+ if (set_fax_t38_caps(chan, details)) {
+ ast_string_field_set(details, error, "T38_NEG_ERROR");
+ ast_string_field_set(details, resultstr, "error negotiating T.38");
+ set_channel_variables(chan, details);
+ ao2_ref(s, -1);
+ ao2_ref(details, -1);
+ return -1;
+ }
+
if (details->caps & AST_FAX_TECH_T38) {
if (receivefax_t38_init(chan, details)) {
ast_string_field_set(details, error, "T38_NEG_ERROR");
@@ -2088,14 +2089,6 @@ static int sendfax_exec(struct ast_channel *chan, const char *data)
details->option.request_t38 = AST_FAX_OPTFLAG_TRUE;
}
- if (set_fax_t38_caps(chan, details)) {
- ast_string_field_set(details, error, "T38_NEG_ERROR");
- ast_string_field_set(details, resultstr, "error negotiating T.38");
- set_channel_variables(chan, details);
- ao2_ref(details, -1);
- return -1;
- }
-
if (!(s = fax_session_reserve(details))) {
ast_string_field_set(details, resultstr, "error reserving fax session");
set_channel_variables(chan, details);
@@ -2116,6 +2109,15 @@ static int sendfax_exec(struct ast_channel *chan, const char *data)
}
}
+ if (set_fax_t38_caps(chan, details)) {
+ ast_string_field_set(details, error, "T38_NEG_ERROR");
+ ast_string_field_set(details, resultstr, "error negotiating T.38");
+ set_channel_variables(chan, details);
+ ao2_ref(s, -1);
+ ao2_ref(details, -1);
+ return -1;
+ }
+
if (details->caps & AST_FAX_TECH_T38) {
if (sendfax_t38_init(chan, details)) {
ast_string_field_set(details, error, "T38_NEG_ERROR");