[asterisk-commits] moy: branch moy/mfcr2 r155412 - in /team/moy/mfcr2: ./ apps/ autoconf/ build_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 7 16:48:26 CST 2008


Author: moy
Date: Fri Nov  7 16:48:25 2008
New Revision: 155412

URL: http://svn.digium.com/view/asterisk?view=rev&rev=155412
Log:
merged from trunk rev 155397

Modified:
    team/moy/mfcr2/   (props changed)
    team/moy/mfcr2/CHANGES
    team/moy/mfcr2/Makefile
    team/moy/mfcr2/apps/app_adsiprog.c
    team/moy/mfcr2/apps/app_alarmreceiver.c
    team/moy/mfcr2/apps/app_amd.c
    team/moy/mfcr2/apps/app_authenticate.c
    team/moy/mfcr2/apps/app_chanspy.c
    team/moy/mfcr2/apps/app_db.c
    team/moy/mfcr2/apps/app_directed_pickup.c
    team/moy/mfcr2/apps/app_disa.c
    team/moy/mfcr2/apps/app_dumpchan.c
    team/moy/mfcr2/apps/app_followme.c
    team/moy/mfcr2/apps/app_forkcdr.c
    team/moy/mfcr2/apps/app_image.c
    team/moy/mfcr2/apps/app_macro.c
    team/moy/mfcr2/apps/app_mixmonitor.c
    team/moy/mfcr2/apps/app_morsecode.c
    team/moy/mfcr2/apps/app_osplookup.c
    team/moy/mfcr2/apps/app_page.c
    team/moy/mfcr2/apps/app_parkandannounce.c
    team/moy/mfcr2/apps/app_privacy.c
    team/moy/mfcr2/apps/app_queue.c
    team/moy/mfcr2/apps/app_read.c
    team/moy/mfcr2/apps/app_readfile.c
    team/moy/mfcr2/apps/app_sayunixtime.c
    team/moy/mfcr2/apps/app_senddtmf.c
    team/moy/mfcr2/apps/app_sendtext.c
    team/moy/mfcr2/apps/app_stack.c
    team/moy/mfcr2/apps/app_test.c
    team/moy/mfcr2/apps/app_url.c
    team/moy/mfcr2/apps/app_voicemail.c
    team/moy/mfcr2/autoconf/ast_ext_lib.m4
    team/moy/mfcr2/build_tools/menuselect-deps.in
    team/moy/mfcr2/cdr/cdr_adaptive_odbc.c
    team/moy/mfcr2/cdr/cdr_odbc.c
    team/moy/mfcr2/channels/chan_agent.c
    team/moy/mfcr2/channels/chan_alsa.c
    team/moy/mfcr2/channels/chan_dahdi.c
    team/moy/mfcr2/channels/chan_h323.c
    team/moy/mfcr2/channels/chan_iax2.c
    team/moy/mfcr2/channels/chan_misdn.c
    team/moy/mfcr2/channels/chan_oss.c
    team/moy/mfcr2/channels/chan_sip.c
    team/moy/mfcr2/channels/chan_skinny.c
    team/moy/mfcr2/channels/chan_usbradio.c
    team/moy/mfcr2/channels/chan_vpb.cc
    team/moy/mfcr2/configs/sip.conf.sample
    team/moy/mfcr2/configs/voicemail.conf.sample
    team/moy/mfcr2/configure
    team/moy/mfcr2/configure.ac
    team/moy/mfcr2/doc/appdocsxml.dtd
    team/moy/mfcr2/funcs/func_blacklist.c
    team/moy/mfcr2/funcs/func_db.c
    team/moy/mfcr2/funcs/func_odbc.c
    team/moy/mfcr2/funcs/func_strings.c
    team/moy/mfcr2/include/asterisk.h
    team/moy/mfcr2/include/asterisk/app.h
    team/moy/mfcr2/include/asterisk/astobj2.h
    team/moy/mfcr2/include/asterisk/autoconfig.h.in
    team/moy/mfcr2/include/asterisk/channel.h
    team/moy/mfcr2/include/asterisk/config.h
    team/moy/mfcr2/include/asterisk/devicestate.h
    team/moy/mfcr2/include/asterisk/indications.h
    team/moy/mfcr2/include/asterisk/strings.h
    team/moy/mfcr2/main/Makefile
    team/moy/mfcr2/main/app.c
    team/moy/mfcr2/main/asterisk.c
    team/moy/mfcr2/main/channel.c
    team/moy/mfcr2/main/config.c
    team/moy/mfcr2/main/devicestate.c
    team/moy/mfcr2/main/features.c
    team/moy/mfcr2/main/indications.c
    team/moy/mfcr2/main/manager.c
    team/moy/mfcr2/main/pbx.c
    team/moy/mfcr2/main/rtp.c
    team/moy/mfcr2/makeopts.in
    team/moy/mfcr2/pbx/pbx_config.c
    team/moy/mfcr2/res/ael/ael.flex
    team/moy/mfcr2/res/ael/ael_lex.c
    team/moy/mfcr2/res/res_config_odbc.c
    team/moy/mfcr2/res/res_crypto.c
    team/moy/mfcr2/res/res_http_post.c
    team/moy/mfcr2/res/res_indications.c
    team/moy/mfcr2/res/res_odbc.c
    team/moy/mfcr2/utils/extconf.c

