diff options
author | Torrey Searle <torrey@voxbone.com> | 2017-04-05 13:41:29 +0200 |
---|---|---|
committer | Torrey Searle <torrey@voxbone.com> | 2017-04-06 16:23:51 +0200 |
commit | 3e7c396a51b240088c475dd53e7bac9869376129 (patch) | |
tree | 72903ddbc50636d8c6c12f0c3a29c6503e8b2969 /bridges | |
parent | 6906765381e221fea6426510665ab227e87e4486 (diff) |
bridging: Ensure successful T.38 negotation
When a T.38 happens immediatly after call establishment, the control
frame can be lost because the other leg is not yet in the bridge.
This patch detects this case an makes sure T.38 negotation happens
when the 2nd leg is being made compatible with the negotating
first leg
ASTERISK-26923 #close
Change-Id: If334125ee61ed63550d242fc9efe7987e37e1d94
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/bridge_simple.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bridges/bridge_simple.c b/bridges/bridge_simple.c index 570453500..9a04cc3c9 100644 --- a/bridges/bridge_simple.c +++ b/bridges/bridge_simple.c @@ -58,6 +58,19 @@ static int simple_bridge_join(struct ast_bridge *bridge, struct ast_bridge_chann return 0; } + /* Request resend of T.38 negotiation if in progress and the other leg not yet T.38 + */ + if (ast_channel_get_t38_state(c0) == T38_STATE_NEGOTIATING && ast_channel_get_t38_state(c1) == T38_STATE_UNKNOWN) { + struct ast_control_t38_parameters parameters = { .request_response = AST_T38_REQUEST_PARMS, }; + ast_debug(3, "Sending T.38 param renegotiation to first channel %s.\n", ast_channel_name(c0)); + ast_indicate_data(c0, AST_CONTROL_T38_PARAMETERS, ¶meters, sizeof(parameters)); + } + if (ast_channel_get_t38_state(c1) == T38_STATE_NEGOTIATING && ast_channel_get_t38_state(c0) == T38_STATE_UNKNOWN) { + struct ast_control_t38_parameters parameters = { .request_response = AST_T38_REQUEST_PARMS, }; + ast_debug(3, "Sending T.38 param renegotiation to second channel %s.\n", ast_channel_name(c1)); + ast_indicate_data(c1, AST_CONTROL_T38_PARAMETERS, ¶meters, sizeof(parameters)); + } + return ast_channel_make_compatible(c0, c1); } |