Commit Graph

31 Commits

Author SHA1 Message Date
George Joseph c799db6a21 res_geolocation: Allow location parameters on the profile object
You can now specify the location object's format, location_info,
method, location_source and confidence parameters directly on
a profile object for simple scenarios where the location
information isn't common with any other profiles.  This is
mutually exclusive with setting location_reference on the
profile.

Updated appdocsxml.dtd to allow xi:include in a configObject
element.  This makes it easier to link to complete configOptions
in another object.  This is used to add the above fields to the
profile object without having to maintain the option descriptions
in two places.

ASTERISK-30185

Change-Id: Ifd5f05be0a76f0a6ad49fa28d17c394027677569
2022-09-10 12:51:02 -05:00
Naveen Albert c35e205bef documentation: Add since tag to xmldocs DTD
Adds the since tag to the documentation DTD so
that individual applications, functions, etc.
can now specify when they were added to Asterisk.

This tag is added at the individual application,
function, etc. level as opposed to at the module
level because modules can expand over time as new
functionality is added, and granularity only
to the module level would generally not be useful.

This enables the ability to more easily determine
when new functionality was added to Asterisk, down
to minor version as opposed to just by major version.
This makes it easier for users to write more portable
dialplan if desired to not use functionality that may
not be widely available yet.

ASTERISK-29896 #close

Change-Id: Ibbb35c702d8038bdc3fd0a944fbfa69384cc15d5
2022-02-25 13:05:06 -06:00
Alexander Traud 12c45dd6a2 xmldoc: Correct definition for XML element 'matchInfo'.
ASTERISK-29791

Change-Id: I7c656498427fcadd0a5d61a54ff67e6036609725
2021-12-13 08:08:22 -06:00
George Joseph 09303e8e22 Updates for the MessageSend Dialplan App
Enhancements:

 * The MessageSend dialplan application now takes an optional
   third argument that can set the message's "To" field on
   outgoing messages.  It's an alternative to using the
   MESSAGE(to) dialplan function.

   NOTE: No channel driver currently implements this field.  A
   follow-on commit for res_pjsip_messaging will implement it for
   the chan_pjsip channel driver.

 * To prevent confusion with the first argument, currently named
   "to", it's been renamed to "destination". Its function,
   creating the request URI, hasn't changed.

 * The documentation for MessageSend was updated to be
   more clear about the parameters and how they interact
   the MESSAGE() dialplan function.

 * With the rename of MessageSend's first parameter, and the fact
   that message.c references <info> elements in chan_sip.c,
   res_pjsip_messaging.c and res_xmpp, they each needed
   documentation updates to use MessageDestinationInfo instead of
   MessageToInfo.

 * appdocsxml.dtd was updated to include a missing element
   declaration for "dataType".  This was showing up as an error
   in Eclipse's dtd editor.

 * Despite the changes in this commit, there should be
   no impact to current users of MessageSend.

Change-Id: I6fb5b569657a02866a66ea352fd53d30d8ac965a
2021-05-06 06:23:51 -05:00
Joshua C. Colp 3330fb41f4 xml: Allow deprecated_in and removed_in for MODULEINFO.
ASTERISK-29337

Change-Id: I2211b7da8d29369f8649aeabce07679da0787f2b
2021-03-16 10:36:04 -05:00
Joshua C. Colp 149e5e5b86 xml: Embed module information into core XML documentation.
This change embeds the MODULEINFO block of modules
into the core XML documentation. This provides a shared
mechanism for use by both menuselect and Asterisk for
information and a definitive source of truth.

ASTERISK-29335

Change-Id: Ifbfd5c700049cf320a3e45351ac65dd89bc99d90
2021-03-16 10:30:43 -05:00
Pascal Cadotte Michaud bf4dd3d837
PJSIP_CONTACT: add missing argument documentation
add missing argument "rtt" and "status" to the documentation

The change to the dtd file allow an enumlist to contain one or many
configOptionToEnum or enum.

This is different from the previous patch I submitted when you could have a
configOptionToEnum or (a configOptionToEnum followed by one or manu enums) or
(one or many enums)

