]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
cancel proxy or no-media mode if you purposely answer or pre_answer
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 9 Oct 2008 23:11:35 +0000 (23:11 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 9 Oct 2008 23:11:35 +0000 (23:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9919 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c
src/mod/endpoints/mod_sofia/mod_sofia.c

index 94facf80e4807c41688e4641938444e27d872f01..e786ecd77adbcc7649cf8252faa93abb79e7a814 100644 (file)
@@ -603,7 +603,10 @@ SWITCH_STANDARD_APP(set_name_function)
 
 SWITCH_STANDARD_APP(answer_function)
 {
-       switch_channel_answer(switch_core_session_get_channel(session));
+       switch_channel_t *channel = switch_core_session_get_channel(session);
+       switch_channel_clear_flag(channel, CF_PROXY_MEDIA);
+       switch_channel_clear_flag(channel, CF_PROXY_MODE);
+       switch_channel_answer(channel);
 }
 
 SWITCH_STANDARD_APP(presence_function)
@@ -628,7 +631,10 @@ SWITCH_STANDARD_APP(presence_function)
 
 SWITCH_STANDARD_APP(pre_answer_function)
 {
-       switch_channel_pre_answer(switch_core_session_get_channel(session));
+       switch_channel_t *channel = switch_core_session_get_channel(session);
+       switch_channel_clear_flag(channel, CF_PROXY_MEDIA);
+       switch_channel_clear_flag(channel, CF_PROXY_MODE);
+       switch_channel_pre_answer(channel);
 }
 
 SWITCH_STANDARD_APP(redirect_function)
index 902bfbf3bc922fcbdd423b17863d9922905b24f2..b8fe0f1b3f270b3219294f111e1bfa9a686a0f9c 100644 (file)
@@ -1108,7 +1108,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                                                }
                                        }
                                } else {
-                                       if (switch_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION)) {
+                                       if (switch_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION) || !tech_pvt->iananame) {
                                                switch_clear_flag_locked(tech_pvt, TFLAG_LATE_NEGOTIATION);
                                                if (!switch_channel_test_flag(tech_pvt->channel, CF_OUTBOUND)) {
                                                        const char *r_sdp = switch_channel_get_variable(channel, SWITCH_R_SDP_VARIABLE);