Propchange: team/moy/mfcr2/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/moy/mfcr2/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: team/moy/mfcr2/CHANGES
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/CHANGES?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/CHANGES (original)
+++ team/moy/mfcr2/CHANGES Fri Nov  7 16:48:25 2008
@@ -11,6 +11,10 @@
    making the new/old message count available to local devices.
  * Added support for setting the domain in the URI for caller of an
    outbound call by using the SIPFROMDOMAIN channel variable.
+ * Added a new configuration option "remotesecret" for authentication to
+   remote services. For backwards compatibility, "secret" still has the
+   same function as before, but now you can configure both a remote secret and a
+   local secret for mutual authentication.
 
 Skinny Changes
 --------------
@@ -28,6 +32,9 @@
  * Added debugging CLI functions to func_odbc, 'odbc read' and 'odbc write'.
  * func_odbc now may specify an insert query to execute, when the write query
    affects 0 rows (usually indicating that no such row exists).
+ * Added a new dialplan function, LISTFILTER, which permits removing elements
+   from a set list, by name.  Uses the same general syntax as the existing CUT
+   and FIELDQTY dialplan functions, which also manage lists.
 
 Applications
 ------------

Modified: team/moy/mfcr2/Makefile
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/Makefile?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/Makefile (original)
+++ team/moy/mfcr2/Makefile Fri Nov  7 16:48:25 2008
@@ -504,7 +504,7 @@
 	@echo "--- Please install xmlstarlet to validate the documentation ---"
 	@echo "---------------------------------------------------------------"
 else
-	$(XMLSTARLET) val $<
+	$(XMLSTARLET) val -d doc/appdocsxml.dtd $<
 endif
 
 update: 

Modified: team/moy/mfcr2/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_adsiprog.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_adsiprog.c (original)
+++ team/moy/mfcr2/apps/app_adsiprog.c Fri Nov  7 16:48:25 2008
@@ -60,6 +60,10 @@
 		<description>
 			<para>This application programs an ADSI Phone with the given script</para>
 		</description>
+		<see-also>
+			<ref type="application">GetCPEID</ref>
+			<ref type="filename">adsi.conf</ref>
+		</see-also>
 	</application>
  ***/
 

Modified: team/moy/mfcr2/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_alarmreceiver.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_alarmreceiver.c (original)
+++ team/moy/mfcr2/apps/app_alarmreceiver.c Fri Nov  7 16:48:25 2008
@@ -66,16 +66,22 @@
 /*** DOCUMENTATION
 	<application name="AlarmReceiver" language="en_US">
 		<synopsis>
-			Provide support for receiving alarm reports from a burglar or fire alarm panel
+			Provide support for receiving alarm reports from a burglar or fire alarm panel.
 		</synopsis>
 		<syntax />
 		<description>
 			<para>This application should be called whenever there is an alarm panel calling in to dump its events.
-			The application will handshake with the alarm panel, and receive events, validate them, handshake them, and store them until the panel hangs up.
-			Once the panel hangs up, the application will run the system command specified by the eventcmd setting in <filename>alarmreceiver.conf</filename> and pipe the events to the standard input of the application. 
-			The configuration file also contains settings for DTMF timing, and for the loudness of the acknowledgement tones.</para>
+			The application will handshake with the alarm panel, and receive events, validate them, handshake them,
+			and store them until the panel hangs up. Once the panel hangs up, the application will run the system
+			command specified by the eventcmd setting in <filename>alarmreceiver.conf</filename> and pipe the
+			events to the standard input of the application.
+			The configuration file also contains settings for DTMF timing, and for the loudness of the
+			acknowledgement tones.</para>
 			<note><para>Only 1 signalling format is supported at this time: Ademco Contact ID.</para></note>
 		</description>
+		<see-also>
+			<ref type="filename">alarmreceiver.conf</ref>
+		</see-also>
 	</application>
  ***/
 

Modified: team/moy/mfcr2/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_amd.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_amd.c (original)
+++ team/moy/mfcr2/apps/app_amd.c Fri Nov  7 16:48:25 2008
@@ -116,6 +116,10 @@
 				</variable>
 			</variablelist>
 		</description>
+		<see-also>
+			<ref type="application">WaitForSilence</ref>
+			<ref type="application">WaitForNoise</ref>
+		</see-also>
 	</application>
 
  ***/