ASTERISK-28626

Change-Id: Ia71743ee7ec813f40297b0ddefeee7909db63b6d
2019-12-11 12:05:27 -05:00
Joshua Colp d0b198b330 Revert "PJSIP_CONTACT: add missing argument documentation"
This reverts commit 7e3015d779.

Reason for revert: Regression in XML validation.

validity error : Content model of enumlist is not determinist:
(configOptionToEnum | (configOptionToEnum , enum+) | enum+)

As we are preparing to do releases and this is not critical
I am reverting this for now until resolved.

Change-Id: I30c2295f9d7f0a0475674ee77071a7ebabf5b83f
2019-12-11 07:01:32 -06:00
Pascal Cadotte Michaud 7e3015d779
PJSIP_CONTACT: add missing argument documentation
add missing argument "rtt" and "status" to the documentation

ASTERISK-28626
Change-Id: I8419e4c8203e411b87d93dc395acdbcf7526dedf
2019-11-21 09:20:22 -05:00
Matt Jordan ddab42e296 func_channel: Reorganize documentation
* Following the example of the PJSIP channel driver, the channel
  technology specific documentation has been moved to the respective
  channel drivers that provide that functionality. This has the benefit
  of locating the documentation of items with those modules that provide
  it.

* Examples of using the CHANNEL function for both standard items as well
  as for PJSIP have been added.

* The 'max_forwards' standard item has been documented.

Change-Id: Ifaa79a232c8ac99cf8da6ef6cc7815d398b1b79b
2016-08-15 07:39:19 -05:00
Matthew Jordan 922e3203a9 xmldocs: Add support for an <example> tag in the Asterisk XML Documentation
This patch adds support for an <example /> tag in the XML documentation schema.

For CLI help, this doesn't change the formatting too much:
 - Preceeding white space is removed
 - Unlike with para elements, new lines are preserved

However, having an <example /> tag in the XML schema allows for the wiki
documentation generation script to surround the documentation with {code} or
{noformat} tags, generating much better content for the wiki - and allowing us
to put dialplan examples (and other code snippets, if desired) into the
documentation for an application/function/AMI command/etc.

Review: https://reviewboard.asterisk.org/r/3807/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-31 11:49:40 +00:00
Kinsey Moore 4445ee7fc0 AMI: Allow for command response documentation
Allow for responses to AMI actions/commands to be documented properly
in XML and displayed via the CLI. Response events are documented
exactly as standard AMI events are documented.

Review: https://reviewboard.asterisk.org/r/3812/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-24 13:00:59 +00:00
Matthew Jordan f46b30bd36 func_pjsip_endpoint: Add PJSIP_ENDPOINT function for querying endpoint details
This patch adds a new function, PJSIP_ENDPOINT, which lets the dialplan query,
for any endpoint, any property configured on an endpoint. This function is a
companion to the CHANNEL function, which can be used to extract the endpoint
name for a channel.

Review: https://reviewboard.asterisk.org/r/3035
........

Merged revisions 403616 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 12:31:57 +00:00
Kinsey Moore 03090a88ba Fix documentation replication issues
This prevents XML documentation duplication by expanding channel and
bridge snapshot tags into channel and bridge snapshot parameter sets
with a given prefix or defaulting to no prefix. This also prevents
documentation from becoming fractured and out of date by keeping all
variations of the documentation in template form such that it only
needs to be updated once and keeps maintenance to a minimum.

Review: https://reviewboard.asterisk.org/r/2708/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01 17:07:52 +00:00
Mark Michelson 4710869133 Add documentation for features configuration.
Review: https://reviewboard.asterisk.org/r/2616

(closes issue ASTERISK-21542)
Reported by Matt Jordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 18:33:13 +00:00
Matthew Jordan d04ab3c645 Add CLI configuration documentation
This patch allows a module to define its configuration in XML in source, such
that it can be parsed by the XML documentation engine. Documentation is
generated in a two-pass approach:

1. The documentation is first generated from the XML pulled from the source
2. The documentation is then enhanced by the registration of configuration
   options that use the configuration framework

