]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3294 --resolve This is probably fine
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 13 May 2011 12:29:26 +0000 (07:29 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 13 May 2011 12:29:26 +0000 (07:29 -0500)
src/switch_ivr.c

index 4932606ff2f5ae53e04f6ca1482b002d26d6f6ed..ee7fe868b17ccbfae39e8d0e3e84be43c0bc4739 100644 (file)
@@ -1350,6 +1350,16 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_media(const char *uuid, switch_media_
 
                if (switch_channel_test_flag(channel, CF_PROXY_MODE)) {
                        status = SWITCH_STATUS_SUCCESS;
+
+                       /* If we had early media in bypass mode before, it is no longer relevant */
+                       if (switch_channel_test_flag(channel, CF_EARLY_MEDIA)) {
+                               switch_core_session_message_t msg2 = { 0 };
+
+                               msg2.message_id = SWITCH_MESSAGE_INDICATE_CLEAR_PROGRESS;
+                               msg2.from = __FILE__;
+                               switch_core_session_receive_message(session, &msg2);
+                       }
+
                        if (switch_core_session_receive_message(session, &msg) != SWITCH_STATUS_SUCCESS) {
                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't re-establsh media on %s\n", switch_channel_get_name(channel));
                                switch_core_session_rwunlock(session);