]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7135: [mod_sofia] fix response to re-invite with duplicate sdp (such as we get...
authorMike Jerris <mike@jerris.com>
Thu, 27 Aug 2015 16:42:29 +0000 (11:42 -0500)
committerBrian West <brian@freeswitch.org>
Thu, 27 Aug 2015 16:42:40 +0000 (11:42 -0500)
src/mod/endpoints/mod_sofia/sofia.c

index a2f8004155b8a0cbc39bc5ae7abc68ef891da582..96d2466e1503269e2dc8613013fb895cfd7f09d8 100644 (file)
@@ -7013,6 +7013,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                                su_home_t *home = NULL;
                                                switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED");
                                                sofia_set_flag_locked(tech_pvt, TFLAG_READY);
+
                                                if (switch_channel_get_state(channel) == CS_NEW) {
                                                        switch_channel_set_state(channel, CS_INIT);
                                                } else {
@@ -7140,6 +7141,11 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                        }
                        nua_respond(tech_pvt->nh, SIP_200_OK, TAG_END());
                        goto done;
+               } else if (r_sdp && !sofia_use_soa(tech_pvt)) {
+                       nua_respond(tech_pvt->nh, SIP_200_OK,
+                                               NUTAG_MEDIA_ENABLE(0),
+                                               SIPTAG_CONTACT_STR(tech_pvt->profile->url),
+                                               SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(tech_pvt->mparams.local_sdp_str), TAG_END());
                } else {
                        ss_state = nua_callstate_completed;
                        goto state_process;