mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
When a error in T.38 negotiation happens or its rejected on a channel the
state of the channel reverts to unknown this should be rejected. this is important for negotiating T.38 gateway see #13405 This patch adds a option T38_REJECTED that behaves as T38_DISABLED except it reports state rejected. Trivial Change to res_fax to honnor UNAVAILABLE and REJECTED states. (closes issue #18889) Reported by: irroot Tested by: irroot, darkbasic, mnicholson Review: https://reviewboard.asterisk.org/r/1115 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -991,6 +991,7 @@ static int set_fax_t38_caps(struct ast_channel *chan, struct ast_fax_session_det
|
||||
case T38_STATE_UNKNOWN:
|
||||
details->caps |= AST_FAX_TECH_T38;
|
||||
break;
|
||||
case T38_STATE_REJECTED:
|
||||
case T38_STATE_UNAVAILABLE:
|
||||
details->caps |= AST_FAX_TECH_AUDIO;
|
||||
break;
|
||||
@@ -1510,6 +1511,7 @@ static int receivefax_exec(struct ast_channel *chan, const char *data)
|
||||
);
|
||||
struct ast_flags opts = { 0, };
|
||||
struct manager_event_info info;
|
||||
enum ast_t38_state t38state;
|
||||
|
||||
/* initialize output channel variables */
|
||||
pbx_builtin_setvar_helper(chan, "FAXSTATUS", "FAILED");
|
||||
@@ -1631,7 +1633,8 @@ static int receivefax_exec(struct ast_channel *chan, const char *data)
|
||||
details->option.statusevents = AST_FAX_OPTFLAG_TRUE;
|
||||
}
|
||||
|
||||
if ((ast_channel_get_t38_state(chan) == T38_STATE_UNAVAILABLE) ||
|
||||
t38state = ast_channel_get_t38_state(chan);
|
||||
if ((t38state == T38_STATE_UNAVAILABLE) || (t38state == T38_STATE_REJECTED) ||
|
||||
ast_test_flag(&opts, OPT_ALLOWAUDIO) ||
|
||||
ast_test_flag(&opts, OPT_FORCE_AUDIO)) {
|
||||
details->option.allow_audio = AST_FAX_OPTFLAG_TRUE;
|
||||
@@ -1972,6 +1975,7 @@ static int sendfax_exec(struct ast_channel *chan, const char *data)
|
||||
);
|
||||
struct ast_flags opts = { 0, };
|
||||
struct manager_event_info info;
|
||||
enum ast_t38_state t38state;
|
||||
|
||||
/* initialize output channel variables */
|
||||
pbx_builtin_setvar_helper(chan, "FAXSTATUS", "FAILED");
|
||||
@@ -2112,7 +2116,8 @@ static int sendfax_exec(struct ast_channel *chan, const char *data)
|
||||
details->option.statusevents = AST_FAX_OPTFLAG_TRUE;
|
||||
}
|
||||
|
||||
if ((ast_channel_get_t38_state(chan) == T38_STATE_UNAVAILABLE) ||
|
||||
t38state = ast_channel_get_t38_state(chan);
|
||||
if ((t38state == T38_STATE_UNAVAILABLE) || (t38state == T38_STATE_REJECTED) ||
|
||||
ast_test_flag(&opts, OPT_ALLOWAUDIO) ||
|
||||
ast_test_flag(&opts, OPT_FORCE_AUDIO)) {
|
||||
details->option.allow_audio = AST_FAX_OPTFLAG_TRUE;
|
||||
|
Reference in New Issue
Block a user