]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix goofy 183 madness
authorAnthony Minessale <anthony.minessale@gmail.com>
Sun, 8 Oct 2006 15:51:10 +0000 (15:51 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sun, 8 Oct 2006 15:51:10 +0000 (15:51 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3004 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/switch_channel.c

index f2a545e5c5cec6ae7b6bc1628939e34b08edffe2..0140522f85b2e8a592419f767a2ac52952df6079 100644 (file)
@@ -1916,7 +1916,7 @@ static void sip_i_state(int status,
                if (channel) {
                        if (r_sdp) {
                                if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
-                                       switch_channel_pre_answer(channel);
+                                       switch_set_flag_locked(tech_pvt, TFLAG_EARLY_MEDIA);
                                        return;
                                } else {
                                        sdp_parser_t *parser = sdp_parse(tech_pvt->home, r_sdp, (int)strlen(r_sdp), 0);
@@ -1938,7 +1938,7 @@ static void sip_i_state(int status,
                                                tech_choose_port(tech_pvt);
                                                activate_rtp(tech_pvt);
                                                switch_channel_set_variable(channel, "endpoint_disposition", "EARLY MEDIA");
-                                               switch_channel_pre_answer(channel);
+                                               switch_set_flag_locked(tech_pvt, TFLAG_EARLY_MEDIA);
                                                return;
                                        }
                                        switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS");
@@ -2067,7 +2067,7 @@ static void sip_i_state(int status,
                        if (r_sdp) {
                                if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
                                        switch_set_flag_locked(tech_pvt, TFLAG_ANS);
-                                       switch_channel_answer(channel);
+                                       switch_channel_set_flag(channel, CF_ANSWERED);
                                        return;
                                } else {
                                        sdp_parser_t *parser = sdp_parse(tech_pvt->home, r_sdp, (int)strlen(r_sdp), 0);
@@ -2090,7 +2090,7 @@ static void sip_i_state(int status,
                                                switch_channel_set_variable(channel, "endpoint_disposition", "ANSWER");
                                                tech_choose_port(tech_pvt);
                                                activate_rtp(tech_pvt);
-                                               switch_channel_answer(channel);
+                                               switch_channel_set_flag(channel, CF_ANSWERED);
                                                return;
                                        }
                                        
@@ -2100,7 +2100,7 @@ static void sip_i_state(int status,
                        } else if (switch_test_flag(tech_pvt, TFLAG_EARLY_MEDIA)) {
                                switch_set_flag_locked(tech_pvt, TFLAG_ANS);
                                switch_channel_set_variable(channel, "endpoint_disposition", "ANSWER");
-                               switch_channel_answer(channel);
+                               switch_channel_set_flag(channel, CF_ANSWERED);
                                return;
                        } //else probably an ack
                }
index a5c4eb205528ddadd39aa1bb19e134e54ae2159c..d62ddb96d2f13b8ef55da563062bd1a2c1666108 100644 (file)
@@ -950,6 +950,10 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel
                return SWITCH_STATUS_SUCCESS;
        }
 
+       if (switch_channel_test_flag(channel, CF_EARLY_MEDIA)) {
+               return SWITCH_STATUS_SUCCESS;
+       }
+
        msg.message_id = SWITCH_MESSAGE_INDICATE_PROGRESS;
        msg.from = channel->name;
        status = switch_core_session_message_send(uuid, &msg);