]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7037 #resolve
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 1 Dec 2014 21:10:00 +0000 (15:10 -0600)
committerBrian West <brian@freeswitch.org>
Mon, 1 Dec 2014 21:10:00 +0000 (15:10 -0600)
src/mod/endpoints/mod_sofia/sofia.c

index bd450b7ddd601316e4ebe24c3b24124b108993aa..0f0f492e995434d1e23caa9922b057a8a7e2ceb2 100644 (file)
@@ -6539,12 +6539,12 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                        goto done;
                }
 
-               if (!r_sdp && (status > 100 || switch_channel_test_flag(channel, CF_ANSWERED)) && status < 300) {
-                       if (ss_state == nua_callstate_ready) {
+               if (!r_sdp && (status == 100 || status == 200)) {
+                       if (ss_state == nua_callstate_completing) {
                                if (tech_pvt->mparams.last_sdp_response) {
                                        r_sdp = tech_pvt->mparams.last_sdp_response;
                                }
-                       } else {
+                       } else if (ss_state == nua_callstate_received) {
                                if (tech_pvt->mparams.last_sdp_str) {
                                        r_sdp = tech_pvt->mparams.last_sdp_str;
                                }