[asterisk-commits] bridging: Ensure successful T.38 negotation (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 12 15:34:28 CDT 2017


Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5459 )

Change subject: bridging:  Ensure successful T.38 negotation
......................................................................


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
---
M bridges/bridge_simple.c
1 file changed, 13 insertions(+), 0 deletions(-)

Approvals:
  George Joseph: Looks good to me, approved
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/bridges/bridge_simple.c b/bridges/bridge_simple.c
index fc12bd1..22089aa 100644
--- a/bridges/bridge_simple.c
+++ b/bridges/bridge_simple.c
@@ -58,6 +58,19 @@
 		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, &parameters, 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, &parameters, sizeof(parameters));
+	}
+
 	return ast_channel_make_compatible(c0, c1);
 }
 

-- 
To view, visit https://gerrit.asterisk.org/5459
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If334125ee61ed63550d242fc9efe7987e37e1d94
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Torrey Searle <tsearle at gmail.com>



More information about the asterisk-commits mailing list