From 221422be50380259e9b40d53bf029e67b9f19cd7 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Mon, 22 Feb 2016 13:54:47 -0600 Subject: 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 --- main/channel.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'main/channel.c') 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; } -- cgit v1.2.3