]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_sofia: send bye instead of cancel after invalid 200 OK (MODENDP-270)
authorMichael Jerris <mike@jerris.com>
Mon, 7 Dec 2009 03:32:56 +0000 (03:32 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 7 Dec 2009 03:32:56 +0000 (03:32 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15808 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia.c

index ca15700faf61b6f98bf769277526f86a7ccd9905..643b55abca75ba451bd0ca652766a906891a2fa3 100644 (file)
@@ -389,7 +389,7 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
                                        switch_channel_cause2str(cause));
                }
 
-               if (switch_channel_test_flag(channel, CF_ANSWERED)) {
+               if (switch_channel_test_flag(channel, CF_ANSWERED) || sofia_test_flag(tech_pvt, TFLAG_ANS)) {
                        if (!tech_pvt->got_bye) {
                                switch_channel_set_variable(channel, "sip_hangup_disposition", "send_bye");
                        }
index 4304b43b68de01f9c0a4ebb94b3c3ef450c04b45..a8b61d3e3f2b947f225ab7287364f74d6b088b7c 100644 (file)
@@ -4264,8 +4264,9 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                                }
                                        }
 
+                                       sofia_set_flag_locked(tech_pvt, TFLAG_ANS);
+
                                        if (match) {
-                                               sofia_set_flag_locked(tech_pvt, TFLAG_ANS);
                                                if (sofia_glue_tech_choose_port(tech_pvt, 0) == SWITCH_STATUS_SUCCESS) {
                                                        if (sofia_glue_activate_rtp(tech_pvt, 0) == SWITCH_STATUS_SUCCESS) {
                                                                switch_channel_mark_answered(channel);