]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6446 regression fixed
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 3 Jun 2014 00:09:48 +0000 (19:09 -0500)
committerBrian West <brian@freeswitch.org>
Tue, 3 Jun 2014 00:09:48 +0000 (19:09 -0500)
src/include/switch_core_media.h
src/mod/endpoints/mod_sofia/sofia.c

index 043bbbce44605e4d763a46fa91add128593cafc5..312937756e03aaf092f3804cd59952e8a240b9ce 100644 (file)
@@ -106,6 +106,7 @@ typedef struct switch_core_media_params_s {
        char *early_sdp;
        char *local_sdp_str;
        char *last_sdp_str;
+       char *last_sdp_response;
 
        char *stun_ip;
        switch_port_t stun_port;
index d0c9556d09c8aac3b8545eef64446c887d21d5da..9484c50ce08194d751b5a591472c157a961a9036 100644 (file)
@@ -5485,14 +5485,12 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
                        caller_profile->network_addr = switch_core_strdup(caller_profile->pool, network_ip);
                }
 
-               tech_pvt->mparams.last_sdp_str = NULL;
+               tech_pvt->mparams.last_sdp_response = 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);
-
-                       tech_pvt->mparams.last_sdp_str = switch_core_session_strdup(session, sip->sip_payload->pl_data);
+                       tech_pvt->mparams.last_sdp_response = switch_core_session_strdup(session, sip->sip_payload->pl_data);
                }
 
-
                if (status > 299 && switch_channel_test_app_flag_key("T38", tech_pvt->channel, CF_APP_T38_REQ)) {
                        switch_channel_set_private(channel, "t38_options", NULL);
                        switch_channel_clear_app_flag_key("T38", tech_pvt->channel, CF_APP_T38);
@@ -6174,10 +6172,15 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                }
        }
 
+       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "[%s][%d]\n%s\n",
+                                         nua_callstate_name(ss_state), status, r_sdp);
+
        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;
        }
 
+       tech_pvt->mparams.last_sdp_str = NULL;
+
        if ((channel && (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA))) ||
                (sofia_test_flag(profile, TFLAG_INB_NOMEDIA) || sofia_test_flag(profile, TFLAG_PROXY_MEDIA))) {