summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-02-29 18:09:53 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-02-29 18:09:53 -0600
commit5393a4963af1a17c746dbfac544ca81552ecb3a1 (patch)
tree310e76bc67dc2ce88d2a09dda1da709d6fa73736 /main/channel.c
parentdbf52dd7d7cb45584f9742927503ff6cf097cfc0 (diff)
parent221422be50380259e9b40d53bf029e67b9f19cd7 (diff)
Merge "bridge core: Add owed T.38 terminate when channel leaves a bridge." into 13
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 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;
}