[Freeswitch-svn] [commit] r8100 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Mon Apr 14 10:05:23 EDT 2008


Author: anthm
Date: Mon Apr 14 10:05:22 2008
New Revision: 8100

Modified:
   freeswitch/trunk/src/switch_ivr.c

Log:
can't double park

Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c	(original)
+++ freeswitch/trunk/src/switch_ivr.c	Mon Apr 14 10:05:22 2008
@@ -431,6 +431,11 @@
 	switch_unicast_conninfo_t *conninfo = NULL;
 	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)) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Careful, Channel is unanswered. Pre-answering...\n");
 		switch_channel_pre_answer(channel);



More information about the Freeswitch-svn mailing list