diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 482e6a3e7f121f8b2fb402e2ac71c5436f42d85f..0d898556bed47756a08d942ce0f2ccec4d431b0e 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -32441,6 +32441,19 @@ static enum ast_rtp_glue_result sip_get_rtp_peer(struct ast_channel *chan, struc
 		res = AST_RTP_GLUE_RESULT_FORBID;
 	}
 
+	if (ast_test_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT)) {
+		switch (p->t38.state) {
+		case T38_LOCAL_REINVITE:
+		case T38_PEER_REINVITE:
+		case T38_ENABLED:
+			res = AST_RTP_GLUE_RESULT_LOCAL;
+			break;
+		case T38_REJECTED:
+		default:
+			break;
+		}
+	}
+
 	if (p->srtp) {
 		res = AST_RTP_GLUE_RESULT_FORBID;
 	}