FS-9855: [mod_spandsp] Refused T38 reinvite on b-leg breaks T38 negotiation on a-leg when using T38 gateway mode #resolve

This commit is contained in:
Brian West
2017-01-05 15:51:52 -06:00
parent 62e2928889
commit f54c7f9f34
8 changed files with 97 additions and 22 deletions
+5 -10
View File
@@ -6770,7 +6770,7 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
const char *r_sdp = NULL;
switch_core_session_message_t *msg;
private_object_t *other_tech_pvt = switch_core_session_get_private(other_session);
switch_channel_t *other_channel = switch_core_session_get_channel(other_session);
//switch_channel_t *other_channel = switch_core_session_get_channel(other_session);
if (sip->sip_payload && sip->sip_payload->pl_data &&
sip->sip_content_type && sip->sip_content_type->c_subtype && switch_stristr("sdp", sip->sip_content_type->c_subtype)) {
@@ -6799,13 +6799,8 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
switch_core_session_rwunlock(other_session);
goto end;
} else if (status > 299) {
switch_channel_set_private(channel, "t38_options", NULL);
switch_channel_set_private(other_channel, "t38_options", NULL);
switch_channel_clear_flag(channel, CF_T38_PASSTHRU);
switch_channel_clear_flag(other_channel, CF_T38_PASSTHRU);
switch_channel_clear_app_flag_key("T38", channel, CF_APP_T38);
switch_channel_clear_app_flag_key("T38", channel, CF_APP_T38_REQ);
switch_channel_set_app_flag_key("T38", channel, CF_APP_T38_FAIL);
switch_core_media_reset_t38(session);
switch_core_media_reset_t38(other_session);
} else if (status == 200 && switch_channel_test_flag(channel, CF_T38_PASSTHRU) &&
has_t38 && sip->sip_payload && sip->sip_payload->pl_data) {
switch_t38_options_t *t38_options = switch_core_media_extract_t38_options(session, sip->sip_payload->pl_data);
@@ -8127,8 +8122,8 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
goto done;
}
switch_channel_set_flag(tech_pvt->channel, CF_REINVITE);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Reinvite Codec Error!\n");
switch_channel_clear_flag(tech_pvt->channel, CF_REINVITE);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Reinvite resulted in codec negotiation failure.\n");
is_ok = 0;
}
}