]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_callcenter: set cc_exit_key channel variable
authorTravis Cross <tc@traviscross.com>
Mon, 18 Jul 2011 09:39:11 +0000 (09:39 +0000)
committerTravis Cross <tc@traviscross.com>
Wed, 14 Mar 2012 05:08:22 +0000 (05:08 +0000)
If a member of a queue presses a digit specified in cc_exit_keys, the
caller will exit the queue and the variable cc_exit_key will be set to
the digit the caller pressed.

src/mod/applications/mod_callcenter/mod_callcenter.c

index 9133a0c0a961a6f556ed565ebd9cf636ae39b2cc..49fb76f9d737733fc5c34e4a258b7024d8e5c230 100644 (file)
@@ -2577,12 +2577,16 @@ SWITCH_STANDARD_APP(callcenter_function)
                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member_session), SWITCH_LOG_WARNING, "Couldn't play file '%s', continuing wait with no audio\n", cur_moh);
                                moh_valid = SWITCH_FALSE;
                        } else if (status == SWITCH_STATUS_BREAK) {
+                               char buf[2] = { ht.dtmf, 0 };
+                               switch_channel_set_variable(member_channel, "cc_exit_key", buf);
                                break;
                        } else if (!SWITCH_READ_ACCEPTABLE(status)) {
                                break;
                        }
                } else {
                        if ((switch_ivr_collect_digits_callback(member_session, &args, 0, 0)) == SWITCH_STATUS_BREAK) {
+                               char buf[2] = { ht.dtmf, 0 };
+                               switch_channel_set_variable(member_channel, "cc_exit_key", buf);
                                break;
                        }
                }