Modified: team/moy/mfcr2/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_authenticate.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_authenticate.c (original)
+++ team/moy/mfcr2/apps/app_authenticate.c Fri Nov  7 16:48:25 2008
@@ -98,6 +98,10 @@
 			<para>When using a database key, the value associated with the key can be anything.</para>
 			<para>Users have three attempts to authenticate before the channel is hung up.</para>
 		</description>
+		<see-also>
+			<ref type="application">VMAuthenticate</ref>
+			<ref type="application">DISA</ref>
+		</see-also>
 	</application>
  ***/
 

Modified: team/moy/mfcr2/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_chanspy.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_chanspy.c (original)
+++ team/moy/mfcr2/apps/app_chanspy.c Fri Nov  7 16:48:25 2008
@@ -164,6 +164,9 @@
 			single digit extension exists in the correct context ChanSpy will exit to it.
 			This also disables choosing a channel based on <literal>chanprefix</literal> and a digit sequence.</para></note>
 		</description>
+		<see-also>
+			<ref type="application">ExtenSpy</ref>
+		</see-also>
 	</application>
 	<application name="ExtenSpy" language="en_US">
 		<synopsis>
@@ -279,6 +282,9 @@
 			single digit extension exists in the correct context ChanSpy will exit to it.
 			This also disables choosing a channel based on <literal>chanprefix</literal> and a digit sequence.</para></note>
 		</description>
+		<see-also>
+			<ref type="application">ChanSpy</ref>
+		</see-also>
 	</application>
 
  ***/

Modified: team/moy/mfcr2/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_db.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_db.c (original)
+++ team/moy/mfcr2/apps/app_db.c Fri Nov  7 16:48:25 2008
@@ -55,6 +55,8 @@
 		</description>
 		<see-also>
 			<ref type="function">DB_DELETE</ref>
+			<ref type="application">DBdeltree</ref>
+			<ref type="function">DB</ref>
 		</see-also>
 	</application>
 	<application name="DBdeltree" language="en_US">
@@ -69,6 +71,11 @@
 			<para>This application will delete a <replaceable>family</replaceable> or <replaceable>keytree</replaceable>
 			from the Asterisk database.</para>
 		</description>
+		<see-also>
+			<ref type="function">DB_DELETE</ref>
+			<ref type="application">DBdel</ref>
+			<ref type="function">DB</ref>
+		</see-also>
 	</application>
  ***/
 

Modified: team/moy/mfcr2/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_directed_pickup.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_directed_pickup.c (original)
+++ team/moy/mfcr2/apps/app_directed_pickup.c Fri Nov  7 16:48:25 2008
@@ -172,42 +172,46 @@
 /* Attempt to pick up specified extension with context */
 static int pickup_by_exten(struct ast_channel *chan, const char *exten, const char *context)
 {
-	int res = -1;
-	struct ast_channel *target = NULL;
-
-	while ((target = ast_channel_walk_locked(target))) {
-		if ((!strcasecmp(target->macroexten, exten) || !strcasecmp(target->exten, exten)) &&
-			!strcasecmp(target->dialcontext, context) &&
-			can_pickup(target)) {
-			res = pickup_do(chan, target);
-			ast_channel_unlock(target);
-			break;
-		}
+	auto int find_by_exten(struct ast_channel *c);
+	int find_by_exten(struct ast_channel *c) {
+		return (!strcasecmp(c->macroexten, exten) || !strcasecmp(c->exten, exten)) &&
+			!strcasecmp(c->dialcontext, context) &&
+			can_pickup(c);
+	}
+
+	struct ast_channel *target = ast_channel_search_locked(find_by_exten);
+
+	if (target) {
+		int res = pickup_do(chan, target);
 		ast_channel_unlock(target);
-	}
-
-	return res;
+		target = NULL;
+		return res;
+	}
+
+	return -1;
 }
 
 /* Attempt to pick up specified mark */
 static int pickup_by_mark(struct ast_channel *chan, const char *mark)
 {
-	int res = -1;
-	const char *tmp = NULL;
-	struct ast_channel *target = NULL;
-
-	while ((target = ast_channel_walk_locked(target))) {
-		if ((tmp = pbx_builtin_getvar_helper(target, PICKUPMARK)) &&
+	auto int find_by_mark(struct ast_channel *);
+	int find_by_mark(struct ast_channel *c) {
+		const char *tmp;
+		return (tmp = pbx_builtin_getvar_helper(c, PICKUPMARK)) &&
 			!strcasecmp(tmp, mark) &&
-			can_pickup(target)) {
-			res = pickup_do(chan, target);
-			ast_channel_unlock(target);
-			break;
-		}
+			can_pickup(c);
+	}	
+
+	struct ast_channel *target = ast_channel_search_locked(find_by_mark);
+
+	if (target) {
+		int res = pickup_do(chan, target);
 		ast_channel_unlock(target);
-	}
-
-	return res;
+		target = NULL;
+		return res;
+	}
+
+	return -1;
 }
 
 /* application entry point for Pickup() */

