]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9829 #resolve [FreeSWITCH 200ok to second reINVITE on a dialog doesn't contain...
authorBrian West <brian@freeswitch.org>
Tue, 13 Dec 2016 22:39:57 +0000 (16:39 -0600)
committerBrian West <brian@freeswitch.org>
Tue, 13 Dec 2016 22:39:57 +0000 (16:39 -0600)
src/mod/endpoints/mod_sofia/sofia.c

index c58c463d68c0ee6910cc413e785bfb29f20ec810..9eca561f6cf6dd53d7ce31dfd0d9dcf65bf3ffc6 100644 (file)
@@ -7990,10 +7990,19 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                                switch_core_media_gen_local_sdp(session, SDP_TYPE_RESPONSE, NULL, 0, NULL, 0);
                                        }
 
-                                       nua_respond(tech_pvt->nh, SIP_200_OK,
-                                                               NUTAG_MEDIA_ENABLE(0),
-                                                               SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
-                                                               SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(tech_pvt->mparams.local_sdp_str), TAG_END());
+                                       if (sofia_use_soa(tech_pvt)) {
+                                               nua_respond(tech_pvt->nh, SIP_200_OK,
+                                                                       SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
+                                                                       SOATAG_USER_SDP_STR(tech_pvt->mparams.local_sdp_str),
+                                                                       SOATAG_REUSE_REJECTED(1),
+                                                                       SOATAG_AUDIO_AUX("cn telephone-event"),
+                                                                       TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_100REL), NUTAG_INCLUDE_EXTRA_SDP(1)), TAG_END());
+                                       } else {
+                                               nua_respond(tech_pvt->nh, SIP_200_OK,
+                                                                       NUTAG_MEDIA_ENABLE(0),
+                                                                       SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
+                                                                       SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(tech_pvt->mparams.local_sdp_str), TAG_END());
+                                       }
                                        
                                        if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_REINVITE) == SWITCH_STATUS_SUCCESS) {
                                                switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "Unique-ID", switch_core_session_get_uuid(session));