[asterisk-commits] lathama: branch lathama/doxygencleanups r374163 - in /team/lathama/doxygencle...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 1 18:20:05 CDT 2012


Author: lathama
Date: Mon Oct  1 18:19:44 2012
New Revision: 374163

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=374163
Log:
Sync in offline edits and get this automerge working


Modified:
    team/lathama/doxygencleanups/   (props changed)
    team/lathama/doxygencleanups/CHANGES
    team/lathama/doxygencleanups/Makefile
    team/lathama/doxygencleanups/UPGRADE.txt
    team/lathama/doxygencleanups/addons/app_mysql.c
    team/lathama/doxygencleanups/apps/app_adsiprog.c
    team/lathama/doxygencleanups/apps/app_alarmreceiver.c
    team/lathama/doxygencleanups/apps/app_amd.c
    team/lathama/doxygencleanups/apps/app_confbridge.c
    team/lathama/doxygencleanups/apps/app_dial.c
    team/lathama/doxygencleanups/apps/app_festival.c
    team/lathama/doxygencleanups/apps/app_followme.c
    team/lathama/doxygencleanups/apps/app_meetme.c
    team/lathama/doxygencleanups/apps/app_mixmonitor.c
    team/lathama/doxygencleanups/apps/app_queue.c
    team/lathama/doxygencleanups/apps/app_senddtmf.c
    team/lathama/doxygencleanups/apps/app_skel.c
    team/lathama/doxygencleanups/apps/app_speech_utils.c
    team/lathama/doxygencleanups/apps/app_voicemail.c
    team/lathama/doxygencleanups/apps/confbridge/conf_config_parser.c
    team/lathama/doxygencleanups/channels/chan_agent.c
    team/lathama/doxygencleanups/channels/chan_alsa.c
    team/lathama/doxygencleanups/channels/chan_console.c
    team/lathama/doxygencleanups/channels/chan_dahdi.c
    team/lathama/doxygencleanups/channels/chan_gtalk.c
    team/lathama/doxygencleanups/channels/chan_iax2.c
    team/lathama/doxygencleanups/channels/chan_jingle.c
    team/lathama/doxygencleanups/channels/chan_local.c
    team/lathama/doxygencleanups/channels/chan_mgcp.c
    team/lathama/doxygencleanups/channels/chan_misdn.c
    team/lathama/doxygencleanups/channels/chan_motif.c
    team/lathama/doxygencleanups/channels/chan_oss.c
    team/lathama/doxygencleanups/channels/chan_sip.c
    team/lathama/doxygencleanups/channels/chan_skinny.c
    team/lathama/doxygencleanups/channels/chan_vpb.cc
    team/lathama/doxygencleanups/channels/sig_analog.c
    team/lathama/doxygencleanups/channels/sig_pri.c
    team/lathama/doxygencleanups/channels/sip/include/sip.h
    team/lathama/doxygencleanups/codecs/Makefile
    team/lathama/doxygencleanups/codecs/ilbc/iLBC_decode.c
    team/lathama/doxygencleanups/codecs/ilbc/iLBC_encode.c
    team/lathama/doxygencleanups/configs/agents.conf.sample
    team/lathama/doxygencleanups/configs/res_odbc.conf.sample
    team/lathama/doxygencleanups/configs/rtp.conf.sample
    team/lathama/doxygencleanups/configs/sip.conf.sample
    team/lathama/doxygencleanups/funcs/func_audiohookinherit.c
    team/lathama/doxygencleanups/funcs/func_callerid.c
    team/lathama/doxygencleanups/funcs/func_presencestate.c
    team/lathama/doxygencleanups/include/asterisk/astdb.h
    team/lathama/doxygencleanups/include/asterisk/callerid.h
    team/lathama/doxygencleanups/include/asterisk/channel.h
    team/lathama/doxygencleanups/include/asterisk/doxyref.h
    team/lathama/doxygencleanups/include/asterisk/http_websocket.h
    team/lathama/doxygencleanups/include/asterisk/speech.h
    team/lathama/doxygencleanups/main/app.c
    team/lathama/doxygencleanups/main/asterisk.c
    team/lathama/doxygencleanups/main/callerid.c
    team/lathama/doxygencleanups/main/channel.c
    team/lathama/doxygencleanups/main/cli.c
    team/lathama/doxygencleanups/main/db.c
    team/lathama/doxygencleanups/main/http.c
    team/lathama/doxygencleanups/main/loader.c
    team/lathama/doxygencleanups/main/message.c
    team/lathama/doxygencleanups/main/say.c
    team/lathama/doxygencleanups/res/res_agi.c
    team/lathama/doxygencleanups/res/res_calendar.c
    team/lathama/doxygencleanups/res/res_clialiases.c
    team/lathama/doxygencleanups/res/res_config_ldap.c
    team/lathama/doxygencleanups/res/res_config_sqlite.c
    team/lathama/doxygencleanups/res/res_config_sqlite3.c
    team/lathama/doxygencleanups/res/res_curl.c
    team/lathama/doxygencleanups/res/res_fax.c
    team/lathama/doxygencleanups/res/res_format_attr_h264.c
    team/lathama/doxygencleanups/res/res_http_websocket.c
    team/lathama/doxygencleanups/res/res_jabber.c
    team/lathama/doxygencleanups/res/res_musiconhold.c
    team/lathama/doxygencleanups/res/res_odbc.c
    team/lathama/doxygencleanups/res/res_phoneprov.c
    team/lathama/doxygencleanups/res/res_rtp_asterisk.c
    team/lathama/doxygencleanups/res/res_rtp_multicast.c
    team/lathama/doxygencleanups/res/res_smdi.c
    team/lathama/doxygencleanups/res/res_snmp.c
    team/lathama/doxygencleanups/res/res_speech.c
    team/lathama/doxygencleanups/res/res_timing_kqueue.c
    team/lathama/doxygencleanups/res/res_xmpp.c
    team/lathama/doxygencleanups/tests/test_db.c