This patch include configuration documentation for the following modules:
 * chan_motif
 * res_xmpp
 * app_confbridge
 * app_skel
 * udptl

Two new CLI commands have been added:
 * config show help - show configuration help by module, category, and item
 * xmldoc dump - dump the in-memory representation of the XML documentation to
   a new XML file.

Review: https://reviewboard.asterisk.org/r/2278
Review: https://reviewboard.asterisk.org/r/2058

patches:
  on review 2058 uploaded by twilson



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15 13:38:12 +00:00
Matthew Jordan 472e29df62 Let documentation reference links specify which module they're linking to
Again, since res_jabber/res_xmpp have duplicate APIs, their documentation ref
links have to specify which reference they're referring to. The various
documentation parsers can interpret the module attribute however they want
in order to construct the appropriate links.
........

Merged revisions 379228 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16 17:46:15 +00:00
Matthew Jordan b84d37a711 Multiple revisions 379209-379210
........
  r379209 | mjordan | 2013-01-16 09:27:44 -0600 (Wed, 16 Jan 2013) | 8 lines
  
  Add module tags to documentation for res_jabber/res_xmpp
  
  Since res_jabber/res_xmpp provide the same APIs (app/func/manager/etc.),
  the XML documentation for each needs to call out which module is providing
  the documentation. The module attribute has been added to the various XML
  fragments for this purpose.
........
  r379210 | mjordan | 2013-01-16 09:30:20 -0600 (Wed, 16 Jan 2013) | 4 lines
  
  Update the dtd to actually *support* the module attribute in all elements
  
  Mea culpa.
........

Merged revisions 379209-379210 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16 15:33:05 +00:00
Matthew Jordan 86ff5585fd Add the ability to specify technology specific documentation
A number of applications/AMI commands in Asterisk have specific behavioral
differences depending on the resource or channel technology those
applications are executed on.  For example, the MessageSend application/
command is technology agnostic, but how the channel drivers that support
that functionality behave is dependant on the protocols and channel
driver implementation.  Prior to this patch, those details were either
documented in the application/command documentation itself, or were left
undocumented.

This patch adds a new element to the documentation schema, <info/>.  An info
node is essentially a piece of technology specific reference information that
can be included by any top level XML documentation node.  For example, the
MessageSend application can now include XMPP/SIP specific information, where
that technology specific information can be defined in chan_motif/res_xmpp/
chan_sip.  Likewise, that information can also be included in the MessageSend
AMI command.

Review: https://reviewboard.asterisk.org/r/2049




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19 22:17:13 +00:00
Matthew Jordan 2ffae5745d Add some additional documentation for core AMI events
This patch adds some basic documentation for a number of modules.  This
includes core source files in Asterisk (those in main), as well as
chan_agent, chan_dahdi, chan_local, sig_analog, and sig_pri.  The DTD
has also been updated to allow referencing of AMI commands.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-10 22:26:27 +00:00
Matthew Jordan 82a7409c15 Add AMI event documentation
This patch adds the core changes necessary to support AMI event documentation
in the source files of Asterisk, and adds documentation to those AMI events
defined in the core application modules.  Event documentation is built from
the source by two new python scripts, located in build_tools:
get_documentation.py and post_process_documentation.py.

The get_documentation.py script mirrors the actions of the existing AWK
get_documentation scripts, except that it will scan the entirety of a source
file for Asterisk documentation.  Upon encountering it, if the documentation
happens to be an AMI event, it will attempt to extract information about the
event directly from the manager event macro calls that raise the event.  The
post_process_documentation.py script combines manager event instances that
are the same event but documented in multiple source files.  It generates
the final core-[lang].xml file.

As this process can take longer to complete than a typical 'make all', it
is only performed if a new make target, 'full', is chosen.

