FS-6446 --resolve

This commit is contained in:
Anthony Minessale 2014-05-27 20:39:53 +05:00
parent 48483452d2
commit 7c2b4381cf
1 changed files with 7 additions and 5 deletions

View File

@ -5464,10 +5464,8 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
tech_pvt->mparams.last_sdp_str = NULL;
if (sip->sip_payload && sip->sip_payload->pl_data) {
switch_core_media_set_sdp_codec_string(session, sip->sip_payload->pl_data, SDP_TYPE_RESPONSE);
if (!sofia_use_soa(tech_pvt)) {
tech_pvt->mparams.last_sdp_str = switch_core_session_strdup(session, sip->sip_payload->pl_data);
}
tech_pvt->mparams.last_sdp_str = switch_core_session_strdup(session, sip->sip_payload->pl_data);
}
@ -6152,7 +6150,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
}
}
if (status > 100 && status < 300 && tech_pvt && !sofia_use_soa(tech_pvt) && !r_sdp && tech_pvt->mparams.last_sdp_str) {
if (tech_pvt && (status > 100 || switch_channel_test_flag(channel, CF_ANSWERED)) && status < 300 && !r_sdp && tech_pvt->mparams.last_sdp_str) {
r_sdp = tech_pvt->mparams.last_sdp_str;
}
@ -8193,9 +8191,11 @@ void sofia_handle_sip_i_reinvite(switch_core_session_t *session,
{
char *call_info = NULL;
switch_channel_t *channel = NULL;
private_object_t *tech_pvt = NULL;
if (session) {
channel = switch_core_session_get_channel(session);
tech_pvt = switch_core_session_get_private(session);
}
if (session && profile && sip && sofia_test_pflag(profile, PFLAG_TRACK_CALLS)) {
@ -8236,8 +8236,10 @@ void sofia_handle_sip_i_reinvite(switch_core_session_t *session,
}
if (channel) {
tech_pvt->mparams.last_sdp_str = NULL;
if (sip->sip_payload && sip->sip_payload->pl_data) {
switch_channel_set_variable(channel, "sip_reinvite_sdp", sip->sip_payload->pl_data);
tech_pvt->mparams.last_sdp_str = switch_core_session_strdup(session, sip->sip_payload->pl_data);
}
switch_channel_execute_on(channel, "execute_on_sip_reinvite");
}