can't double park
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8100 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
687ae1b352
commit
730feae63e
|
@ -431,6 +431,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session,
|
||||||
switch_unicast_conninfo_t *conninfo = NULL;
|
switch_unicast_conninfo_t *conninfo = NULL;
|
||||||
switch_codec_t *read_codec = switch_core_session_get_read_codec(session);
|
switch_codec_t *read_codec = switch_core_session_get_read_codec(session);
|
||||||
|
|
||||||
|
if (switch_channel_test_flag(channel, CF_CONTROLLED)) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot park channels that is under control already.\n");
|
||||||
|
return SWITCH_STATUS_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!switch_channel_test_flag(channel, CF_ANSWERED)) {
|
if (!switch_channel_test_flag(channel, CF_ANSWERED)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Careful, Channel is unanswered. Pre-answering...\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Careful, Channel is unanswered. Pre-answering...\n");
|
||||||
switch_channel_pre_answer(channel);
|
switch_channel_pre_answer(channel);
|
||||||
|
|
Loading…
Reference in New Issue