Propchange: team/lathama/doxygencleanups/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/lathama/doxygencleanups/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Oct  1 18:19:44 2012
@@ -1,1 +1,1 @@
-/trunk:1-373320
+/trunk:1-374161

Modified: team/lathama/doxygencleanups/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/CHANGES?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/CHANGES (original)
+++ team/lathama/doxygencleanups/CHANGES Mon Oct  1 18:19:44 2012
@@ -17,6 +17,12 @@
    that the request is against a known peer. It also issues a new event,
    'SIPqualifypeerdone', once the qualify action has been completed.
 
+ * The PlayDTMF action now supports an optional 'Duration' parameter.  This
+   specifies the duration of the digit to be played, in milliseconds.
+
+ * Added VoicemailRefresh action to allow an external entity to trigger mailbox
+   updates when changes occur instead of requiring the use of pollmailboxes.
+
 Logging
 -------------------
  * When performing queue pause/unpause on an interface without specifying an
@@ -29,6 +35,13 @@
    Note: the suffix '_avail' after the queuename.
    Reports 'InUse' for no logged in agents or no free agents.
    Reports 'Idle' when an agent is free.
+
+Core
+------------------
+ * Redirecting reasons can now be set to arbitrary strings. This means
+   that the REDIRECTING dialplan function can be used to set the redirecting
+   reason to any string. It also allows for custom strings to be read as the
+   redirecting reason from SIP Diversion headers.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 10 to Asterisk 11 --------------------

Modified: team/lathama/doxygencleanups/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/Makefile?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/Makefile (original)
+++ team/lathama/doxygencleanups/Makefile Mon Oct  1 18:19:44 2012
@@ -743,10 +743,10 @@
 	@echo " +-------------------------------------------+"
 
 progdocs:
-	doxygen -u contrib/doxygen.conf
-	(cat contrib/doxygen.conf; echo "HAVE_DOT=$(HAVEDOT)"; \
+	doxygen -u contrib/asterisk-ng-doxygen
+	(cat contrib/asterisk-ng-doxygen; echo "HAVE_DOT=$(HAVEDOT)"; \
 	echo "PROJECT_NUMBER=$(ASTERISKVERSION)") | doxygen -
-	rm -f contrib/doxygen.conf.bak
+	rm -f contrib/asterisk-ng-doxygen.bak
 
 install-logrotate:
 	if [ ! -d "$(DESTDIR)$(ASTETCDIR)/../logrotate.d" ]; then \

Modified: team/lathama/doxygencleanups/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/UPGRADE.txt?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/UPGRADE.txt (original)
+++ team/lathama/doxygencleanups/UPGRADE.txt Mon Oct  1 18:19:44 2012
@@ -31,6 +31,23 @@
 Queue:
  - Queue logging for PAUSEALL/UNPAUSEALL now only occurs if the interface this is
    performed on is a member of at least one queue.
+
+Dial:
+ - Now recognizes 'W' to pause sending DTMF for one second in addition to
+   the previously existing 'w' that paused sending DTMF for half a second.
+
+ExternalIVR:
+ - Now recognizes 'W' to pause sending DTMF for one second in addition to
+   the previously existing 'w' that paused sending DTMF for half a second.
+
+SendDTMF:
+ - Now recognizes 'W' to pause sending DTMF for one second in addition to
+   the previously existing 'w' that paused sending DTMF for half a second.
+
+chan_dahdi:
+ - Analog port dialing and deferred DTMF dialing for PRI now distinguishes
+   between 'w' and 'W'.  The 'w' pauses dialing for half a second.  The 'W'
+   pauses dialing for one second.
 
 From 10 to 11:
 

Modified: team/lathama/doxygencleanups/addons/app_mysql.c
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/addons/app_mysql.c?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/addons/app_mysql.c (original)
+++ team/lathama/doxygencleanups/addons/app_mysql.c Mon Oct  1 18:19:44 2012
@@ -23,9 +23,8 @@
  * \ingroup applications
  */
 
-/*! 
- * \par The application app_mysql uses configuration files
- * \li \ref app_mysql.conf
+/*!
+ * \li The application app_mysql uses the configuration file \ref app_mysql.conf
  * \addtogroup configuration_file Configuration Files
  */
 
@@ -616,6 +615,16 @@
 	return ast_unregister_application(app);
 }
 