Modified: team/moy/mfcr2/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_disa.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_disa.c (original)
+++ team/moy/mfcr2/apps/app_disa.c Fri Nov  7 16:48:25 2008
@@ -104,6 +104,10 @@
 			line, with the sole exception of the options. The file may contain blank
 			lines, or comments starting with <literal>#</literal> or <literal>;</literal>.</para>
 		</description>
+		<see-also>
+			<ref type="application">Authenticate</ref>
+			<ref type="application">VMAuthenticate</ref>
+		</see-also>
 	</application>
  ***/
 static char *app = "DISA";

Modified: team/moy/mfcr2/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_dumpchan.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_dumpchan.c (original)
+++ team/moy/mfcr2/apps/app_dumpchan.c Fri Nov  7 16:48:25 2008
@@ -52,6 +52,10 @@
 			displayed when the verbose level is currently set to that number
 			or greater.</para>
 		</description>
+		<see-also>
+			<ref type="application">NoOp</ref>
+			<ref type="application">Verbose</ref>
+		</see-also>
 	</application>
  ***/
 

Modified: team/moy/mfcr2/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_followme.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_followme.c (original)
+++ team/moy/mfcr2/apps/app_followme.c Fri Nov  7 16:48:25 2008
@@ -58,21 +58,42 @@
 #include "asterisk/dsp.h"
 #include "asterisk/app.h"
 
+/*** DOCUMENTATION
+	<application name="FollowMe" language="en_US">
+		<synopsis>
+			Find-Me/Follow-Me application.
+		</synopsis>
+		<syntax>
+			<parameter name="followmeid" required="true" />
+			<parameter name="options">
+				<optionlist>
+					<option name="s">
+						<para>Playback the incoming status message prior to starting
+						the follow-me step(s)</para>
+					</option>
+					<option name="a">
+						<para>Record the caller's name so it can be announced to the
+						callee on each step.</para>
+					</option>
+					<option name="n">
+						<para>Playback the unreachable status message if we've run out
+						of steps to reach the or the callee has elected not to be reachable.</para>
+					</option>
+				</optionlist>
+			</parameter>
+		</syntax>
+		<description>
+			<para>This application performs Find-Me/Follow-Me functionality for the caller
+			as defined in the profile matching the <replaceable>followmeid</replaceable> parameter in
+			<filename>followme.conf</filename>. If the specified <replaceable>followmeid</replaceable>
+			profile doesn't exist in <filename>followme.conf</filename>, execution will be returned
+			to the dialplan and call execution will continue at the next priority.</para>
+			<para>Returns -1 on hangup.</para>
+		</description>
+	</application>
+ ***/
+
 static char *app = "FollowMe";
-static char *synopsis = "Find-Me/Follow-Me application";
-static char *descrip = 
-"  FollowMe(followmeid[,options]):\n"
-"This application performs Find-Me/Follow-Me functionality for the caller\n"
-"as defined in the profile matching the <followmeid> parameter in\n"
-"followme.conf. If the specified <followmeid> profile doesn't exist in\n"
-"followme.conf, execution will be returned to the dialplan and call\n"
-"execution will continue at the next priority.\n\n"
-"  Options:\n"
-"    s    - Playback the incoming status message prior to starting the follow-me step(s)\n"
-"    a    - Record the caller's name so it can be announced to the callee on each step\n" 
-"    n    - Playback the unreachable status message if we've run out of steps to reach the\n"
-"           or the callee has elected not to be reachable.\n"
-"Returns -1 on hangup\n";
 
 /*! \brief Number structure */
 struct number {
@@ -1144,7 +1165,7 @@
 	if(!reload_followme(0))
 		return AST_MODULE_LOAD_DECLINE;
 
-	return ast_register_application(app, app_exec, synopsis, descrip);
+	return ast_register_application_xml(app, app_exec);
 }
 
 static int reload(void)

Modified: team/moy/mfcr2/apps/app_forkcdr.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_forkcdr.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_forkcdr.c (original)
+++ team/moy/mfcr2/apps/app_forkcdr.c Fri Nov  7 16:48:25 2008
@@ -37,91 +37,110 @@
 #include "asterisk/app.h"
 #include "asterisk/module.h"
 
