diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 86d8bcea20..87c5910c8c 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -2466,7 +2466,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess oglobals.ringback_ok = 0; } - soft_holding = switch_channel_get_variable(caller_channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE); + if (caller_channel) { + soft_holding = switch_channel_get_variable(caller_channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE); + } while ((!caller_channel || switch_channel_ready(caller_channel) || switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) && check_channel_status(&oglobals, originate_status, and_argc)) {