[Freeswitch-svn] [commit] r9043 - freeswitch/trunk/src/mod/applications/mod_fifo

Freeswitch SVN mikej at freeswitch.org
Tue Jul 15 14:09:16 EDT 2008


Author: mikej
Date: Tue Jul 15 14:09:16 2008
New Revision: 9043

Modified:
   freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c

Log:
add fifo_consumer_exit_key variable (MODAPP-100)

Modified: freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c	Tue Jul 15 14:09:16 2008
@@ -65,8 +65,15 @@
 			switch_dtmf_t *dtmf = (switch_dtmf_t *) input;
 			switch_channel_t *bchan = switch_core_session_get_channel(bleg);
 			switch_channel_t *channel = switch_core_session_get_channel(session);
+
+			const char *consumer_exit_key = switch_channel_get_variable(channel, "fifo_consumer_exit_key");
+
 			if (switch_channel_test_flag(switch_core_session_get_channel(session), CF_ORIGINATOR)) {
-				if (dtmf->digit == '*') {
+				if ( consumer_exit_key && dtmf->digit == *consumer_exit_key ) {
+					switch_channel_hangup(bchan, SWITCH_CAUSE_NORMAL_CLEARING);
+					return SWITCH_STATUS_BREAK;
+				}
+				else if ( !consumer_exit_key && dtmf->digit == '*' ) {
 					switch_channel_hangup(bchan, SWITCH_CAUSE_NORMAL_CLEARING);
 					return SWITCH_STATUS_BREAK;
 				} else if (dtmf->digit == '0') {



More information about the Freeswitch-svn mailing list