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

src/switch_core_io.c
src/switch_core_session.c
src/switch_ivr.c
src/switch_ivr_bridge.c

index e1e61f902b0e774f7d6a9ba696285f9f34e9a140..cecf6dea78716565561e6b1a650696e606f0565e 100644 (file)
@@ -730,7 +730,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_kill_channel(switch_
        switch_io_event_hook_kill_channel_t *ptr;
        switch_status_t status = SWITCH_STATUS_FALSE;
 
-       switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_INFO, "Kill %s [%s]\n", switch_channel_get_name(session->channel),
+       switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_DEBUG, "Kill %s [%s]\n", switch_channel_get_name(session->channel),
                                          SIG_NAMES[sig]);
 
        if (session->endpoint_interface->io_routines->kill_channel) {
index bf842b496ede08d69f0774e265c745f5a0880cda..66e92fe69916b57fcc56ec7a197b9348d2aa4396 100644 (file)
@@ -626,7 +626,7 @@ SWITCH_DECLARE(void) switch_core_session_signal_state_change(switch_core_session
 {
        switch_status_t status = SWITCH_STATUS_SUCCESS;
        switch_io_event_hook_state_change_t *ptr;
-
+       
        /* If trylock fails the signal is already awake so we needn't bother */
        if (switch_mutex_trylock(session->mutex) == SWITCH_STATUS_SUCCESS) {
                switch_thread_cond_signal(session->cond);
@@ -644,6 +644,7 @@ SWITCH_DECLARE(void) switch_core_session_signal_state_change(switch_core_session
                        }
                }
        }
+       switch_core_session_kill_channel(session, SWITCH_SIG_BREAK);
 }
 
 SWITCH_DECLARE(unsigned int) switch_core_session_running(switch_core_session_t *session)
index 70e1638205b3e654990c1f54249e3f093c8daef6..f96fe4fdcf835163dbe33d8a4d7fd66e6616bc0f 100644 (file)
@@ -749,7 +749,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_media(char *uuid, switch_media_flag_t
 
                if (switch_channel_test_flag(channel, CF_BYPASS_MEDIA)) {
                        status = SWITCH_STATUS_SUCCESS;
-                       switch_channel_clear_flag(channel, CF_BYPASS_MEDIA);
                        switch_core_session_receive_message(session, &msg);
 
                        if ((flags & SMF_REBRIDGE)
@@ -765,7 +764,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_media(char *uuid, switch_media_flag_t
                                switch_channel_clear_state_handler(channel, NULL);
                        }
                }
-
+               
                switch_core_session_rwunlock(session);
 
                if (other_channel) {
@@ -803,22 +802,21 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_nomedia(char *uuid, switch_media_flag
                }
 
                if ((flags & SMF_FORCE) || !switch_channel_test_flag(channel, CF_BYPASS_MEDIA)) {
-                       switch_ivr_parse_all_events(session);
-                       
+                       //switch_ivr_parse_all_events(session);
+                       switch_core_session_receive_message(session, &msg);
+
                        if ((flags & SMF_REBRIDGE) && (other_uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE)) &&
                                (other_session = switch_core_session_locate(other_uuid))) {
                                other_channel = switch_core_session_get_channel(other_session);
                                assert(other_channel != NULL);
-                               
-                               switch_ivr_parse_all_events(other_session);
+                               //switch_ivr_parse_all_events(other_session);
 
                                switch_core_session_receive_message(other_session, &msg);
                                switch_channel_clear_state_handler(other_channel, NULL);
                                
                        }
 
-                       switch_channel_set_flag(channel, CF_BYPASS_MEDIA);
-                       switch_core_session_receive_message(session, &msg);
+                       
 
                        if (other_channel) {
                                switch_channel_clear_state_handler(channel, NULL);
index c13b73813de52c0c3a023d88b925e3084214fd97..9e2904df116b7a2aac7e68cf686b0edffb7f2152 100644 (file)
@@ -98,7 +98,7 @@ static void *audio_bridge_thread(switch_thread_t * thread, void *obj)
                        break;
                }
 
-               if (loop_count > 10 && switch_core_session_private_event_count(session_a)) {
+               if (loop_count > 50 && switch_core_session_private_event_count(session_a)) {
                        switch_channel_set_flag(chan_b, CF_SUSPEND);
                        msg.string_arg = data->b_uuid;
                        msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
@@ -491,7 +491,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_signal_bridge(switch_core_session_t *
 
        switch_channel_set_state_flag(caller_channel, CF_TRANSFER);
        switch_channel_set_state_flag(peer_channel, CF_TRANSFER);
-
+       
 
        switch_channel_set_state(caller_channel, CS_HIBERNATE);
        switch_channel_set_state(peer_channel, CS_HIBERNATE);