[asterisk-commits] trunk r24638 - /trunk/apps/app_page.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 3 15:38:57 MST 2006


Author: bweschke
Date: Wed May  3 17:38:56 2006
New Revision: 24638

URL: http://svn.digium.com/view/asterisk?rev=24638&view=rev
Log:
 Optionally record audio of the page command for re-pages/playback. #6827 (JeffSaxe)


Modified:
    trunk/apps/app_page.c

Modified: trunk/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_page.c?rev=24638&r1=24637&r2=24638&view=diff
==============================================================================
--- trunk/apps/app_page.c (original)
+++ trunk/apps/app_page.c Wed May  3 17:38:56 2006
@@ -60,18 +60,21 @@
 "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 @@
 	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 @@
 			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);
 	}
 



More information about the asterisk-commits mailing list