]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3275 try this patch
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 23 Jun 2011 16:57:38 +0000 (11:57 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 23 Jun 2011 16:57:38 +0000 (11:57 -0500)
src/mod/applications/mod_dptools/mod_dptools.c
src/switch_ivr_async.c

index 208cdd7292f1a750ff06717ea6ae4e45a8146628..49312a708a7ecf5bf26467fcdb3604662a7bfd5a 100755 (executable)
@@ -1826,8 +1826,6 @@ static switch_status_t xfer_on_dtmf(switch_core_session_t *session, void *input,
                                                app = "intercept";
                                        }
                                        switch_core_session_rwunlock(b_session);
-                               } else {
-                                       switch_channel_set_state(channel, CS_RESET);
                                }
 
                                if ((extension = switch_caller_extension_new(peer_session, app, app_arg)) == 0) {
@@ -1837,7 +1835,6 @@ static switch_status_t xfer_on_dtmf(switch_core_session_t *session, void *input,
 
                                switch_caller_extension_add_application(peer_session, extension, app, app_arg);
                                switch_channel_set_caller_extension(peer_channel, extension);
-                               switch_channel_set_flag(peer_channel, CF_TRANSFER);
                                switch_channel_set_state(peer_channel, CS_RESET);
                                switch_channel_wait_for_state(peer_channel, channel, CS_RESET);
                                switch_channel_set_state(peer_channel, CS_EXECUTE);
index f9cf24ef830946d618417ecb14482ea4116e02dd..8d01e117628cc87962475f2d842d7d989bc3109b 100644 (file)
@@ -1167,12 +1167,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session
                        goto end;
                }
 
-               while(switch_channel_state_change_pending(tchannel)) {
+               while(switch_channel_state_change_pending(tchannel) || !switch_channel_media_ready(tchannel)) {
                        switch_yield(10000);
                        if (!--sanity) break;
                }
 
-               if (!switch_channel_media_ready(tchannel)) {
+               if (!switch_channel_media_up(tchannel)) {
                        goto end;
                }
 
@@ -1287,7 +1287,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session
                msg.message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
                switch_core_session_receive_message(tsession, &msg);
 
-               while (switch_channel_ready(tchannel) && switch_channel_ready(channel)) {
+               while (switch_channel_up(tchannel) && switch_channel_ready(channel)) {
                        uint32_t len = sizeof(buf);
                        switch_event_t *event = NULL;
                        char *fcommand = NULL;