]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6954 #resolve #comment please test
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 7 Nov 2014 00:26:16 +0000 (18:26 -0600)
committerBrian West <brian@freeswitch.org>
Fri, 7 Nov 2014 00:26:16 +0000 (18:26 -0600)
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c

index b0107b200eef9c66d2846845de6dee5378ef8214..a482d107f06aee9822367762ff504cd7cb3fec5e 100644 (file)
@@ -6538,9 +6538,17 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                if (!tech_pvt || !tech_pvt->nh) {
                        goto done;
                }
-       
-               if ((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;
+
+               if (!r_sdp && (status > 100 || switch_channel_test_flag(channel, CF_ANSWERED)) && status < 300) {
+                       if (ss_state == nua_callstate_ready) {
+                               if (tech_pvt->mparams.last_sdp_response) {
+                                       r_sdp = tech_pvt->mparams.last_sdp_response;
+                               }
+                       } else {
+                               if (tech_pvt->mparams.last_sdp_str) {
+                                       r_sdp = tech_pvt->mparams.last_sdp_str;
+                               }
+                       }
                }
                tech_pvt->mparams.last_sdp_str = NULL;
        
index 17edf8935343484fb8ebb522b8267fa624a7e57c..49079f106daa479ae2ced1ea510d214dbac79fbd 100644 (file)
@@ -1235,6 +1235,10 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
 
        tech_pvt->sent_invites++;
 
+       if (switch_channel_get_private(tech_pvt->channel, "t38_options")) {
+               sofia_clear_flag(tech_pvt, TFLAG_ENABLE_SOA);
+       }
+
        if (sofia_use_soa(tech_pvt)) {
                nua_invite(tech_pvt->nh,
                                   NUTAG_AUTOANSWER(0),