diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 1f16473949..a338d6cce5 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -2060,7 +2060,16 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess goto done; } - + if (var_event && (var = switch_event_get_header(var_event, "originate_delay_start"))) { + int tmp = atoi(var); + if (tmp > 0) { + while (tmp && (!cancel_cause || *cancel_cause == 0)) { + switch_cond_next(); + tmp--; + } + } + } + if (oglobals.session) { switch_event_header_t *hi; const char *cdr_total_var;