]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6833 FS-6834 fix regression
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 13 Oct 2015 17:17:29 +0000 (12:17 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 13 Oct 2015 17:17:29 +0000 (12:17 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia.c

index 48bf963a0f622d690e001e19523102221b21f270..a317cb096582570a412acab7bfdae02033f2fb07 100644 (file)
@@ -1452,7 +1452,9 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                {
                        char *extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_HEADER_PREFIX);
 
-                       nua_invite(tech_pvt->nh, NUTAG_MEDIA_ENABLE(0), SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(msg->string_arg), 
+                       nua_invite(tech_pvt->nh, NUTAG_MEDIA_ENABLE(0),
+                                          TAG_IF(msg->string_arg, SIPTAG_CONTENT_TYPE_STR("application/sdp")), 
+                                          TAG_IF(msg->string_arg, SIPTAG_PAYLOAD_STR(msg->string_arg)), 
                                           TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)), TAG_END());
                        
                        switch_safe_free(extra_headers);
index 5d0338365358f2589656cb710105f66e9b330380..2a06e882ef86bd1a72bca34f655ce55a16be9faa 100644 (file)
@@ -7028,8 +7028,8 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                                        TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)),
                                                        SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
                                                        //SOATAG_USER_SDP_STR(tech_pvt->mparams.local_sdp_str),
-                                                       SIPTAG_CONTENT_TYPE_STR("application/sdp"),
-                                                       SIPTAG_PAYLOAD_STR(tech_pvt->mparams.local_sdp_str),
+                                                       TAG_IF(tech_pvt->mparams.local_sdp_str, SIPTAG_CONTENT_TYPE_STR("application/sdp")),
+                                                       TAG_IF(tech_pvt->mparams.local_sdp_str, SIPTAG_PAYLOAD_STR(tech_pvt->mparams.local_sdp_str)),
                                                        //SOATAG_REUSE_REJECTED(1),
                                                        //SOATAG_RTP_SELECT(1), 
                                                        SOATAG_AUDIO_AUX("cn telephone-event"),