diff --git a/bridges/bridge_native_rtp.c b/bridges/bridge_native_rtp.c
index a6addf2711..b998e345b6 100644
--- a/bridges/bridge_native_rtp.c
+++ b/bridges/bridge_native_rtp.c
@@ -876,7 +876,8 @@ static struct ast_stream_topology *native_rtp_request_stream_topology_update(
 		stream = ast_stream_topology_get_stream(existing_topology, i);
 
 		if (ast_stream_get_type(stream) != AST_MEDIA_TYPE_AUDIO ||
-			ast_stream_get_state(stream) == AST_STREAM_STATE_REMOVED) {
+			ast_stream_get_state(stream) == AST_STREAM_STATE_REMOVED ||
+			!ast_stream_get_formats(stream)) {
 			continue;
 		}
 
@@ -886,6 +887,8 @@ static struct ast_stream_topology *native_rtp_request_stream_topology_update(
 
 	if (audio_formats) {
 		for (i = 0; i < ast_stream_topology_get_count(new_topology); ++i) {
+			struct ast_format_cap *joint;
+
 			stream = ast_stream_topology_get_stream(new_topology, i);
 
 			if (ast_stream_get_type(stream) != AST_MEDIA_TYPE_AUDIO ||
@@ -893,8 +896,19 @@ static struct ast_stream_topology *native_rtp_request_stream_topology_update(
 				continue;
 			}
 
-			ast_format_cap_append_from_cap(ast_stream_get_formats(stream), audio_formats,
-				AST_MEDIA_TYPE_AUDIO);
+			joint = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT);
+			if (!joint) {
+				continue;
+			}
+
+			if (ast_stream_get_formats(stream)) {
+				ast_format_cap_append_from_cap(joint, ast_stream_get_formats(stream),
+					AST_MEDIA_TYPE_AUDIO);
+			}
+
+			ast_format_cap_append_from_cap(joint, audio_formats, AST_MEDIA_TYPE_AUDIO);
+			ast_stream_set_formats(stream, joint);
+			ao2_ref(joint, -1);
 		}
 	}
 
diff --git a/bridges/bridge_simple.c b/bridges/bridge_simple.c
index 545b3ad1cb..7d5c801ee0 100644
--- a/bridges/bridge_simple.c
+++ b/bridges/bridge_simple.c
@@ -80,7 +80,8 @@ static struct ast_stream_topology *simple_bridge_request_stream_topology_update(
 		stream = ast_stream_topology_get_stream(existing_topology, i);
 
 		if (ast_stream_get_type(stream) != AST_MEDIA_TYPE_AUDIO ||
-			ast_stream_get_state(stream) == AST_STREAM_STATE_REMOVED) {
+			ast_stream_get_state(stream) == AST_STREAM_STATE_REMOVED ||
+			!ast_stream_get_formats(stream)) {
 			continue;
 		}
 
@@ -90,6 +91,8 @@ static struct ast_stream_topology *simple_bridge_request_stream_topology_update(
 
 	if (audio_formats) {
 		for (i = 0; i < ast_stream_topology_get_count(new_topology); ++i) {
+			struct ast_format_cap *joint;
+
 			stream = ast_stream_topology_get_stream(new_topology, i);
 
 			if (ast_stream_get_type(stream) != AST_MEDIA_TYPE_AUDIO ||
@@ -97,8 +100,19 @@ static struct ast_stream_topology *simple_bridge_request_stream_topology_update(
 				continue;
 			}
 
-			ast_format_cap_append_from_cap(ast_stream_get_formats(stream), audio_formats,
-				AST_MEDIA_TYPE_AUDIO);
+			joint = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT);
+			if (!joint) {
+				continue;
+			}
+
+			if (ast_stream_get_formats(stream)) {
+				ast_format_cap_append_from_cap(joint, ast_stream_get_formats(stream),
+					AST_MEDIA_TYPE_AUDIO);
+			}
+
+			ast_format_cap_append_from_cap(joint, audio_formats, AST_MEDIA_TYPE_AUDIO);
+			ast_stream_set_formats(stream, joint);
+			ao2_ref(joint, -1);
 		}
 	}
 
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index 83ba6f508f..502d7c8e4b 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -1067,11 +1067,14 @@ static int handle_negotiated_sdp(struct ast_sip_session *session, const pjmedia_
 	if (topology) {
 		ast_channel_set_stream_topology(session->channel, topology);
 		/* If this is a remotely done renegotiation that has changed the stream topology notify what is
-		 * currently handling this channel.
+		 * currently handling this channel. Note that fax uses its own process, so if we are transitioning
+		 * between audio and fax or vice versa we don't notify.
 		 */
 		if (pjmedia_sdp_neg_was_answer_remote(session->inv_session->neg) == PJ_FALSE &&
 			session->active_media_state && session->active_media_state->topology &&
-			!ast_stream_topology_equal(session->active_media_state->topology, topology)) {
+			!ast_stream_topology_equal(session->active_media_state->topology, topology) &&
+			!session->active_media_state->default_session[AST_MEDIA_TYPE_IMAGE] &&
+			!session->pending_media_state->default_session[AST_MEDIA_TYPE_IMAGE]) {
 			changed = 2;
 		}
 	}
@@ -2047,6 +2050,7 @@ static pj_bool_t session_reinvite_on_rx_request(pjsip_rx_data *rdata)
 	pjsip_dialog *dlg;
 	RAII_VAR(struct ast_sip_session *, session, NULL, ao2_cleanup);
 	pjsip_rdata_sdp_info *sdp_info;
+	int deferred;
 
 	if (rdata->msg_info.msg->line.req.method.id != PJSIP_INVITE_METHOD ||
 		!(dlg = pjsip_ua_find_dialog(&rdata->msg_info.cid->id, &rdata->msg_info.to->tag, &rdata->msg_info.from->tag, PJ_FALSE)) ||
@@ -2136,7 +2140,11 @@ static pj_bool_t session_reinvite_on_rx_request(pjsip_rx_data *rdata)
 		return PJ_FALSE;
 	}
 
-	if (!sdp_requires_deferral(session, sdp_info->sdp)) {
+	deferred = sdp_requires_deferral(session, sdp_info->sdp);
+	if (deferred == -1) {
+		ast_sip_session_media_state_reset(session->pending_media_state);
+		return PJ_FALSE;
+	} else if (!deferred) {
 		return PJ_FALSE;
 	}
 
@@ -4334,6 +4342,7 @@ static void session_inv_on_rx_offer(pjsip_inv_session *inv, const pjmedia_sdp_se
 
 	session = inv->mod_data[session_module.id];
 	if (handle_incoming_sdp(session, offer)) {
+		ast_sip_session_media_state_reset(session->pending_media_state);
 		return;
 	}
 
@@ -4412,7 +4421,9 @@ static void session_inv_on_media_update(pjsip_inv_session *inv, pj_status_t stat
 		return;
 	}
 
-	handle_negotiated_sdp(session, local, remote);
+	if (handle_negotiated_sdp(session, local, remote)) {
+		ast_sip_session_media_state_reset(session->pending_media_state);
+	}
 }
 
 static pjsip_redirect_op session_inv_on_redirected(pjsip_inv_session *inv, const pjsip_uri *target, const pjsip_event *e)
