From 13dab11cb269e5f19cde2b12c8138746090130d9 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 30 Aug 2012 15:14:33 -0500 Subject: [PATCH] add ignore_early_media=consume for hmmhesays --- src/switch_ivr_originate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index fd47ffdc08..b9975ee6de 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -2153,6 +2153,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess if (switch_true(var_val)) { oglobals.early_ok = 0; oglobals.ignore_early_media = 1; + } else if (!strcmp(var_val, "consume")) { + oglobals.early_ok = 0; + oglobals.ignore_early_media = 4; } else if (!strcmp(var_val, "ring_ready")) { oglobals.early_ok = 0; oglobals.ignore_early_media = 2; @@ -2697,7 +2700,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess switch_channel_add_state_handler(originate_status[i].peer_channel, table); } - if (oglobals.monitor_early_media_ring || oglobals.monitor_early_media_fail) { + if (oglobals.monitor_early_media_ring || oglobals.monitor_early_media_fail || oglobals.ignore_early_media == 4) { switch_channel_set_flag(originate_status[i].peer_channel, CF_CONSUME_ON_ORIGINATE); }