diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index b7c4cc6f29..e16b435b97 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -63,6 +63,365 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "enter.h"
#include "leave.h"
+/*** DOCUMENTATION
+
+
+ MeetMe conference bridge.
+
+
+
+ The conference number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Enters the user into a specified MeetMe conference. If the confno
+ is omitted, the user will be prompted to enter one. User can exit the conference by hangup, or
+ if the p option is specified, by pressing #.
+ The DAHDI kernel modules and at least one hardware driver (or dahdi_dummy)
+ must be present for conferencing to operate properly. In addition, the chan_dahdi channel driver
+ must be loaded for the i and r options to operate at
+ all.
+
+
+ MeetMeCount
+ MeetMeAdmin
+ MeetMeChannelAdmin
+
+
+
+
+ MeetMe participant count.
+
+
+
+ Conference number.
+
+
+
+
+ Plays back the number of users in the specified MeetMe conference.
+ If var is specified, playback will be skipped and the value
+ will be returned in the variable. Upon application completion, MeetMeCount will hangup
+ the channel, unless priority n+1 exists, in which case priority progress will
+ continue.
+
+
+ MeetMe
+
+
+
+
+ MeetMe conference administration.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Run admin command for conference confno.
+ Will additionally set the variable MEETMEADMINSTATUS with one of
+ the following values:
+
+
+
+ Invalid arguments.
+
+
+ User specified was not found.
+
+
+ Another failure occurred.
+
+
+ The operation was completed successfully.
+
+
+
+
+
+ MeetMe
+
+
+
+
+ MeetMe conference Administration (channel specific).
+
+
+
+
+
+
+
+
+
+
+
+
+ Run admin command for a specific
+ channel in any coference.
+
+
+
+
+ Shared Line Appearance Station.
+
+
+
+ Station name
+
+
+
+ This application should be executed by an SLA station. The argument depends
+ on how the call was initiated. If the phone was just taken off hook, then the argument
+ station should be just the station name. If the call was
+ initiated by pressing a line key, then the station name should be preceded by an underscore
+ and the trunk name associated with that line button.
+ For example: station1_line1
+ On exit, this application will set the variable SLASTATION_STATUS to
+ one of the following values:
+
+
+
+
+
+
+
+
+
+
+
+ Shared Line Appearance Trunk.
+
+
+
+ Trunk name
+
+
+
+
+
+
+
+
+ This application should be executed by an SLA trunk on an inbound call. The channel calling
+ this application should correspond to the SLA trunk with the name trunk
+ that is being passed as an argument.
+ On exit, this application will set the variable SLATRUNK_STATUS to
+ one of the following values:
+
+
+
+
+
+
+
+
+
+
+ ***/
+
#define CONFIG_FILE_NAME "meetme.conf"
#define SLA_CONFIG_FILE "sla.conf"
@@ -208,13 +567,6 @@ static const char *app4 = "MeetMeChannelAdmin";
static const char *slastation_app = "SLAStation";
static const char *slatrunk_app = "SLATrunk";
-static const char *synopsis = "MeetMe conference bridge";
-static const char *synopsis2 = "MeetMe participant count";
-static const char *synopsis3 = "MeetMe conference Administration";
-static const char *synopsis4 = "MeetMe conference Administration (channel specific)";
-static const char *slastation_synopsis = "Shared Line Appearance Station";
-static const char *slatrunk_synopsis = "Shared Line Appearance Trunk";
-
/* Lookup RealTime conferences based on confno and current time */
static int rt_schedule;
static int fuzzystart;
@@ -225,140 +577,6 @@ static int extendby;
/* Log participant count to the RealTime backend */
static int rt_log_members;
-static const char *descrip =
-" MeetMe([confno][,[options][,pin]]): Enters the user into a specified MeetMe\n"
-"conference. If the conference number is omitted, the user will be prompted\n"
-"to enter one. User can exit the conference by hangup, or if the 'p' option\n"
-"is specified, by pressing '#'.\n"
-"Please note: The DAHDI kernel modules and at least one hardware driver (or dahdi_dummy)\n"
-" must be present for conferencing to operate properly. In addition, the chan_dahdi\n"
-" channel driver must be loaded for the 'i' and 'r' options to operate at all.\n\n"
-"The option string may contain zero or more of the following characters:\n"
-" 'a' -- set admin mode\n"
-" 'A' -- set marked mode\n"
-" 'b' -- run AGI script specified in ${MEETME_AGI_BACKGROUND}\n"
-" Default: conf-background.agi (Note: This does not work with\n"
-" non-DAHDI channels in the same conference)\n"
-" 'c' -- announce user(s) count on joining a conference\n"
-" 'C' -- continue in dialplan when kicked out of conference\n"
-" 'd' -- dynamically add conference\n"
-" 'D' -- dynamically add conference, prompting for a PIN\n"
-" 'e' -- select an empty conference\n"
-" 'E' -- select an empty pinless conference\n"
-" 'F' -- Pass DTMF through the conference.\n"
-" 'i' -- announce user join/leave with review\n"
-" 'I' -- announce user join/leave without review\n"
-" 'l' -- set listen only mode (Listen only, no talking)\n"
-" 'm' -- set initially muted\n"
-" 'M[()]'\n"
-" -- enable music on hold when the conference has a single caller.\n"
-" Optionally, specify a musiconhold class to use. If one is not\n"
-" provided, it will use the channel's currently set music class,\n"
-" or \"default\".\n"
-" 'o' -- set talker optimization - treats talkers who aren't speaking as\n"
-" being muted, meaning (a) No encode is done on transmission and\n"
-" (b) Received audio that is not registered as talking is omitted\n"
-" causing no buildup in background noise\n"
-" 'p[()]'\n"
-" -- allow user to exit the conference by pressing '#' (default)\n"
-" or any of the defined keys. If keys contain '*' this will override\n"
-" option 's'. The key used is set to channel variable MEETME_EXIT_KEY.\n"
-" 'P' -- always prompt for the pin even if it is specified\n"
-" 'q' -- quiet mode (don't play enter/leave sounds)\n"
-" 'r' -- Record conference (records as ${MEETME_RECORDINGFILE}\n"
-" using format ${MEETME_RECORDINGFORMAT}). Default filename is\n"
-" meetme-conf-rec-${CONFNO}-${UNIQUEID} and the default format is\n"
-" wav.\n"
-" 's' -- Present menu (user or admin) when '*' is received ('send' to menu)\n"
-" 't' -- set talk only mode. (Talk only, no listening)\n"
-" 'T' -- set talker detection (sent to manager interface and meetme list)\n"
-" 'w[()]'\n"
-" -- wait until the marked user enters the conference\n"
-" 'x' -- close the conference when last marked user exits\n"
-" 'X' -- allow user to exit the conference by entering a valid single\n"
-" digit extension ${MEETME_EXIT_CONTEXT} or the current context\n"
-" if that variable is not defined.\n"
-" '1' -- do not play message when first person enters\n"
-" 'S(x)' -- Kick the user 'x' seconds *after* he entered into the conference.\n"
-" 'L(x[:y][:z])' - Limit the conference to 'x' ms. Play a warning when 'y' ms are\n"
-" left. Repeat the warning every 'z' ms. The following special\n"
-" variables can be used with this option:\n"
-" * CONF_LIMIT_TIMEOUT_FILE File to play when time is up.\n"
-" * CONF_LIMIT_WARNING_FILE File to play as warning if 'y' is defined.\n"
-" The default is to say the time remaining.\n"
-"";
-
-static const char *descrip2 =
-" MeetMeCount(confno[,var]): Plays back the number of users in the specified\n"
-"MeetMe conference. If var is specified, playback will be skipped and the value\n"
-"will be returned in the variable. Upon app completion, MeetMeCount will hangup\n"
-"the channel, unless priority n+1 exists, in which case priority progress will\n"
-"continue.\n"
-"";
-
-static const char *descrip3 =
-" MeetMeAdmin(confno,command[,user]): Run admin command for conference\n"
-" 'e' -- Eject last user that joined\n"
-" 'E' -- Extend conference end time, if scheduled\n"
-" 'k' -- Kick one user out of conference\n"
-" 'K' -- Kick all users out of conference\n"
-" 'l' -- Unlock conference\n"
-" 'L' -- Lock conference\n"
-" 'm' -- Unmute one user\n"
-" 'M' -- Mute one user\n"
-" 'n' -- Unmute all users in the conference\n"
-" 'N' -- Mute all non-admin users in the conference\n"
-" 'r' -- Reset one user's volume settings\n"
-" 'R' -- Reset all users volume settings\n"
-" 's' -- Lower entire conference speaking volume\n"
-" 'S' -- Raise entire conference speaking volume\n"
-" 't' -- Lower one user's talk volume\n"
-" 'T' -- Raise one user's talk volume\n"
-" 'u' -- Lower one user's listen volume\n"
-" 'U' -- Raise one user's listen volume\n"
-" 'v' -- Lower entire conference listening volume\n"
-" 'V' -- Raise entire conference listening volume\n"
-" MeetMeAdmin will additionally set the variable MEETMEADMINSTATUS with one\n"
-"of the following values:\n"
-" 'NOPARSE' -- Invalid arguments\n"
-" 'NOTFOUND' -- User specified was not found\n"
-" 'FAILED' -- Another failure occurred\n"
-" 'OK' -- The operation was completed successfully\n"
-"";
-
-static const char *descrip4 =
-" MeetMeChannelAdmin(channel,command): Run admin command for a specific\n"
-"channel in any coference.\n"
-" 'k' -- Kick the specified user out of the conference he is in\n"
-" 'm' -- Unmute the specified user\n"
-" 'M' -- Mute the specified user\n"
-"";
-
-static const char *slastation_desc =
-" SLAStation():\n"
-"This application should be executed by an SLA station. The argument depends\n"
-"on how the call was initiated. If the phone was just taken off hook, then\n"
-"the argument \"station\" should be just the station name. If the call was\n"
-"initiated by pressing a line key, then the station name should be preceded\n"
-"by an underscore and the trunk name associated with that line button.\n"
-"For example: \"station1_line1\"."
-" On exit, this application will set the variable SLASTATION_STATUS to\n"
-"one of the following values:\n"
-" FAILURE | CONGESTION | SUCCESS\n"
-"";
-
-static const char *slatrunk_desc =
-" SLATrunk([,options]):\n"
-"This application should be executed by an SLA trunk on an inbound call.\n"
-"The channel calling this application should correspond to the SLA trunk\n"
-"with the name \"trunk\" that is being passed as an argument.\n"
-" On exit, this application will set the variable SLATRUNK_STATUS to\n"
-"one of the following values:\n"
-" FAILURE | SUCCESS | UNANSWERED | RINGTIMEOUT\n"
-" The available options are:\n"
-" M[()] - Play back the specified MOH class instead of ringing\n"
-"";
-
#define MAX_CONFNUM 80
#define MAX_PIN 80
#define OPTIONS_LEN 32
@@ -6153,14 +6371,12 @@ static int load_module(void)
action_meetmeunmute, "Unmute a Meetme user");
res |= ast_manager_register2("MeetmeList", EVENT_FLAG_REPORTING,
action_meetmelist, "List participants in a conference", mandescr_meetmelist);
- res |= ast_register_application(app4, channel_admin_exec, synopsis4, descrip4);
- res |= ast_register_application(app3, admin_exec, synopsis3, descrip3);
- res |= ast_register_application(app2, count_exec, synopsis2, descrip2);
- res |= ast_register_application(app, conf_exec, synopsis, descrip);
- res |= ast_register_application(slastation_app, sla_station_exec,
- slastation_synopsis, slastation_desc);
- res |= ast_register_application(slatrunk_app, sla_trunk_exec,
- slatrunk_synopsis, slatrunk_desc);
+ res |= ast_register_application_xml(app4, channel_admin_exec);
+ res |= ast_register_application_xml(app3, admin_exec);
+ res |= ast_register_application_xml(app2, count_exec);
+ res |= ast_register_application_xml(app, conf_exec);
+ res |= ast_register_application_xml(slastation_app, sla_station_exec);
+ res |= ast_register_application_xml(slatrunk_app, sla_trunk_exec);
res |= ast_devstate_prov_add("Meetme", meetmestate);
res |= ast_devstate_prov_add("SLA", sla_state);
diff --git a/doc/appdocsxml.dtd b/doc/appdocsxml.dtd
index bc72d1324b..d0ce640898 100644
--- a/doc/appdocsxml.dtd
+++ b/doc/appdocsxml.dtd
@@ -38,6 +38,7 @@
+
diff --git a/main/xmldoc.c b/main/xmldoc.c
index 084fdf3fdf..5921960c4e 100644
--- a/main/xmldoc.c
+++ b/main/xmldoc.c
@@ -1462,8 +1462,9 @@ static int xmldoc_parse_option(struct ast_xml_node *fixnode, const char *tabs, s
static void xmldoc_parse_optionlist(struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer)
{
struct ast_xml_node *node;
- const char *optname;
+ const char *optname, *hasparams;
char *optionsyntax;
+ int optparams;
for (node = ast_xml_node_get_children(fixnode); node; node = ast_xml_node_get_next(node)) {
/* Start appending every option tag. */
@@ -1477,8 +1478,16 @@ static void xmldoc_parse_optionlist(struct ast_xml_node *fixnode, const char *ta
continue;
}
- optionsyntax = xmldoc_get_syntax_fun(node, optname, "argument", 0, 1);
+ optparams = 1;
+ hasparams = ast_xml_get_attribute(node, "hasparams");
+ if (hasparams && !strcasecmp(hasparams, "optional")) {
+ optparams = 2;
+ }
+
+ optionsyntax = xmldoc_get_syntax_fun(node, optname, "argument", 0, optparams);
if (!optionsyntax) {
+ ast_xml_free_attr(optname);
+ ast_xml_free_attr(hasparams);
continue;
}
@@ -1487,6 +1496,8 @@ static void xmldoc_parse_optionlist(struct ast_xml_node *fixnode, const char *ta
if (!xmldoc_parse_option(node, tabs, buffer)) {
ast_str_append(buffer, 0, "\n");
}
+ ast_xml_free_attr(optname);
+ ast_xml_free_attr(hasparams);
}
}