+/*** DOCUMENTATION
+	<application name="ForkCDR" language="en_US">
+		<synopsis>
+			Forks the Call Data Record.
+		</synopsis>
+		<syntax>
+			<parameter name="options">
+				<optionlist>
+					<option name="a">
+						<para>Update the answer time on the NEW CDR just after it's been inited.
+						The new CDR may have been answered already, the reset that forkcdr does
+						will erase the answer time. This will bring it back, but the answer time
+						will be a copy of the fork/start time. It will only do this if the initial
+						cdr was indeed already answered.</para>
+					</option>
+					<option name="A">
+						<para>Lock the original CDR against the answer time being updated. This
+						will allow the disposition on the original CDR to remain the same.</para>
+					</option>
+					<option name="d">
+						<para>Copy the disposition forward from the old cdr, after the init.</para>
+					</option>
+					<option name="D">
+						<para>Clear the <literal>dstchannel</literal> on the new CDR after
+						reset.</para>
+					</option>
+					<option name="e">
+						<para>End the original CDR. Do this after all the necc. data.</para>
+					</option>
+					<option name="r">
+						<para>Do <emphasis>NOT</emphasis> reset the new cdr.</para>
+					</option>
+					<option name="s(name=val)">
+						<para>Set the CDR var <replaceable>name</replaceable> in the original CDR,
+						with value <replaceable>val</replaceable>.</para>
+					</option>
+					<option name="T">
+						<para>Mark the original CDR with a DONT_TOUCH flag. setvar, answer, and end
+						cdr funcs will obey this flag; normally they don't honor the LOCKED flag
+						set on the original CDR record.</para>
+						<note><para>Using this flag may cause CDR's not to have their end times
+						updated! It is suggested that if you specify this flag, you might wish
+						to use the <literal>e</literal> flag as well!.</para></note>
+					</option>
+					<option name="v">
+						<para>When the new CDR is forked, it gets a copy of the vars attached to
+						the current CDR. The vars attached to the original CDR are removed unless
+						this option is specified.</para>
+					</option>
+				</optionlist>
+			</parameter>
+		</syntax>
+		<description>
+			<para> Causes the Call Data Record to fork an additional cdr record starting from the time
+			of the fork call. This new cdr record will be linked to end of the list of cdr records attached
+			to the channel.	The original CDR has a LOCKED flag set, which forces most cdr operations to skip
+			it, except for the functions that set the answer and end times, which ignore the LOCKED flag. This
+			allows all the cdr records in the channel to be 'ended' together when the channel is closed.</para>
+			<para>The CDR() func (when setting CDR values) normally ignores the LOCKED flag also, but has options
+			to vary its behavior. The 'T' option (described below), can override this behavior, but beware
+			the risks.</para>
+			<para>First, this app finds the last cdr record in the list, and makes a copy of it. This new copy
+			will be the newly forked cdr record. Next, this new record is linked to the end of the cdr record list.
+			Next, The new cdr record is RESET (unless you use an option to prevent this)</para>
+			<para>This means that:</para>
+			<para>   1. All flags are unset on the cdr record</para>
+			<para>   2. the start, end, and answer times are all set to zero.</para>
+			<para>   3. the billsec and duration fields are set to zero.</para>
+			<para>   4. the start time is set to the current time.</para>
+			<para>   5. the disposition is set to NULL.</para>
+			<para>Next, unless you specified the <literal>v</literal> option, all variables will be removed from
+			the original cdr record. Thus, the <literal>v</literal> option allows any CDR variables to be replicated
+			to all new forked cdr records. Without the <literal>v</literal> option, the variables on the original
+			are effectively moved to the new forked cdr record.</para>
+			<para>Next, if the <literal>s</literal> option is set, the provided variable and value are set on the
+			original cdr record.</para>
+			<para>Next, if the <literal>a</literal> option is given, and the original cdr record has an answer time
+			set, then the new forked cdr record will have its answer time set to its start time. If the old answer
+			time were carried forward, the answer time would be earlier than the start time, giving strange
+			duration and billsec times.</para>
+			<para>If the <literal>d</literal> option was specified, the disposition is copied from
+			the original cdr record to the new forked cdr. If the <literal>D</literal> option was specified,
+			the destination channel field in the new forked CDR is erased. If the <literal>e</literal> option
+			was specified, the 'end' time for the original cdr record is set to the current time. Future hang-up or
+			ending events will not override this time stamp. If the <literal>A</literal> option is specified,
+			the original cdr record will have it ANS_LOCKED flag set, which prevent future answer events from updating
+			the original cdr record's disposition. Normally, an <literal>ANSWERED</literal> event would mark all cdr
+			records in the chain as <literal>ANSWERED</literal>. If the <literal>T</literal> option is specified,
+			the original cdr record will have its <literal>DONT_TOUCH</literal> flag set, which will force the
+			cdr_answer, cdr_end, and cdr_setvar functions to leave that cdr record alone.</para>
+			<para>And, last but not least, the original cdr record has its LOCKED flag set. Almost all internal
+			CDR functions (except for the funcs that set the end, and answer times, and set a variable) will honor
+			this flag and leave a LOCKED cdr record alone. This means that the newly created forked cdr record
+			will be affected by events transpiring within Asterisk, with the previously noted exceptions.</para>
+		</description>
+		<see-also>
+			<ref type="function">CDR</ref>
+			<ref type="application">NoCDR</ref>
+			<ref type="application">ResetCDR</ref>
+		</see-also>
+	</application>
+ ***/
+
 static char *app = "ForkCDR";
