From 5b168ee34babe562be856ec8f1dd14c0abd7c1a5 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Sat, 1 Nov 2008 21:10:07 +0000 Subject: Merge changes from team/group/appdocsxml This commit introduces the first phase of an effort to manage documentation of the interfaces in Asterisk in an XML format. Currently, a new format is available for applications and dialplan functions. A good number of conversions to the new format are also included. For more information, see the following message to asterisk-dev: http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153365 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_mixmonitor.c | 98 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 69 insertions(+), 29 deletions(-) (limited to 'apps/app_mixmonitor.c') diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c index 0adaa62fe..2955455d3 100644 --- a/apps/app_mixmonitor.c +++ b/apps/app_mixmonitor.c @@ -46,38 +46,78 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/app.h" #include "asterisk/channel.h" +/*** DOCUMENTATION + + + Record a call and mix the audio during the recording. + + + + + If filename is an absolute path, uses that path, otherwise + creates the file in the configured monitoring directory from asterisk.conf. + + + + + + + + + + + + + + Will be executed when the recording is over. + Any strings matching ^{X} will be unescaped to X. + All variables will be evaluated at the time MixMonitor is called. + + + + Records the audio on the current channel to the specified file. + + + Will contain the filename used to record. + + + + + + + Stop recording a call through MixMonitor. + + + + Stops the audio recording that was started with a call to MixMonitor() + on the current channel. + + + + ***/ + #define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0 static const char *app = "MixMonitor"; -static const char *synopsis = "Record a call and mix the audio during the recording"; -static const char *desc = "" -" MixMonitor(.[,[,]]):\n" -"Records the audio on the current channel to the specified file.\n" -"If the filename is an absolute path, uses that path, otherwise\n" -"creates the file in the configured monitoring directory from\n" -"asterisk.conf.\n\n" -"Valid options:\n" -" a - Append to the file instead of overwriting it.\n" -" b - Only save audio to the file while the channel is bridged.\n" -" Note: Does not include conferences or sounds played to each bridged\n" -" party.\n" -" v() - Adjust the heard volume by a factor of (range -4 to 4)\n" -" V() - Adjust the spoken volume by a factor of (range -4 to 4)\n" -" W() - Adjust the both heard and spoken volumes by a factor of \n" -" (range -4 to 4)\n\n" -" will be executed when the recording is over\n" -"Any strings matching ^{X} will be unescaped to ${X}.\n" -"All variables will be evaluated at the time MixMonitor is called.\n" -"The variable MIXMONITOR_FILENAME will contain the filename used to record.\n" -""; static const char *stop_app = "StopMixMonitor"; -static const char *stop_synopsis = "Stop recording a call through MixMonitor"; -static const char *stop_desc = "" -" StopMixMonitor():\n" -"Stops the audio recording that was started with a call to MixMonitor()\n" -"on the current channel.\n" -""; struct module_symbols *me; @@ -415,8 +455,8 @@ static int load_module(void) int res; ast_cli_register_multiple(cli_mixmonitor, sizeof(cli_mixmonitor) / sizeof(struct ast_cli_entry)); - res = ast_register_application(app, mixmonitor_exec, synopsis, desc); - res |= ast_register_application(stop_app, stop_mixmonitor_exec, stop_synopsis, stop_desc); + res = ast_register_application_xml(app, mixmonitor_exec); + res |= ast_register_application_xml(stop_app, stop_mixmonitor_exec); return res; } -- cgit v1.2.3