+/*!
+ * \brief Load the module
+ *
+ * Module loading including tests for configuration or dependencies.
+ * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
+ * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the 
+ * configuration file or other non-critical problem return 
+ * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
+ */
 static int load_module(void)
 {
 	struct MYSQLidshead *headp = &_mysql_ids_head;

Modified: team/lathama/doxygencleanups/apps/app_adsiprog.c
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/apps/app_adsiprog.c?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/apps/app_adsiprog.c (original)
+++ team/lathama/doxygencleanups/apps/app_adsiprog.c Mon Oct  1 18:19:44 2012
@@ -26,20 +26,13 @@
  */
 
 /*! 
- * \par The application app_adsiprog uses configuration files
- * \li \ref adsi.conf
- * \li \ref asterisk.adsi
+ * \li The application app_adsiprog uses the configuration file \ref adsi.conf
  * \addtogroup configuration_file Configuration Files
  */
 
 /*! 
  * \page adsi.conf adsi.conf
  * \verbinclude adsi.conf.sample
- */
-
-/*! 
- * \page asterisk.adsi asterisk.adsi
- * \verbinclude asterisk.adsi
  */
 
 /*** MODULEINFO
@@ -1602,6 +1595,16 @@
 	return ast_unregister_application(app);
 }
 
+/*!
+ * \brief Load the module
+ *
+ * Module loading including tests for configuration or dependencies.
+ * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
+ * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the 
+ * configuration file or other non-critical problem return 
+ * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
+ */
 static int load_module(void)
 {
 	if (ast_register_application_xml(app, adsi_exec))

Modified: team/lathama/doxygencleanups/apps/app_alarmreceiver.c
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/apps/app_alarmreceiver.c?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/apps/app_alarmreceiver.c (original)
+++ team/lathama/doxygencleanups/apps/app_alarmreceiver.c Mon Oct  1 18:19:44 2012
@@ -31,8 +31,7 @@
  */
 
 /*! 
- * \par The application app_alarmreceiver uses configuration files
- * \li \ref alarmreceiver.conf
+ * \li The application app_alarmreceiver uses the configuration file \ref alarmreceiver.conf
  * \addtogroup configuration_file Configuration Files
  */
 
@@ -735,11 +734,15 @@
 	return ast_unregister_application(app);
 }
 
-/**
- * \brief Register Alarm Receiver App
- *
- * \retval 0 success
- * \retval -1 failure
+/*!
+ * \brief Load the module
+ *
+ * Module loading including tests for configuration or dependencies.
+ * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
+ * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the 
+ * configuration file or other non-critical problem return 
+ * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
  */
 static int load_module(void)
 {

Modified: team/lathama/doxygencleanups/apps/app_amd.c
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/apps/app_amd.c?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/apps/app_amd.c (original)
+++ team/lathama/doxygencleanups/apps/app_amd.c Mon Oct  1 18:19:44 2012
@@ -28,9 +28,8 @@
  * \ingroup applications
  */
 
-/*! 
- * \par The application app_amd uses configuration files
- * \li \ref amd.conf
+/*!
+ * \li The application app_amd uses the configuration file \ref amd.conf
  * \addtogroup configuration_file Configuration Files
  */
 
@@ -500,6 +499,16 @@
 	return ast_unregister_application(app);
 }
 
+/*!
+ * \brief Load the module
+ *
+ * Module loading including tests for configuration or dependencies.
+ * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
+ * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the 
+ * configuration file or other non-critical problem return 
+ * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
+ */
 static int load_module(void)
 {
 	if (load_config(0))

Modified: team/lathama/doxygencleanups/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/apps/app_confbridge.c?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/apps/app_confbridge.c (original)
+++ team/lathama/doxygencleanups/apps/app_confbridge.c Mon Oct  1 18:19:44 2012
@@ -29,9 +29,7 @@
  */
 
 /*! 
- * \par The application app_confbridge uses configuration files
- * \li \ref confbridge.conf
- *
+ * \li The application app_confbridge uses the configuration file \ref confbridge.conf
  * \addtogroup configuration_file Configuration Files
  */
 
@@ -2839,7 +2837,16 @@
 	return res;
 }
 
-/*! \brief Called when module is being loaded */
+/*!
+ * \brief Load the module
+ *
+ * Module loading including tests for configuration or dependencies.
+ * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
+ * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the 
+ * configuration file or other non-critical problem return 
+ * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
+ */
 static int load_module(void)
 {
 	int res = 0;

Modified: team/lathama/doxygencleanups/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/apps/app_dial.c?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/apps/app_dial.c (original)
+++ team/lathama/doxygencleanups/apps/app_dial.c Mon Oct  1 18:19:44 2012
@@ -151,11 +151,12 @@
 					<argument name="calling" />
 					<argument name="progress" />
 					<para>Send the specified DTMF strings <emphasis>after</emphasis> the called
-					party has answered, but before the call gets bridged. The 
-					<replaceable>called</replaceable> DTMF string is sent to the called party, and the 
-					<replaceable>calling</replaceable> DTMF string is sent to the calling party. Both arguments 
+					party has answered, but before the call gets bridged.  The
+					<replaceable>called</replaceable> DTMF string is sent to the called party, and the
+					<replaceable>calling</replaceable> DTMF string is sent to the calling party.  Both arguments
 					can be used alone.  If <replaceable>progress</replaceable> is specified, its DTMF is sent
-					immediately after receiving a PROGRESS message.</para>
+					to the called party immediately after receiving a PROGRESS message.</para>
+					<para>See SendDTMF for valid digits.</para>
 				</option>
 				<option name="e">
 					<para>Execute the <literal>h</literal> extension for peer after the call ends</para>

Modified: team/lathama/doxygencleanups/apps/app_festival.c
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/apps/app_festival.c?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/apps/app_festival.c (original)
+++ team/lathama/doxygencleanups/apps/app_festival.c Mon Oct  1 18:19:44 2012
@@ -27,10 +27,8 @@
  * \ingroup applications
  */
 
-/*! 
- * \par The application app_festival uses configuration files
- * \li \ref festival.conf
- *
+/*!
+ * \li The application app_festival uses the configuration file \ref festival.conf
  * \addtogroup configuration_file Configuration Files
  */
 
@@ -549,6 +547,16 @@
 	return ast_unregister_application(app);
 }
 
+/*!
+ * \brief Load the module
+ *
+ * Module loading including tests for configuration or dependencies.
+ * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
+ * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the 
+ * configuration file or other non-critical problem return 
+ * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
+ */
 static int load_module(void)
 {
 	struct ast_flags config_flags = { 0 };

Modified: team/lathama/doxygencleanups/apps/app_followme.c
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/apps/app_followme.c?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/apps/app_followme.c (original)
+++ team/lathama/doxygencleanups/apps/app_followme.c Mon Oct  1 18:19:44 2012
@@ -26,10 +26,8 @@
  * \ingroup applications
  */
 
-/*! 
- * \par The application app_followme uses configuration files
- * \li \ref followme.conf
- *
+/*!
+ * \li The application app_followme uses the configuration file \ref followme.conf
  * \addtogroup configuration_file Configuration Files
  */
 
@@ -1565,6 +1563,16 @@
 	return 0;
 }
 
+/*!
+ * \brief Load the module
+ *
+ * Module loading including tests for configuration or dependencies.
+ * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
+ * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the 
+ * configuration file or other non-critical problem return 
+ * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
+ */
 static int load_module(void)
 {
 	if(!reload_followme(0))

Modified: team/lathama/doxygencleanups/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/apps/app_meetme.c?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/apps/app_meetme.c (original)
+++ team/lathama/doxygencleanups/apps/app_meetme.c Mon Oct  1 18:19:44 2012
@@ -30,9 +30,7 @@
  */
 
 /*! 
- * \par The application app_meetme uses configuration files
- * \li \ref meetme.conf
- *
+ * \li The application app_meetme uses configuration file \ref meetme.conf
  * \addtogroup configuration_file Configuration Files
  */
 
@@ -550,8 +548,9 @@
 	</manager>
  ***/
 
-#define CONFIG_FILE_NAME "meetme.conf"
-#define SLA_CONFIG_FILE  "sla.conf"
+#define CONFIG_FILE_NAME	"meetme.conf"
+#define SLA_CONFIG_FILE		"sla.conf"
+#define STR_CONCISE			"concise"
 
 /*! each buffer is 20ms, so this is 640ms total */
 #define DEFAULT_AUDIO_BUFFERS  32
@@ -1348,71 +1347,131 @@
 	return cnf;
 }
 
-static char *complete_meetmecmd(const char *line, const char *word, int pos, int state)
-{
-	static const char * const cmds[] = {"concise", "lock", "unlock", "mute", "unmute", "kick", "list", NULL};
-
+static char *complete_confno(const char *word, int state)
+{
+	struct ast_conference *cnf;
+	char *ret = NULL;
+	int which = 0;
 	int len = strlen(word);
+
+	AST_LIST_LOCK(&confs);
+	AST_LIST_TRAVERSE(&confs, cnf, list) {
+		if (!strncmp(word, cnf->confno, len) && ++which > state) {
+			/* dup before releasing the lock */
+			ret = ast_strdup(cnf->confno);
+			break;
+		}
+	}
+	AST_LIST_UNLOCK(&confs);
+	return ret;
+}
+
+static char *complete_userno(struct ast_conference *cnf, const char *word, int state)
+{
+	char usrno[50];
+	struct ao2_iterator iter;
+	struct ast_conf_user *usr;
+	char *ret = NULL;
 	int which = 0;
-	struct ast_conference *cnf = NULL;
-	struct ast_conf_user *usr = NULL;
-	char *confno = NULL;
-	char usrno[50] = "";
-	char *myline, *ret = NULL;
-	
-	if (pos == 1) {		/* Command */
-		return ast_cli_complete(word, cmds, state);
-	} else if (pos == 2) {	/* Conference Number */
+	int len = strlen(word);
+
+	iter = ao2_iterator_init(cnf->usercontainer, 0);
+	for (; (usr = ao2_iterator_next(&iter)); ao2_ref(usr, -1)) {
+		snprintf(usrno, sizeof(usrno), "%d", usr->user_no);
+		if (!strncmp(word, usrno, len) && ++which > state) {
+			ao2_ref(usr, -1);
+			ret = ast_strdup(usrno);
+			break;
+		}
+	}
+	ao2_iterator_destroy(&iter);
+	return ret;
+}
+
+static char *complete_meetmecmd_mute_kick(const char *line, const char *word, int pos, int state)
+{
+	if (pos == 2) {
+		return complete_confno(word, state);
+	}
+	if (pos == 3) {
+		int len = strlen(word);
+		char *ret = NULL;
+		char *saved = NULL;
+		char *myline;
+		char *confno;
+		struct ast_conference *cnf;
+
+		if (!strncasecmp(word, "all", len)) {
+			if (state == 0) {
+				return ast_strdup("all");
+			}
+			--state;
+		}
+
+		/* Extract the confno from the command line. */
+		myline = ast_strdupa(line);
+		strtok_r(myline, " ", &saved);
+		strtok_r(NULL, " ", &saved);
+		confno = strtok_r(NULL, " ", &saved);
+
 		AST_LIST_LOCK(&confs);
 		AST_LIST_TRAVERSE(&confs, cnf, list) {
-			if (!strncasecmp(word, cnf->confno, len) && ++which > state) {
-				ret = cnf->confno;
+			if (!strcmp(confno, cnf->confno)) {
+				ret = complete_userno(cnf, word, state);
 				break;
 			}
 		}
-		ret = ast_strdup(ret); /* dup before releasing the lock */
 		AST_LIST_UNLOCK(&confs);
+
 		return ret;
-	} else if (pos == 3) {
-		/* User Number || Conf Command option*/
-		if (strstr(line, "mute") || strstr(line, "kick")) {
-			if (state == 0 && (strstr(line, "kick") || strstr(line, "mute")) && !strncasecmp(word, "all", len))
-				return ast_strdup("all");
-			which++;
-			AST_LIST_LOCK(&confs);
-
-			/* TODO: Find the conf number from the cmdline (ignore spaces) <- test this and make it fail-safe! */
-			myline = ast_strdupa(line);
-			if (strsep(&myline, " ") && strsep(&myline, " ") && !confno) {
-				while((confno = strsep(&myline, " ")) && (strcmp(confno, " ") == 0))
-					;
-			}
-			
-			AST_LIST_TRAVERSE(&confs, cnf, list) {
-				if (!strcmp(confno, cnf->confno))
-				    break;
-			}
-
-			if (cnf) {
-				struct ao2_iterator user_iter;
-				user_iter = ao2_iterator_init(cnf->usercontainer, 0);
-
-				while((usr = ao2_iterator_next(&user_iter))) {
-					snprintf(usrno, sizeof(usrno), "%d", usr->user_no);
-					if (!strncasecmp(word, usrno, len) && ++which > state) {
-						ao2_ref(usr, -1);
-						break;
-					}
-					ao2_ref(usr, -1);
-				}
-				ao2_iterator_destroy(&user_iter);
-				AST_LIST_UNLOCK(&confs);
-				return usr ? ast_strdup(usrno) : NULL;
-			}
-			AST_LIST_UNLOCK(&confs);
-		}
-	}
-
+	}
+	return NULL;
+}
+
+static char *complete_meetmecmd_lock(const char *word, int pos, int state)
+{
+	if (pos == 2) {
+		return complete_confno(word, state);
+	}
+	return NULL;
+}
+
+static char *complete_meetmecmd_list(const char *line, const char *word, int pos, int state)
+{
+	int len;
+
+	if (pos == 2) {
+		len = strlen(word);
+		if (!strncasecmp(word, STR_CONCISE, len)) {
+			if (state == 0) {
+				return ast_strdup(STR_CONCISE);
+			}
+			--state;
+		}
+
+		return complete_confno(word, state);
+	}
+	if (pos == 3 && state == 0) {
+		char *saved = NULL;
+		char *myline;
+		char *confno;
+
+		/* Extract the confno from the command line. */
+		myline = ast_strdupa(line);
+		strtok_r(myline, " ", &saved);
+		strtok_r(NULL, " ", &saved);
+		confno = strtok_r(NULL, " ", &saved);
+
+		if (!strcasecmp(confno, STR_CONCISE)) {
+			/* There is nothing valid in this position now. */
+			return NULL;
+		}
+
+		len = strlen(word);
+		if (!strncasecmp(word, STR_CONCISE, len)) {
+			return ast_strdup(STR_CONCISE);
+		}
+	}
 	return NULL;
 }
 
@@ -1422,37 +1481,31 @@
 	struct ast_conf_user *user;
 	struct ast_conference *cnf;
 	int hr, min, sec;
-	int i = 0, total = 0;
+	int total = 0;
 	time_t now;
-	struct ast_str *cmdline = NULL;
 #define MC_HEADER_FORMAT "%-14s %-14s %-10s %-8s  %-8s  %-6s\n"
 #define MC_DATA_FORMAT "%-12.12s   %4.4d	      %4.4s       %02d:%02d:%02d  %-8s  %-6s\n"
 
 	switch (cmd) {
 	case CLI_INIT:
-		e->command = "meetme list [concise]";
+		e->command = "meetme list";
 		e->usage =
-			"Usage: meetme list [concise] <confno> \n"
-			"       List all or a specific conference.\n";
+			"Usage: meetme list [<confno>] [" STR_CONCISE "]\n"
+			"       List all conferences or a specific conference.\n";
 		return NULL;
 	case CLI_GENERATE:
-		return complete_meetmecmd(a->line, a->word, a->pos, a->n);
-	}
-
-	/* Check for length so no buffer will overflow... */
-	for (i = 0; i < a->argc; i++) {
-		if (strlen(a->argv[i]) > 100)
-			ast_cli(a->fd, "Invalid Arguments.\n");
-	}
-
-	/* Max confno length */
-	if (!(cmdline = ast_str_create(MAX_CONFNUM))) {
-		return CLI_FAILURE;
-	}
-
-	if (a->argc == 2 || (a->argc == 3 && !strcasecmp(a->argv[2], "concise"))) {
-		/* List all the conferences */	
-		int concise = (a->argc == 3 && !strcasecmp(a->argv[2], "concise"));
+		return complete_meetmecmd_list(a->line, a->word, a->pos, a->n);
+	}
+
+	if (a->argc == 2 || (a->argc == 3 && !strcasecmp(a->argv[2], STR_CONCISE))) {
+		/* List all the conferences */
+		int concise = (a->argc == 3);
+		struct ast_str *marked_users;
+
+		if (!(marked_users = ast_str_create(30))) {
+			return CLI_FAILURE;
+		}
+
 		now = time(NULL);
 		AST_LIST_LOCK(&confs);
 		if (AST_LIST_EMPTY(&confs)) {
@@ -1460,23 +1513,25 @@
 				ast_cli(a->fd, "No active MeetMe conferences.\n");
 			}
 			AST_LIST_UNLOCK(&confs);
-			ast_free(cmdline);
+			ast_free(marked_users);
 			return CLI_SUCCESS;
 		}
 		if (!concise) {
 			ast_cli(a->fd, MC_HEADER_FORMAT, "Conf Num", "Parties", "Marked", "Activity", "Creation", "Locked");
 		}
 		AST_LIST_TRAVERSE(&confs, cnf, list) {
-			if (cnf->markedusers == 0) {
-				ast_str_set(&cmdline, 0, "N/A ");
-			} else {
-				ast_str_set(&cmdline, 0, "%4.4d", cnf->markedusers);
-			}
 			hr = (now - cnf->start) / 3600;
 			min = ((now - cnf->start) % 3600) / 60;
 			sec = (now - cnf->start) % 60;
 			if (!concise) {
-				ast_cli(a->fd, MC_DATA_FORMAT, cnf->confno, cnf->users, ast_str_buffer(cmdline), hr, min, sec, cnf->isdynamic ? "Dynamic" : "Static", cnf->locked ? "Yes" : "No");
+				if (cnf->markedusers == 0) {
+					ast_str_set(&marked_users, 0, "N/A ");
+				} else {
+					ast_str_set(&marked_users, 0, "%4.4d", cnf->markedusers);
+				}
+				ast_cli(a->fd, MC_DATA_FORMAT, cnf->confno, cnf->users,
+					ast_str_buffer(marked_users), hr, min, sec,
+					cnf->isdynamic ? "Dynamic" : "Static", cnf->locked ? "Yes" : "No");
 			} else {
 				ast_cli(a->fd, "%s!%d!%d!%02d:%02d:%02d!%d!%d\n",
 					cnf->confno,
@@ -1493,18 +1548,19 @@
 		if (!concise) {
 			ast_cli(a->fd, "* Total number of MeetMe users: %d\n", total);
 		}
-		ast_free(cmdline);
+		ast_free(marked_users);
 		return CLI_SUCCESS;
-	} else if (strcmp(a->argv[1], "list") == 0) {
+	}
+	if (a->argc == 3 || (a->argc == 4 && !strcasecmp(a->argv[3], STR_CONCISE))) {
 		struct ao2_iterator user_iter;
-		int concise = (a->argc == 4 && (!strcasecmp(a->argv[3], "concise")));
+		int concise = (a->argc == 4);
+
 		/* List all the users in a conference */
 		if (AST_LIST_EMPTY(&confs)) {
 			if (!concise) {
 				ast_cli(a->fd, "No active MeetMe conferences.\n");
 			}
-			ast_free(cmdline);
-			return CLI_SUCCESS;	
+			return CLI_SUCCESS;
 		}
 		/* Find the right conference */
 		AST_LIST_LOCK(&confs);
@@ -1517,7 +1573,6 @@
 			if (!concise)
 				ast_cli(a->fd, "No such conference: %s.\n", a->argv[2]);
 			AST_LIST_UNLOCK(&confs);
-			ast_free(cmdline);
 			return CLI_SUCCESS;
 		}
 		/* Show all the users */
@@ -1557,93 +1612,49 @@
 			ast_cli(a->fd, "%d users in that conference.\n", cnf->users);
 		}
 		AST_LIST_UNLOCK(&confs);
-		ast_free(cmdline);
 		return CLI_SUCCESS;
 	}
-	if (a->argc < 2) {
-		ast_free(cmdline);
-		return CLI_SHOWUSAGE;
-	}
-
-	ast_debug(1, "Cmdline: %s\n", ast_str_buffer(cmdline));
-
-	admin_exec(NULL, ast_str_buffer(cmdline));
-	ast_free(cmdline);
-
-	return CLI_SUCCESS;
-}
-
-
-static char *meetme_cmd(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
+	return CLI_SHOWUSAGE;
+}
+
+
+static char *meetme_cmd_helper(struct ast_cli_args *a)
 {
 	/* Process the command */
-	struct ast_str *cmdline = NULL;
-	int i = 0;
-
-	switch (cmd) {
-	case CLI_INIT:
-		e->command = "meetme {lock|unlock|mute|unmute|kick}";
-		e->usage =
-			"Usage: meetme (un)lock|(un)mute|kick <confno> <usernumber>\n"
-			"       Executes a command for the conference or on a conferee\n";
-		return NULL;
-	case CLI_GENERATE:
-		return complete_meetmecmd(a->line, a->word, a->pos, a->n);
-	}
-
-	if (a->argc > 8)
-		ast_cli(a->fd, "Invalid Arguments.\n");
-	/* Check for length so no buffer will overflow... */
-	for (i = 0; i < a->argc; i++) {
-		if (strlen(a->argv[i]) > 100)
-			ast_cli(a->fd, "Invalid Arguments.\n");
-	}
+	struct ast_str *cmdline;
 
 	/* Max confno length */
 	if (!(cmdline = ast_str_create(MAX_CONFNUM))) {
 		return CLI_FAILURE;
 	}
 
-	if (a->argc < 1) {
-		ast_free(cmdline);
-		return CLI_SHOWUSAGE;
-	}
-
 	ast_str_set(&cmdline, 0, "%s", a->argv[2]);	/* Argv 2: conference number */
-	if (strstr(a->argv[1], "lock")) {
-		if (strcmp(a->argv[1], "lock") == 0) {
+	if (strcasestr(a->argv[1], "lock")) {
+		if (strcasecmp(a->argv[1], "lock") == 0) {
 			/* Lock */
 			ast_str_append(&cmdline, 0, ",L");
 		} else {
 			/* Unlock */
 			ast_str_append(&cmdline, 0, ",l");
 		}
-	} else if (strstr(a->argv[1], "mute")) { 
-		if (a->argc < 4) {
-			ast_free(cmdline);
-			return CLI_SHOWUSAGE;
-		}
-		if (strcmp(a->argv[1], "mute") == 0) {
+	} else if (strcasestr(a->argv[1], "mute")) { 
+		if (strcasecmp(a->argv[1], "mute") == 0) {
 			/* Mute */
-			if (strcmp(a->argv[3], "all") == 0) {
+			if (strcasecmp(a->argv[3], "all") == 0) {
 				ast_str_append(&cmdline, 0, ",N");
 			} else {
 				ast_str_append(&cmdline, 0, ",M,%s", a->argv[3]);	
 			}
 		} else {
 			/* Unmute */
-			if (strcmp(a->argv[3], "all") == 0) {
+			if (strcasecmp(a->argv[3], "all") == 0) {
 				ast_str_append(&cmdline, 0, ",n");
 			} else {
 				ast_str_append(&cmdline, 0, ",m,%s", a->argv[3]);
 			}
 		}
-	} else if (strcmp(a->argv[1], "kick") == 0) {
-		if (a->argc < 4) {
-			ast_free(cmdline);
-			return CLI_SHOWUSAGE;
-		}
-		if (strcmp(a->argv[3], "all") == 0) {
+	} else if (strcasecmp(a->argv[1], "kick") == 0) {
+		if (strcasecmp(a->argv[3], "all") == 0) {
 			/* Kick all */
 			ast_str_append(&cmdline, 0, ",K");
 		} else {
@@ -1651,6 +1662,10 @@
 			ast_str_append(&cmdline, 0, ",k,%s", a->argv[3]);
 		}
 	} else {
+		/*
+		 * Should never get here because it is already filtered by the
+		 * callers.
+		 */
 		ast_free(cmdline);
 		return CLI_SHOWUSAGE;
 	}
@@ -1661,6 +1676,66 @@
 	ast_free(cmdline);
 
 	return CLI_SUCCESS;
+}
+
+static char *meetme_lock_cmd(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
+{
+	switch (cmd) {
+	case CLI_INIT:
+		e->command = "meetme {lock|unlock}";
+		e->usage =
+			"Usage: meetme lock|unlock <confno>\n"
+			"       Lock or unlock a conference to new users.\n";
+		return NULL;
+	case CLI_GENERATE:
+		return complete_meetmecmd_lock(a->word, a->pos, a->n);
+	}
+
+	if (a->argc != 3) {
+		return CLI_SHOWUSAGE;
+	}
+
+	return meetme_cmd_helper(a);
+}
+
+static char *meetme_kick_cmd(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
+{
+	switch (cmd) {
+	case CLI_INIT:
+		e->command = "meetme kick";
+		e->usage =
+			"Usage: meetme kick <confno> all|<userno>\n"
+			"       Kick a conference or a user in a conference.\n";
+		return NULL;
+	case CLI_GENERATE:
+		return complete_meetmecmd_mute_kick(a->line, a->word, a->pos, a->n);
+	}
+
+	if (a->argc != 4) {
+		return CLI_SHOWUSAGE;
+	}
+
+	return meetme_cmd_helper(a);
+}
+
+static char *meetme_mute_cmd(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
+{
+	switch (cmd) {
+	case CLI_INIT:
+		e->command = "meetme {mute|unmute}";
+		e->usage =
+			"Usage: meetme mute|unmute <confno> all|<userno>\n"
+			"       Mute or unmute a conference or a user in a conference.\n";
+		return NULL;
+	case CLI_GENERATE:
+		return complete_meetmecmd_mute_kick(a->line, a->word, a->pos, a->n);
+	}
+
+	if (a->argc != 4) {
+		return CLI_SHOWUSAGE;
+	}
+
+	return meetme_cmd_helper(a);
 }
 
 static const char *sla_hold_str(unsigned int hold_access)
@@ -1822,8 +1897,10 @@
 }
 
 static struct ast_cli_entry cli_meetme[] = {
-	AST_CLI_DEFINE(meetme_cmd, "Execute a command on a conference or conferee"),
-	AST_CLI_DEFINE(meetme_show_cmd, "List all or one conference"),
+	AST_CLI_DEFINE(meetme_kick_cmd, "Kick a conference or a user in a conference."),
+	AST_CLI_DEFINE(meetme_show_cmd, "List all conferences or a specific conference."),
+	AST_CLI_DEFINE(meetme_lock_cmd, "Lock or unlock a conference to new users."),
+	AST_CLI_DEFINE(meetme_mute_cmd, "Mute or unmute a conference or a user in a conference."),
 	AST_CLI_DEFINE(sla_show_trunks, "Show SLA Trunks"),
 	AST_CLI_DEFINE(sla_show_stations, "Show SLA Stations"),
 };
@@ -7505,8 +7582,16 @@
 	return res;
 }
 
-
-
+/*!
+ * \brief Load the module
+ *
+ * Module loading including tests for configuration or dependencies.
+ * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
+ * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the 
+ * configuration file or other non-critical problem return 
+ * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
+ */
 static int load_module(void)
 {
 	int res = 0;

Modified: team/lathama/doxygencleanups/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/apps/app_mixmonitor.c?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/apps/app_mixmonitor.c (original)
+++ team/lathama/doxygencleanups/apps/app_mixmonitor.c Mon Oct  1 18:19:44 2012
@@ -132,6 +132,11 @@
 			<para>Records the audio on the current channel to the specified file.</para>
 			<para>This application does not automatically answer and should be preceeded by
 			an application such as Answer or Progress().</para>
+			<note><para>MixMonitor runs as an audiohook. In order to keep it running through
+			a transfer, AUDIOHOOK_INHERIT must be set for the channel which ran mixmonitor.
+			For more information, including dialplan configuration set for using
+			AUDIOHOOK_INHERIT with MixMonitor, see the function documentation for
+			AUDIOHOOK_INHERIT.</para></note>
 			<variablelist>
 				<variable name="MIXMONITOR_FILENAME">
 					<para>Will contain the filename used to record.</para>
@@ -143,6 +148,7 @@
 			<ref type="application">StopMixMonitor</ref>
 			<ref type="application">PauseMonitor</ref>
 			<ref type="application">UnpauseMonitor</ref>
+			<ref type="function">AUDIOHOOK_INHERIT</ref>
 		</see-also>
 	</application>
 	<application name="StopMixMonitor" language="en_US">

Modified: team/lathama/doxygencleanups/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/lathama/doxygencleanups/apps/app_queue.c?view=diff&rev=374163&r1=374162&r2=374163
==============================================================================
--- team/lathama/doxygencleanups/apps/app_queue.c (original)
+++ team/lathama/doxygencleanups/apps/app_queue.c Mon Oct  1 18:19:44 2012
@@ -55,8 +55,7 @@
  */
 
 /*! 
- * \par The application app_queues uses configuration files
- * \li \ref queues.conf
+ * \li The application app_queues uses configuration file \ref queues.conf
  * \addtogroup configuration_file
  */
 
@@ -1022,8 +1021,6 @@
 
 /*! \brief Persistent Members astdb family */
 static const char * const pm_family = "Queue/PersistentMembers";
-/* The maximum length of each persistent member queue database entry */
-#define PM_MAX_LEN 8192
 
 /*! \brief queues.conf [general] option */
 static int queue_persistent_members = 0;
@@ -1205,8 +1202,8 @@
 
 #define ANNOUNCEPOSITION_YES 1 /*!< We announce position */
 #define ANNOUNCEPOSITION_NO 2 /*!< We don't announce position */
-#define ANNOUNCEPOSITION_MORE_THAN 3 /*!< We say "Currently there are more than \<limit\>" */
-#define ANNOUNCEPOSITION_LIMIT 4 /*!< We not announce position more than \<limit\> */
+#define ANNOUNCEPOSITION_MORE_THAN 3 /*!< We say "Currently there are more than <limit>" */
+#define ANNOUNCEPOSITION_LIMIT 4 /*!< We not announce position more than <limit> */
 
 struct call_queue {
 	AST_DECLARE_STRING_FIELDS(
@@ -2026,6 +2023,15 @@
 	while ((pr_iter = AST_LIST_REMOVE_HEAD(&q->rules,list))) {
 		ast_free(pr_iter);
 	}
+
+	/* On restart assume no members are available.
+	 * The queue_avail hint is a boolean state to indicate whether a member is available or not.
+	 *
+	 * This seems counter intuitive, but is required to light a BLF
+	 * AST_DEVICE_INUSE indicates no members are available.
+	 * AST_DEVICE_NOT_INUSE indicates a member is available.
+	 */
+	ast_devstate_changed(AST_DEVICE_INUSE, "Queue:%s_avail", q->name);
 }
 
 static void clear_queue(struct call_queue *q)
@@ -5814,14 +5820,16 @@
 static void dump_queue_members(struct call_queue *pm_queue)
 {
 	struct member *cur_member;
-	char value[PM_MAX_LEN];
-	int value_len = 0;
-	int res;
+	struct ast_str *value;
 	struct ao2_iterator mem_iter;
 
-	memset(value, 0, sizeof(value));
-
 	if (!pm_queue) {
+		return;
+	}
+
+	/* 4K is a reasonable default for most applications, but we grow to
+	 * accommodate more if necessary. */
+	if (!(value = ast_str_create(4096))) {
 		return;
 	}
 
@@ -5832,26 +5840,28 @@
 			continue;
 		}
 
-		res = snprintf(value + value_len, sizeof(value) - value_len, "%s%s;%d;%d;%s;%s",
-			value_len ? "|" : "", cur_member->interface, cur_member->penalty, cur_member->paused, cur_member->membername, cur_member->state_interface);
+		ast_str_append(&value, 0, "%s%s;%d;%d;%s;%s",
+			ast_str_strlen(value) ? "|" : "",
+			cur_member->interface,
+			cur_member->penalty,
+			cur_member->paused,
+			cur_member->membername,

[... 5265 lines stripped ...]



More information about the asterisk-commits mailing list