[asterisk-commits] file: trunk r232442 - in /trunk: CHANGES apps/app_record.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 2 12:35:51 CST 2009
Author: file
Date: Wed Dec 2 12:35:47 2009
New Revision: 232442
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=232442
Log:
Add an option to Record which enables a mode where any DTMF digit will terminate recording.
(closes issue #15436)
Reported by: Vince
Patches:
app_record.diff uploaded by Vince (license 823)
Tested by: dbrooks
Modified:
trunk/CHANGES
trunk/apps/app_record.c
Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=232442&r1=232441&r2=232442
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Wed Dec 2 12:35:47 2009
@@ -103,6 +103,8 @@
variable, AVAILCAUSECODE, instead of overwriting the device state in AVAILSTATUS.
* Added 'd' option to app_followme. This option disables the "Please hold"
announcement.
+ * Added 'y' option to app_record. This option enables a mode where any DTMF digit
+ received will terminate recording.
Dialplan Functions
------------------
Modified: trunk/apps/app_record.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_record.c?view=diff&rev=232442&r1=232441&r2=232442
==============================================================================
--- trunk/apps/app_record.c (original)
+++ trunk/apps/app_record.c Wed Dec 2 12:35:47 2009
@@ -77,7 +77,10 @@
</option>
<option name="k">
<para>Keep recording if channel hangs up.</para>
- </option>
+ </option>
+ <option name="y">
+ <para>Terminate recording if *any* DTMF digit is received.</para>
+ </option>
</optionlist>
</parameter>
</syntax>
@@ -117,6 +120,7 @@
OPTION_IGNORE_TERMINATE = (1 << 5),
OPTION_KEEP = (1 << 6),
FLAG_HAS_PERCENT = (1 << 7),
+ OPTION_ANY_TERMINATE = (1 << 8),
};
AST_APP_OPTIONS(app_opts,{
@@ -126,6 +130,7 @@
AST_APP_OPTION('q', OPTION_QUIET),
AST_APP_OPTION('s', OPTION_SKIP),
AST_APP_OPTION('t', OPTION_STAR_TERMINATE),
+ AST_APP_OPTION('y', OPTION_ANY_TERMINATE),
AST_APP_OPTION('x', OPTION_IGNORE_TERMINATE),
});
@@ -372,7 +377,8 @@
break;
}
} else if ((f->frametype == AST_FRAME_DTMF) &&
- (f->subclass.integer == terminator)) {
+ ((f->subclass.integer == terminator) ||
+ (ast_test_flag(&flags, OPTION_ANY_TERMINATE)))) {
ast_frfree(f);
pbx_builtin_setvar_helper(chan, "RECORD_STATUS", "DTMF");
break;
More information about the asterisk-commits
mailing list