diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-02-22 13:54:47 -0600 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-02-29 12:50:19 -0600 |
commit | 221422be50380259e9b40d53bf029e67b9f19cd7 (patch) | |
tree | 955b4e11cf0af1fd23dc23583b9b4bbc9cdc4dc1 /main/channel.c | |
parent | 0a5bc64491b34bca979c151b4996d7eee8fe1bcf (diff) |
bridge core: Add owed T.38 terminate when channel leaves a bridge.
The channel is now going to get T.38 terminated when it leaves the
bridging system and the bridged peers are going to get T.38 terminated as
well.
ASTERISK-25582
Change-Id: I77a9205979910210e3068e1ddff400dbf35c4ca7
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c index de7c19cc5..4ed1f8b8a 100644 --- a/main/channel.c +++ b/main/channel.c @@ -4479,6 +4479,7 @@ static int indicate_data_internal(struct ast_channel *chan, int _condition, cons * in switch statements. */ enum ast_control_frame_type condition = _condition; struct ast_tone_zone_sound *ts = NULL; + const struct ast_control_t38_parameters *t38_parameters; int res; switch (condition) { @@ -4498,6 +4499,22 @@ static int indicate_data_internal(struct ast_channel *chan, int _condition, cons case AST_CONTROL_UNHOLD: ast_channel_hold_state_set(chan, _condition); break; + case AST_CONTROL_T38_PARAMETERS: + t38_parameters = data; + switch (t38_parameters->request_response) { + case AST_T38_REQUEST_NEGOTIATE: + case AST_T38_NEGOTIATED: + ast_channel_set_is_t38_active_nolock(chan, 1); + break; + case AST_T38_REQUEST_TERMINATE: + case AST_T38_TERMINATED: + case AST_T38_REFUSED: + ast_channel_set_is_t38_active_nolock(chan, 0); + break; + default: + break; + } + break; default: break; } |