aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_meetme.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-12 15:18:39 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-12 15:18:39 +0000
commit2a09b4f12f3ded439eb4d7155e413315870a876f (patch)
tree900dc50ae69f3f25ee8b57c55d9b644992f287e2 /apps/app_meetme.c
parent07a71e4cafba043175c2b6a631a3f97e40f485db (diff)
Flipflop the sections for two options, since the section for 'X' (exit context)
may otherwise absorb keypresses meant for 's' (admin/user menu). (closes issue #12836) Reported by: blitzrage Patches: 20080611__bug12836.diff.txt uploaded by Corydon76 (license 14) Tested by: blitzrage git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@122137 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_meetme.c')
-rw-r--r--apps/app_meetme.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 1a2b8da5c..990913b1e 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -1909,6 +1909,8 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
break;
if (c) {
+ char dtmfstr[2] = "";
+
if (c->fds[0] != origfd || (user->zapchannel && (c->audiohooks || c->monitor))) {
if (using_pseudo) {
/* Kill old pseudo */
@@ -1926,6 +1928,11 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
f = ast_read(c);
if (!f)
break;
+ if (f->frametype == AST_FRAME_DTMF) {
+ dtmfstr[0] = f->subclass;
+ dtmfstr[1] = '\0';
+ }
+
if ((f->frametype == AST_FRAME_VOICE) && (f->subclass == AST_FORMAT_SLINEAR)) {
if (user->talk.actual)
ast_frame_adjust_volume(f, user->talk.actual);
@@ -1976,21 +1983,6 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
if (user->talking || !(confflags & CONFFLAG_OPTIMIZETALKER))
careful_write(fd, f->data, f->datalen, 0);
}
- } else if ((f->frametype == AST_FRAME_DTMF) && (confflags & CONFFLAG_EXIT_CONTEXT)) {
- char tmp[2];
-
- if (confflags & CONFFLAG_PASS_DTMF)
- conf_queue_dtmf(conf, user, f);
-
- tmp[0] = f->subclass;
- tmp[1] = '\0';
- if (!ast_goto_if_exists(chan, exitcontext, tmp, 1)) {
- ast_log(LOG_DEBUG, "Got DTMF %c, goto context %s\n", tmp[0], exitcontext);
- ret = 0;
- ast_frfree(f);
- break;
- } else if (option_debug > 1)
- ast_log(LOG_DEBUG, "Exit by single digit did not work in meetme. Extension %s does not exist in context %s\n", tmp, exitcontext);
} else if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#') && (confflags & CONFFLAG_POUNDEXIT)) {
if (confflags & CONFFLAG_PASS_DTMF)
conf_queue_dtmf(conf, user, f);
@@ -2154,6 +2146,18 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
}
conf_flush(fd, chan);
+ /* Since this option could absorb dtmf for the previous, we have to check this one last */
+ } else if ((f->frametype == AST_FRAME_DTMF) && (confflags & CONFFLAG_EXIT_CONTEXT) && ast_exists_extension(chan, exitcontext, dtmfstr, 1, "")) {
+ if (confflags & CONFFLAG_PASS_DTMF)
+ conf_queue_dtmf(conf, user, f);
+
+ if (!ast_goto_if_exists(chan, exitcontext, dtmfstr, 1)) {
+ ast_log(LOG_DEBUG, "Got DTMF %c, goto context %s\n", dtmfstr[0], exitcontext);
+ ret = 0;
+ ast_frfree(f);
+ break;
+ } else if (option_debug > 1)
+ ast_log(LOG_DEBUG, "Exit by single digit did not work in meetme. Extension '%s' does not exist in context '%s'\n", dtmfstr, exitcontext);
} else if ((f->frametype == AST_FRAME_DTMF_BEGIN || f->frametype == AST_FRAME_DTMF_END)
&& confflags & CONFFLAG_PASS_DTMF) {
conf_queue_dtmf(conf, user, f);