From 4ac180cd8a1cbdd466877cf71918b96e2b5cfc9f Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 24 Jan 2012 08:32:47 -0600 Subject: [PATCH] use media_up instead of media_ready in a few place --- src/switch_ivr_async.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index 3f59ff778a..7b6cd1271c 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -898,7 +898,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_displace_session(switch_core_session_ return SWITCH_STATUS_FALSE; } - if (!switch_channel_media_ready(channel) || !switch_core_session_get_read_codec(session)) { + if (!switch_channel_media_up(channel) || !switch_core_session_get_read_codec(session)) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can not displace session. Media not enabled on channel\n"); return SWITCH_STATUS_FALSE; } @@ -1255,11 +1255,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session switch_caller_profile_t *cp = NULL; uint32_t sanity = 600; - if (!switch_channel_media_ready(channel)) { + if (!switch_channel_media_up(channel)) { goto end; } - while(switch_channel_state_change_pending(tchannel) || !switch_channel_media_ready(tchannel)) { + while(switch_channel_state_change_pending(tchannel) || !switch_channel_media_up(tchannel)) { switch_yield(10000); if (!--sanity) break; } @@ -1547,7 +1547,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_session(switch_core_session_t return SWITCH_STATUS_FALSE; } - if (!switch_channel_media_ready(channel) || !switch_core_session_get_read_codec(session)) { + if (!switch_channel_media_up(channel) || !switch_core_session_get_read_codec(session)) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can not record session. Media not enabled on channel\n"); return SWITCH_STATUS_FALSE; } @@ -2508,7 +2508,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_inband_dtmf_generate_session(switch_c return SWITCH_STATUS_FALSE; } - if (!switch_channel_media_ready(channel) || !switch_core_session_get_read_codec(session)) { + if (!switch_channel_media_up(channel) || !switch_core_session_get_read_codec(session)) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can not install inband dtmf generate. Media not enabled on channel\n"); return status; }