[asterisk-commits] tilghman: branch 1.6.0 r122180 - in /branches/1.6.0: ./ apps/app_meetme.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 12 10:27:35 CDT 2008


Author: tilghman
Date: Thu Jun 12 10:27:34 2008
New Revision: 122180

URL: http://svn.digium.com/view/asterisk?view=rev&rev=122180
Log:
Merged revisions 122174 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r122174 | tilghman | 2008-06-12 10:26:07 -0500 (Thu, 12 Jun 2008) | 16 lines

Merged revisions 122137 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122137 | tilghman | 2008-06-12 10:18:39 -0500 (Thu, 12 Jun 2008) | 8 lines

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

........

................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/apps/app_meetme.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/apps/app_meetme.c?view=diff&rev=122180&r1=122179&r2=122180
==============================================================================
--- branches/1.6.0/apps/app_meetme.c (original)
+++ branches/1.6.0/apps/app_meetme.c Thu Jun 12 10:27:34 2008
@@ -2251,6 +2251,8 @@
 				break;
 
 			if (c) {
+				char dtmfstr[2] = "";
+
 				if (c->fds[0] != origfd || (user->zapchannel && (c->audiohooks || c->monitor))) {
 					if (using_pseudo) {
 						/* Kill old pseudo */
@@ -2268,6 +2270,11 @@
 					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);
@@ -2318,35 +2325,6 @@
 						if (user->talking)
 							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_debug(1, "Got DTMF %c, goto context %s\n", tmp[0], exitcontext);
-						ret = 0;
-						ast_frfree(f);
-						break;
-					} else {
-						ast_debug(2, "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) && (confflags & CONFFLAG_KEYEXIT) && (strchr(exitkeys, f->subclass))) {
-					char exitkey[2];
-
-					exitkey[0] = f->subclass;
-					exitkey[1] = '\0';
-					
-					pbx_builtin_setvar_helper(chan, "MEETME_EXIT_KEY", exitkey);
-						
-					if (confflags & CONFFLAG_PASS_DTMF)
-						conf_queue_dtmf(conf, user, f);
-					ret = 0;
-					ast_frfree(f);
-					break;
 				} else if (((f->frametype == AST_FRAME_DTMF) && (f->subclass == '*') && (confflags & CONFFLAG_STARMENU)) || ((f->frametype == AST_FRAME_DTMF) && menu_active)) {
 					if (confflags & CONFFLAG_PASS_DTMF)
 						conf_queue_dtmf(conf, user, f);
@@ -2513,6 +2491,27 @@
 					}
 
 					conf_flush(fd, chan);
+				/* Since this option could absorb dtmf meant for the previous (menu), 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_debug(1, "Got DTMF %c, goto context %s\n", dtmfstr[0], exitcontext);
+						ret = 0;
+						ast_frfree(f);
+						break;
+					} else {
+						ast_debug(2, "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) && (confflags & CONFFLAG_KEYEXIT) && (strchr(exitkeys, f->subclass))) {
+					pbx_builtin_setvar_helper(chan, "MEETME_EXIT_KEY", dtmfstr);
+						
+					if (confflags & CONFFLAG_PASS_DTMF)
+						conf_queue_dtmf(conf, user, f);
+					ret = 0;
+					ast_frfree(f);
+					break;
 				} else if ((f->frametype == AST_FRAME_DTMF_BEGIN || f->frametype == AST_FRAME_DTMF_END)
 					&& confflags & CONFFLAG_PASS_DTMF) {
 					conf_queue_dtmf(conf, user, f);




More information about the asterisk-commits mailing list