[Freeswitch-svn] [commit] r8013 - freeswitch/trunk/src/mod/applications/mod_fifo
Freeswitch SVN
anthm at freeswitch.org
Thu Apr 3 17:31:04 EDT 2008
Author: anthm
Date: Thu Apr 3 17:31:04 2008
New Revision: 8013
Modified:
freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
Log:
tweak fifo
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 Thu Apr 3 17:31:04 2008
@@ -84,7 +84,10 @@
case SWITCH_INPUT_TYPE_DTMF:
{
switch_dtmf_t *dtmf = (switch_dtmf_t *) input;
- if (dtmf->digit == '*') {
+ switch_channel_t *channel = switch_core_session_get_channel(session);
+ const char *caller_exit_key = switch_channel_get_variable(channel, "fifo_caller_exit_key");
+
+ if (caller_exit_key && dtmf->digit == *caller_exit_key) {
char *bp = buf;
*bp = dtmf->digit;
return SWITCH_STATUS_BREAK;
@@ -312,10 +315,11 @@
while(switch_channel_ready(channel)) {
switch_input_args_t args = { 0 };
char buf[25] = "";
+ const char *caller_exit_key = switch_channel_get_variable(channel, "fifo_caller_exit_key");
args.input_callback = moh_on_dtmf;
args.buf = buf;
args.buflen = sizeof(buf);
-
+
if ((serviced_uuid = switch_channel_get_variable(channel, "fifo_serviced_uuid"))) {
break;
@@ -327,7 +331,7 @@
switch_ivr_collect_digits_callback(session, &args, 0);
}
- if (*buf == '*') {
+ if (caller_exit_key && *buf == *caller_exit_key) {
aborted = 1;
goto abort;
}
More information about the Freeswitch-svn
mailing list