[asterisk-commits] seanbright: branch group/1.6.1-maintenance r263857 - in /team/group/1.6.1-mai...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 18 15:47:49 CDT 2010
Author: seanbright
Date: Tue May 18 15:47:47 2010
New Revision: 263857
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=263857
Log:
Merged revisions 263807-263808 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r263807 | jpeeler | 2010-05-18 15:27:34 -0400 (Tue, 18 May 2010) | 17 lines
Merged revisions 263769 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r263769 | jpeeler | 2010-05-18 13:54:58 -0500 (Tue, 18 May 2010) | 10 lines
Modify directory name reading to be interrupted with operator or pound escape.
In the case of accidentally entering the wrong first three letters for the
reading, users could be very frustrated if the name listing is very long. This
allows interrupting the reading by pressing 0 or #. 0 will attempt to execute
a configured operator (o) extension and # will exit and proceed in the
dialplan.
ABE-2200
........
................
r263808 | jpeeler | 2010-05-18 15:30:19 -0400 (Tue, 18 May 2010) | 1 line
put changes with the correct version
................
Modified:
team/group/1.6.1-maintenance/ (props changed)
team/group/1.6.1-maintenance/CHANGES
team/group/1.6.1-maintenance/apps/app_directory.c
Propchange: team/group/1.6.1-maintenance/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: team/group/1.6.1-maintenance/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/group/1.6.1-maintenance/CHANGES?view=diff&rev=263857&r1=263856&r2=263857
==============================================================================
--- team/group/1.6.1-maintenance/CHANGES (original)
+++ team/group/1.6.1-maintenance/CHANGES Tue May 18 15:47:47 2010
@@ -8,11 +8,19 @@
===
======================================================================
+----------------------------------------------------------------------------------
+--- Functionality changes since Asterisk 1.6.1.2 --------------------------------
+----------------------------------------------------------------------------------
+
SIP changes
-----------
* Added a new option "prematuremedia" that defaults to "no". If you turn this
option on, chan_sip will not automatically initiate early media if it receives
audio from the incoming channel before there's been a progress indication.
+
+Applications
+------------
+ * app_directory now allows exiting at any time using the operator or pound key.
----------------------------------------------------------------------------------
--- Functionality changes from Asterisk 1.6.1.1 to Asterisk 1.6.1.2 -------------
Modified: team/group/1.6.1-maintenance/apps/app_directory.c
URL: http://svnview.digium.com/svn/asterisk/team/group/1.6.1-maintenance/apps/app_directory.c?view=diff&rev=263857&r1=263856&r2=263857
==============================================================================
--- team/group/1.6.1-maintenance/apps/app_directory.c (original)
+++ team/group/1.6.1-maintenance/apps/app_directory.c Tue May 18 15:47:47 2010
@@ -207,6 +207,19 @@
return 0;
}
+static int goto_exten(struct ast_channel *chan, const char *dialcontext, char *ext)
+{
+ if (!ast_goto_if_exists(chan, dialcontext, ext, 1) ||
+ (!ast_strlen_zero(chan->macrocontext) &&
+ !ast_goto_if_exists(chan, chan->macrocontext, ext, 1))) {
+ return 0;
+ } else {
+ ast_log(LOG_WARNING, "Can't find extension '%s' in current context. "
+ "Not Exiting the Directory!\n", ext);
+ return -1;
+ }
+}
+
/* play name of mailbox owner.
* returns: -1 for bad or missing extension
* '1' for selected entry from directory
@@ -289,11 +302,17 @@
res = ast_waitfordigit(chan, 3000);
ast_stopstream(chan);
- if (res == '1') { /* Name selected */
+ if (res == '0') { /* operator selected */
+ goto_exten(chan, dialcontext, "o");
+ return '0';
+ } else if (res == '1') { /* Name selected */
return select_entry(chan, context, dialcontext, item, flags) ? -1 : 1;
} else if (res == '*') {
/* Skip to next match in list */
break;
+ } else if (res == '#') {
+ /* Exit reading, continue in dialplan */
+ return res;
}
if (res < 0)
@@ -570,19 +589,6 @@
}
}
} while (reordered);
-}
-
-static int goto_exten(struct ast_channel *chan, const char *dialcontext, char *ext)
-{
- if (!ast_goto_if_exists(chan, dialcontext, ext, 1) ||
- (!ast_strlen_zero(chan->macrocontext) &&
- !ast_goto_if_exists(chan, chan->macrocontext, ext, 1))) {
- return 0;
- } else {
- ast_log(LOG_WARNING, "Can't find extension '%s' in current context. "
- "Not Exiting the Directory!\n", ext);
- return -1;
- }
}
static int do_directory(struct ast_channel *chan, struct ast_config *vmcfg, struct ast_config *ucfg, char *context, char *dialcontext, char digit, int digits, struct ast_flags *flags, char *opts[])
@@ -711,6 +717,8 @@
dirintro = ast_variable_retrieve(cfg, args.vmcontext, "directoryintro");
if (ast_strlen_zero(dirintro))
dirintro = ast_variable_retrieve(cfg, "general", "directoryintro");
+ /* the above prompts probably should be modified to include 0 for dialing operator
+ and # for exiting (continues in dialplan) */
if (ast_test_flag(&flags, OPT_LISTBYFIRSTNAME) && ast_test_flag(&flags, OPT_LISTBYLASTNAME)) {
if (!ast_strlen_zero(opts[OPT_ARG_EITHER])) {
More information about the asterisk-commits
mailing list