summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBJ Weschke <bweschke@btwtech.com>2006-05-03 22:38:56 +0000
committerBJ Weschke <bweschke@btwtech.com>2006-05-03 22:38:56 +0000
commitfd7ca090724cc6d2ae2f802bdc415ecd3061cf71 (patch)
tree6f539218def21819a81b9468ba2db725825cc84f
parent76c9d14bb2689561f77280dc77b250db57b5f181 (diff)
Optionally record audio of the page command for re-pages/playback. #6827 (JeffSaxe)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--apps/app_page.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/app_page.c b/apps/app_page.c
index bb3293851..178606a43 100644
--- a/apps/app_page.c
+++ b/apps/app_page.c
@@ -60,18 +60,21 @@ static const char *page_descrip =
"caller is dumped into the conference as a speaker and the room is\n"
"destroyed when the original caller leaves. Valid options are:\n"
" d - full duplex audio\n"
-" q - quiet, do not play beep to caller\n";
+" q - quiet, do not play beep to caller\n"
+" r - record the page into a file -- you may want to first Set(MEETME_RECORDINGFILE=ReplayLastPage)\n";
LOCAL_USER_DECL;
enum {
PAGE_DUPLEX = (1 << 0),
PAGE_QUIET = (1 << 1),
+ PAGE_RECORD = (1 << 2),
} page_opt_flags;
AST_APP_OPTIONS(page_opts, {
AST_APP_OPTION('d', PAGE_DUPLEX),
AST_APP_OPTION('q', PAGE_QUIET),
+ AST_APP_OPTION('r', PAGE_RECORD),
});
struct calloutdata {
@@ -177,7 +180,8 @@ static int page_exec(struct ast_channel *chan, void *data)
if (options)
ast_app_parse_options(page_opts, &flags, NULL, options);
- snprintf(meetmeopts, sizeof(meetmeopts), "%ud|%sqxdw", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "m");
+ snprintf(meetmeopts, sizeof(meetmeopts), "%ud|%s%sqxdw", confid, (ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "m"),
+ (ast_test_flag(&flags, PAGE_RECORD) ? "r" : "") );
while ((tech = strsep(&tmp, "&"))) {
/* don't call the originating device */
@@ -198,7 +202,8 @@ static int page_exec(struct ast_channel *chan, void *data)
res = ast_waitstream(chan, "");
}
if (!res) {
- snprintf(meetmeopts, sizeof(meetmeopts), "%ud|A%sqxd", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "t");
+ snprintf(meetmeopts, sizeof(meetmeopts), "%ud|A%s%sqxd", confid, (ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "t"),
+ (ast_test_flag(&flags, PAGE_RECORD) ? "r" : "") );
pbx_exec(chan, app, meetmeopts);
}