]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add ignore_early_media=consume for hmmhesays
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 30 Aug 2012 20:14:33 +0000 (15:14 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 30 Aug 2012 20:14:38 +0000 (15:14 -0500)
src/switch_ivr_originate.c

index fd47ffdc080d2550311797d91bc502d91fdef93a..b9975ee6de0db8c2d7e07a369682dc587d75c6f4 100644 (file)
@@ -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);
                                }