[Freeswitch-svn] [commit] r3137 - freeswitch/branches/knhor/trunk/src/mod/applications/mod_playback

Freeswitch SVN knhor at freeswitch.org
Sat Oct 21 12:04:38 EDT 2006


Author: knhor
Date: Sat Oct 21 12:04:37 2006
New Revision: 3137

Modified:
   freeswitch/branches/knhor/trunk/src/mod/applications/mod_playback/mod_playback.c

Log:
let * end record instead of hangup

Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_playback/mod_playback.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_playback/mod_playback.c	(original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_playback/mod_playback.c	Sat Oct 21 12:04:37 2006
@@ -127,12 +127,14 @@
 {
 	switch_channel_t *channel;
 	channel = switch_core_session_get_channel(session);
+	switch_status_t status;
     assert(channel != NULL);
 
-	if (switch_ivr_record_file(session, NULL, data, on_dtmf, NULL, 0) != SWITCH_STATUS_SUCCESS) {
+	status = switch_ivr_record_file(session, NULL, data, on_dtmf, NULL, 0);
+
+	if (!switch_channel_ready(channel) || (status != SWITCH_STATUS_SUCCESS && !SWITCH_STATUS_IS_BREAK(status))) {
 		switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 	}
-	
 }
 
 



More information about the Freeswitch-svn mailing list