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

Freeswitch SVN anthm at freeswitch.org
Wed Sep 19 15:33:03 EDT 2007


Author: anthm
Date: Wed Sep 19 15:33:03 2007
New Revision: 5722

Modified:
   freeswitch/trunk/src/switch_ivr.c

Log:
make the park function only pre-answer and not answer

Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c	(original)
+++ freeswitch/trunk/src/switch_ivr.c	Wed Sep 19 15:33:03 2007
@@ -413,7 +413,10 @@
 	channel = switch_core_session_get_channel(session);
 	assert(channel != NULL);
 
-	switch_channel_answer(channel);
+	if (!switch_channel_test_flag(channel, CF_ANSWERED)) {
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Careful, Channel is unaswered. Pre-answering...\n");
+		switch_channel_pre_answer(channel);
+	}
 
 	if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_PARK) == SWITCH_STATUS_SUCCESS) {
 		switch_channel_event_set_data(channel, event);



More information about the Freeswitch-svn mailing list