Review: https://reviewboard.asterisk.org/r/1967/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-25 17:59:34 +00:00
Matthew Nicholson bb07ca66a1 Merged revisions 340109 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r340109 | mnicholson | 2011-10-10 09:15:41 -0500 (Mon, 10 Oct 2011) | 18 lines
  
  Merged revisions 340108 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r340108 | mnicholson | 2011-10-10 09:14:48 -0500 (Mon, 10 Oct 2011) | 11 lines
    
    Load the proper XML documentation when multiple modules document the same application.
    
    This patch adds an optional "module" attribute to the XML documentation spec
    that allows the documentation processor to match apps with identical names from
    different modules to their documentation. This patch also fixes a number of
    bugs with the documentation processor and should make it a little more
    efficient. Support for multiple languages has also been properly implemented.
    
    ASTERISK-18130
    Review: https://reviewboard.asterisk.org/r/1485/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-10 14:16:27 +00:00
Eliel C. Sardanons 2c882626a0 Implement a new element in AstXML for AMI actions documentation.
A new xml element was created to manage the AMI actions documentation,
using AstXML.
To register a manager action using XML documentation it is now possible
using ast_manager_register_xml().
The CLI command 'manager show command' can be used to show the parsed
documentation.

Example manager xml documentation:
<manager name="ami action name" language="en_US">
    <synopsis>
        AMI action synopsis.
    </synopsis>
    <syntax>
        <xi:include xpointer="xpointer(...)" /> <-- for ActionID
        <parameter name="header1" required="true">
	    <para>Description</para>
	</parameter>
	...
    </syntax>
    <description>
        <para>AMI action description</para>
    </description>
    <see-also>
    	...
    </see-also>
</manager>



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 17:52:35 +00:00
Eliel C. Sardanons 2f996a3ab4 Allow to include sections of other parts of the xml documentation.
Avoid duplicating xml documentation by allowing to include other parts of
the xml documentation using XInclude.
Example:
   <xi:include xpointer="xpointer(/docs/function[@name='CHANNEL']/synopsis)" />
(Insert this line to include the synopsis of the CHANNEL function xml
documentation).

It is also possible to include documentation from other files in the
'documentation/' directory using the href="" attribute inside a xinclude
element.

(closes issue #15107)
Reported by: lmadsen

(issue #14444)
Reported by: ewieling



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-16 20:01:22 +00:00
Eliel C. Sardanons 77c41d700e Allow to specify an enumlist inside an enum.
It was not possible to use an enumlist inside an enum:
<enumlist>
   <enum name="aa">
      <enumlist>
         ...
      </enumlist>
   </enum>
</enumlist>
Now we will be able to insert as many levels as we want.

(closes issue #15112)
Reported by: lmadsen



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 13:23:37 +00:00
Russell Bryant 0ab0896516 argsep is used as an attribute for an argument, as well
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 17:56:25 +00:00
Eliel C. Sardanons a22928b853 Introduce XML documentation for:
- MeetMe()
  - MeetMeCount()
  - MeetMeChannelAdmin()
  - MeetMeAdmin()
  - SLAStation()
  - SLATrunk()

- Add an attribute to optionlist 'hasparams' with the same functionality as the one
we have in <parameter> and <argument> (the DTD was updated)
- Fix a leak when getting an attribute while parsing an <optionlist>.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 15:46:06 +00:00
Eliel C. Sardanons 5b25c26318 - Add 'database del', 'database put' and 'set music' AGI commands XML documentation.
- Add to the DTD the possibility to put a parameter inside an <enum>.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 02:20:05 +00:00
Eliel C. Sardanons 6f31fed83f Implement AGI XML documentation parsing functions.
A new <agi> element is used to describe the XML documentation.
We have the usual synopsis,syntax,description and seealso for AGI commands.
The CLI 'agi show commands' command was changed to show all the documentation se
ctions.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 00:17:43 +00:00
Eliel C. Sardanons f3d95a2131 We now can have a reference to a filename inside a <see-also> tag.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 13:54:21 +00:00
Russell Bryant 5b168ee34b Merge changes from team/group/appdocsxml
This commit introduces the first phase of an effort to manage documentation of the
interfaces in Asterisk in an XML format.  Currently, a new format is available for
applications and dialplan functions.  A good number of conversions to the new format
are also included.

For more information, see the following message to asterisk-dev:

http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-01 21:10:07 +00:00