]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 5 Apr 2007 17:52:35 +0000 (17:52 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 5 Apr 2007 17:52:35 +0000 (17:52 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4862 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index a26552d7ee35d6b8973e977c65aa7872304ec123..cd64e5c13808c0089937bb01a84ef6c6ce39d96a 100644 (file)
@@ -982,16 +982,18 @@ void sofia_handle_sip_i_state(int status,
                                        nua_respond(nh, SIP_488_NOT_ACCEPTABLE, TAG_END());
                                }
                        } else {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Invite with no SDP activating no-media-mode\n");
-                               switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED_NOSDP");
-
-                               switch_set_flag(tech_pvt, TFLAG_LATE_NEGOTIATION);
-                               switch_set_flag_locked(tech_pvt, TFLAG_NOMEDIA);
-                               switch_channel_set_flag(channel, CF_NOMEDIA);
-                               switch_channel_set_state(channel, CS_INIT);
-                               switch_set_flag_locked(tech_pvt, TFLAG_READY);
-                               switch_core_session_thread_launch(session);
-                               goto done;
+                               if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
+                                       goto done;
+                               } else {
+                                       switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED_NOSDP");
+                                       switch_set_flag(tech_pvt, TFLAG_LATE_NEGOTIATION);
+                                       sofia_glue_set_local_sdp(tech_pvt, NULL, 0, NULL, 0);
+                                       
+                                       nua_respond(tech_pvt->nh, SIP_200_OK,
+                                                               SIPTAG_CONTACT_STR(tech_pvt->profile->url),
+                                                               SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1), TAG_END());
+                                       goto done;
+                               }
                        }
                }