summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-02-22 13:54:47 -0600
committerRichard Mudgett <rmudgett@digium.com>2016-02-29 12:50:43 -0600
commitc7d45b84f98e5f235d7b33478371dd010dd6973a (patch)
treedc2f08cc099f1cc9996fd1dd6e43157547571523 /main/channel.c
parent0e296563d784b08b83a1e63c9068b5a6fc6135ef (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.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index f9addb016..852de1aef 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;
}