[Asterisk-code-review] res pjsip t38.c: Back out part of an earlier fix attempt. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Tue Mar 1 06:00:36 CST 2016


Joshua Colp has submitted this change and it was merged.

Change subject: res_pjsip_t38.c: Back out part of an earlier fix attempt.
......................................................................


res_pjsip_t38.c: Back out part of an earlier fix attempt.

This backs out item 4 of the 4875e5ac32f5ccad51add6a4216947bfb385245d
commit.  Item 4 added the t38_bye_supplement.  Unfortunately, the frame
that it puts into the bridge may or may not be processed by the time the
bridged peer is kicked out of the bridge.  If it is processed then all is
well.  However, if it is not processed then that channel is stuck in fax
mode until it hangs up or maybe if it joins another bridge for T.38
faxing.

ASTERISK-25582

Change-Id: Ib20a03ecadf1bf8a0dcadfadf6c2f2e60919a9f7
---
M res/res_pjsip_t38.c
1 file changed, 0 insertions(+), 41 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, approved
  Joshua Colp: Looks good to me, but someone else must approve; Verified



diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c
index 2bb6f03..c025171 100644
--- a/res/res_pjsip_t38.c
+++ b/res/res_pjsip_t38.c
@@ -570,41 +570,6 @@
 	.outgoing_request = t38_outgoing_invite_request,
 };
 
-static int t38_incoming_bye_request(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
-{
-	struct ast_datastore *datastore;
-	struct ast_sip_session_media *session_media;
-
-	if (!session->channel) {
-		return 0;
-	}
-
-	datastore = ast_sip_session_get_datastore(session, "t38");
-	if (!datastore) {
-		return 0;
-	}
-
-	session_media = ao2_find(session->media, "image", OBJ_KEY);
-	if (!session_media) {
-		ao2_ref(datastore, -1);
-		return 0;
-	}
-
-	t38_change_state(session, session_media, datastore->data, T38_REJECTED);
-
-	ao2_ref(datastore, -1);
-	ao2_ref(session_media, -1);
-
-	return 0;
-}
-
-/*! \brief Supplement for handling a remote termination of T.38 state */
-static struct ast_sip_session_supplement t38_bye_supplement = {
-	.method = "BYE",
-	.priority = AST_SIP_SUPPLEMENT_PRIORITY_CHANNEL + 1,
-	.incoming_request = t38_incoming_bye_request,
-};
-
 /*! \brief Parse a T.38 image stream and store the attribute information */
 static void t38_interpret_sdp(struct t38_state *state, struct ast_sip_session *session, struct ast_sip_session_media *session_media,
 	const struct pjmedia_sdp_media *stream)
@@ -935,7 +900,6 @@
 {
 	ast_sip_session_unregister_sdp_handler(&image_sdp_handler, "image");
 	ast_sip_session_unregister_supplement(&t38_supplement);
-	ast_sip_session_unregister_supplement(&t38_bye_supplement);
 
 	return 0;
 }
@@ -959,11 +923,6 @@
 
 	if (ast_sip_session_register_supplement(&t38_supplement)) {
 		ast_log(LOG_ERROR, "Unable to register T.38 session supplement\n");
-		goto end;
-	}
-
-	if (ast_sip_session_register_supplement(&t38_bye_supplement)) {
-		ast_log(LOG_ERROR, "Unable to register T.38 BYE session supplement\n");
 		goto end;
 	}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib20a03ecadf1bf8a0dcadfadf6c2f2e60919a9f7
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-code-review mailing list