-static char *synopsis = 
-"Forks the Call Data Record";
-static char *descrip = 
-"  ForkCDR([options]):  Causes the Call Data Record to fork an additional\n"
-"cdr record starting from the time of the fork call. This new cdr record will\n"
-"be linked to end of the list of cdr records attached to the channel. The original CDR is\n"
-"has a LOCKED flag set, which forces most cdr operations to skip it, except\n"
-"for the functions that set the answer and end times, which ignore the LOCKED\n"
-"flag. This allows all the cdr records in the channel to be 'ended' together\n"
-"when the channel is closed.\n"
-"The CDR() func (when setting CDR values) normally ignores the LOCKED flag also,\n"
-"but has options to vary its behavior. The 'T' option (described below), can\n"
-"override this behavior, but beware the risks.\n"
-"\n"
-"Detailed Behavior Description:\n"
-"First, this app finds the last cdr record in the list, and makes\n"
-"a copy of it. This new copy will be the newly forked cdr record.\n"
-"Next, this new record is linked to the end of the cdr record list.\n"
-"Next, The new cdr record is RESET (unless you use an option to prevent this)\n"
-"This means that:\n"
-"   1. All flags are unset on the cdr record\n"
-"   2. the start, end, and answer times are all set to zero.\n"
-"   3. the billsec and duration fields are set to zero.\n"
-"   4. the start time is set to the current time.\n"
-"   5. the disposition is set to NULL.\n"
-"Next, unless you specified the 'v' option, all variables will be\n"
-"removed from the original cdr record. Thus, the 'v' option allows\n"
-"any CDR variables to be replicated to all new forked cdr records.\n"
-"Without the 'v' option, the variables on the original are effectively\n"
-"moved to the new forked cdr record.\n"
-"Next, if the 's' option is set, the provided variable and value\n"
-"are set on the original cdr record.\n"
-"Next, if the 'a' option is given, and the original cdr record has an\n"
-"answer time set, then the new forked cdr record will have its answer\n"
-"time set to its start time. If the old answer time were carried forward,\n"
-"the answer time would be earlier than the start time, giving strange\n"
-"duration and billsec times.\n"
-"Next, if the 'd' option was specified, the disposition is copied from\n"
-"the original cdr record to the new forked cdr.\n"
-"Next, if the 'D' option was specified, the destination channel field\n"
-"in the new forked CDR is erased.\n"
-"Next, if the 'e' option was specified, the 'end' time for the original\n"
-"cdr record is set to the current time. Future hang-up or ending events\n"
-"will not override this time stamp.\n"
-"Next, If the 'A' option is specified, the original cdr record will have\n"
-"it ANS_LOCKED flag set, which prevent future answer events\n"
-"from updating the original cdr record's disposition. Normally, an\n"
-"'ANSWERED' event would mark all cdr records in the chain as 'ANSWERED'.\n"
-"Next, if the 'T' option is specified, the original cdr record will have\n"
-"its 'DONT_TOUCH' flag set, which will force the cdr_answer, cdr_end, and\n"
-"cdr_setvar functions to leave that cdr record alone.\n"
-"And, last but not least, the original cdr record has its LOCKED flag\n"
-"set. Almost all internal CDR functions (except for the funcs that set\n"
-"the end, and answer times, and set a variable) will honor this flag\n"
-"and leave a LOCKED cdr record alone.\n"
-"This means that the newly created forked cdr record will affected\n"
-"by events transpiring within Asterisk, with the previously noted\n"
-"exceptions.\n"
-"  Options:\n"
-"    a - update the answer time on the NEW CDR just after it's been inited..\n"
-"         The new CDR may have been answered already, the reset that forkcdr.\n"
-"         does will erase the answer time. This will bring it back, but\n"
-"         the answer time will be a copy of the fork/start time. It will.\n"
-"         only do this if the initial cdr was indeed already answered..\n"
-"    A - Lock the original CDR against the answer time being updated.\n"
-"         This will allow the disposition on the original CDR to remain the same.\n"
-"    d - Copy the disposition forward from the old cdr, after the .\n"
-"         init..\n"
-"    D - Clear the dstchannel on the new CDR after reset..\n"
-"    e - end the original CDR. Do this after all the necc. data.\n"
-"         is copied from the original CDR to the new forked CDR..\n"
-"    R -  do NOT reset the new cdr..\n"
-"    s(name=val) - Set the CDR var 'name' in the original CDR, with value.\n"
-"                  'val'.\n"
-"    T -  Mark the original CDR with a DONT_TOUCH flag. setvar, answer, and end\n"
-"          cdr funcs will obey this flag; normally they don't honor the LOCKED\n"
-"          flag set on the original CDR record.\n"
-"          Beware-- using this flag may cause CDR's not to have their end times\n"
-"          updated! It is suggested that if you specify this flag, you might\n"
-"          wish to use the 'e' flag as well!\n"
-"    v  - When the new CDR is forked, it gets a copy of the vars attached\n"
-"         to the current CDR. The vars attached to the original CDR are removed\n"
-"         unless this option is specified.\n";
-
 
 enum {
 	OPT_SETANS =            (1 << 0),
@@ -247,7 +266,7 @@
 
 static int load_module(void)
 {
-	return ast_register_application(app, forkcdr_exec, synopsis, descrip);
+	return ast_register_application_xml(app, forkcdr_exec);
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Fork The CDR into 2 separate entities");

Modified: team/moy/mfcr2/apps/app_image.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_image.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_image.c (original)
+++ team/moy/mfcr2/apps/app_image.c Fri Nov  7 16:48:25 2008
@@ -62,6 +62,10 @@
 				</variable>
 			</variablelist>
 		</description>
+		<see-also>
+			<ref type="application">SendText</ref>
+			<ref type="application">SendURL</ref>
+		</see-also>
 	</application>
  ***/
 

Modified: team/moy/mfcr2/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_macro.c?view=diff&rev=155412&r1=155411&r2=155412
==============================================================================
--- team/moy/mfcr2/apps/app_macro.c (original)
+++ team/moy/mfcr2/apps/app_macro.c Fri Nov  7 16:48:25 2008
@@ -37,66 +37,123 @@
 #include "asterisk/utils.h"
 #include "asterisk/lock.h"
 
+/*** DOCUMENTATION
+	<application name="Macro" language="en_US">
+		<synopsis>
+			Macro Implementation.
+		</synopsis>
+		<syntax>
+			<parameter name="name" required="true">
+				<para>The name of the macro</para>
+			</parameter>
+			<parameter name="args">
+				<argument name="arg1" required="true" />
+				<argument name="arg2" multiple="true" />
+			</parameter>
+		</syntax>
+		<description>
+			<para>Executes a macro using the context macro-<replaceable>name</replaceable>,
+			jumping to the <literal>s</literal> extension of that context and executing each step,
+			then returning when the steps end.</para>
+			<para>The calling extension, context, and priority are stored in <variable>MACRO_EXTEN</variable>,
+			<variable>MACRO_CONTEXT</variable> and <variable>MACRO_PRIORITY</variable> respectively. Arguments
+			become <variable>ARG1</variable>, <variable>ARG2</variable>, etc in the macro context.</para>
+			<para>If you Goto out of the Macro context, the Macro will terminate and control will be returned
+			at the location of the Goto.</para>
+			<para>If <variable>MACRO_OFFSET</variable> is set at termination, Macro will attempt to continue
+			at priority MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise.</para>
+			<para>Extensions: While a macro is being executed, it becomes the current context. This means that if
+			a hangup occurs, for instance, that the macro will be searched for an <literal>h</literal> extension,
+			NOT the context from which the macro was called. So, make sure to define all appropriate extensions
+			in your macro! (Note: AEL does not use macros)</para>
+			<warning><para>Because of the way Macro is implemented (it executes the priorities contained within
+			it via sub-engine), and a fixed per-thread memory stack allowance, macros are limited to 7 levels
+			of nesting (macro calling macro calling macro, etc.); It may be possible that stack-intensive
+			applications in deeply nested macros could cause asterisk to crash earlier than this limit.
+			It is advised that if you need to deeply nest macro calls, that you use the Gosub application
+			(now allows arguments like a Macro) with explict Return() calls instead.</para></warning>
+		</description>
+		<see-also>
+			<ref type="application">MacroExit</ref>
+			<ref type="application">Goto</ref>
+			<ref type="application">Gosub</ref>
+		</see-also>
+	</application>
+	<application name="MacroIf" language="en_US">
+		<synopsis>
+			Conditional Macro implementation.
+		</synopsis>
+		<syntax argsep="?">
+			<parameter name="expr" required="true" />
+			<parameter name="destination" required="true" argsep=":">
+				<argument name="macroiftrue" required="true">
+					<argument name="macroiftrue" required="true" />
+					<argument name="arg1" multiple="true" />
+				</argument>
+				<argument name="macroiffalse">
+					<argument name="macroiffalse" required="true" />
+					<argument name="arg1" multiple="true" />
+				</argument>
+			</parameter>
+		</syntax>
+		<description>
+			<para>Executes macro defined in <replaceable>macroiftrue</replaceable> if
+			<replaceable>expr</replaceable> is true (otherwise <replaceable>macroiffalse</replaceable>
+			if provided)</para>
+			<para>Arguments and return values as in application Macro()</para>
+		</description>
+		<see-also>
+			<ref type="application">GotoIf</ref>
+			<ref type="application">GosubIf</ref>
+			<ref type="function">IF</ref>
+		</see-also>
+	</application>
+	<application name="MacroExclusive" language="en_US">
+		<synopsis>
+			Exclusive Macro Implementation.
+		</synopsis>
+		<syntax>
+			<parameter name="name" required="true">
+				<para>The name of the macro</para>
+			</parameter>
+			<parameter name="arg1" />
+			<parameter name="arg2" multiple="true" />
+		</syntax>
+		<description>
+			<para>Executes macro defined in the context macro-<replaceable>name</replaceable>.
+			Only one call at a time may run the macro. (we'll wait if another call is busy
+			executing in the Macro)</para>
+			<para>Arguments and return values as in application Macro()</para>
+		</description>
+		<see-also>
+			<ref type="application">Macro</ref>
+		</see-also>
+	</application>
+	<application name="MacroExit" language="en_US">
+		<synopsis>
+			Exit from Macro.
+		</synopsis>
+		<syntax />
+		<description>
+			<para>Causes the currently running macro to exit as if it had
+			ended normally by running out of priorities to execute.
+			If used outside a macro, will likely cause unexpected behavior.</para>
+		</description>
+		<see-also>
+			<ref type="application">Macro</ref>
+		</see-also>
+	</application>
+ ***/
+
 #define MAX_ARGS 80
 
 /* special result value used to force macro exit */
 #define MACRO_EXIT_RESULT 1024
-
-static char *descrip =
-"  Macro(macroname,arg1,arg2...): Executes a macro using the context\n"
-"'macro-<macroname>', jumping to the 's' extension of that context and\n"
-"executing each step, then returning when the steps end. \n"
-"The calling extension, context, and priority are stored in ${MACRO_EXTEN}, \n"
-"${MACRO_CONTEXT} and ${MACRO_PRIORITY} respectively.  Arguments become\n"
-"${ARG1}, ${ARG2}, etc in the macro context.\n"
-"If you Goto out of the Macro context, the Macro will terminate and control\n"
-"will be returned at the location of the Goto.\n"
-"If ${MACRO_OFFSET} is set at termination, Macro will attempt to continue\n"
-"at priority MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise.\n"
-"Extensions: While a macro is being executed, it becomes the current context.\n"
-"            This means that if a hangup occurs, for instance, that the macro\n"
-"            will be searched for an 'h' extension, NOT the context from which\n"
-"            the macro was called. So, make sure to define all appropriate\n"
-"            extensions in your macro! (Note: AEL does not use macros)\n"
-"WARNING: Because of the way Macro is implemented (it executes the priorities\n"
-"         contained within it via sub-engine), and a fixed per-thread\n"
-"         memory stack allowance, macros are limited to 7 levels\n"
-"         of nesting (macro calling macro calling macro, etc.); It\n"
-"         may be possible that stack-intensive applications in deeply nested macros\n"
-"         could cause asterisk to crash earlier than this limit. It is advised that\n"
-"         if you need to deeply nest macro calls, that you use the Gosub application\n"
-"         (now allows arguments like a Macro) with explict Return() calls instead.\n";
-
-static char *if_descrip =
-"  MacroIf(<expr>?macroname_a[,arg1][:macroname_b[,arg1]])\n"
-"Executes macro defined in <macroname_a> if <expr> is true\n"
-"(otherwise <macroname_b> if provided)\n"
-"Arguments and return values as in application Macro()\n";
-
-static char *exclusive_descrip =
-"  MacroExclusive(macroname,arg1,arg2...):\n"
-"Executes macro defined in the context 'macro-macroname'\n"
-"Only one call at a time may run the macro.\n"
-"(we'll wait if another call is busy executing in the Macro)\n"
-"Arguments and return values as in application Macro()\n";
-
-static char *exit_descrip =
-"  MacroExit():\n"
-"Causes the currently running macro to exit as if it had\n"
-"ended normally by running out of priorities to execute.\n"
-"If used outside a macro, will likely cause unexpected\n"
-"behavior.\n";
 
 static char *app = "Macro";
 static char *if_app = "MacroIf";
 static char *exclusive_app = "MacroExclusive";
 static char *exit_app = "MacroExit";
-
-static char *synopsis = "Macro Implementation";
-static char *if_synopsis = "Conditional Macro Implementation";
-static char *exclusive_synopsis = "Exclusive Macro Implementation";
-static char *exit_synopsis = "Exit From Macro";
-
 
 static struct ast_exten *find_matching_priority(struct ast_context *c, const char *exten, int priority, const char *callerid)
 {
@@ -524,10 +581,10 @@
 {
 	int res;
 
-	res = ast_register_application(exit_app, macro_exit_exec, exit_synopsis, exit_descrip);
-	res |= ast_register_application(if_app, macroif_exec, if_synopsis, if_descrip);
-	res |= ast_register_application(exclusive_app, macroexclusive_exec, exclusive_synopsis, exclusive_descrip);
-	res |= ast_register_application(app, macro_exec, synopsis, descrip);
+	res = ast_register_application_xml(exit_app, macro_exit_exec);
+	res |= ast_register_application_xml(if_app, macroif_exec);
+	res |= ast_register_application_xml(exclusive_app, macroexclusive_exec);
+	res |= ast_register_application_xml(app, macro_exec);
 
 	return res;
 }


[... 5287 lines stripped ...]



More information about the asterisk-commits mailing list