docs: Add version information to application and function XML elements

* Do a git blame on the embedded XML application or function element.

* From the commit hash, grab the summary line.

* Do a git log --grep <summary> to find the cherry-pick commits in all
  branches that match.

* Do a git patch-id to ensure the commits are all related and didn't get
  a false match on the summary.

* Do a git tag --contains <commit> to find the tags that contain each
  commit.

* Weed out all tags not ..0.

* Sort and discard any .0.0 and following tags where the commit
  appeared in an earlier branch.

* The result is a single tag for each branch where the application or function
  was defined.

The applications and functions defined in the following files were done by
hand because the XML was extracted from the C source file relatively recently.
* channels/pjsip/dialplan_functions_doc.xml
* main/logger_doc.xml
* main/manager_doc.xml
* res/res_geolocation/geoloc_doc.xml
* res/res_stir_shaken/stir_shaken_doc.xml

(cherry picked from commit 54d67711f8)
This commit is contained in:
George Joseph
2025-01-23 09:27:32 -07:00
committed by Asterisk Development Team
parent 3fc90e7810
commit e6fe538d81
165 changed files with 383 additions and 27 deletions

View File

@@ -49,6 +49,7 @@ AST_THREADSTORAGE(tmp_buf);
/*** DOCUMENTATION
<function name="FIELDQTY" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Count the fields with an arbitrary delimiter
</synopsis>
@@ -69,6 +70,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="FIELDNUM" language="en_US">
<since><version>10.0.0</version></since>
<synopsis>
Return the 1-based offset of a field in a list
</synopsis>
@@ -93,6 +95,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="LISTFILTER" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>Remove an item from a list, by name.</synopsis>
<syntax>
<parameter name="varname" required="true" />
@@ -106,6 +109,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="FILTER" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Filter the string to include only the allowed characters
</synopsis>
@@ -125,6 +129,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="REPLACE" language="en_US">
<since><version>1.8.0</version></since>
<synopsis>
Replace a set of characters in a given string with another character.
</synopsis>
@@ -143,6 +148,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="STRREPLACE" language="en_US">
<since><version>10.0.0</version></since>
<synopsis>
Replace instances of a substring within a string with another string.
</synopsis>
@@ -164,7 +170,6 @@ AST_THREADSTORAGE(tmp_buf);
<since>
<version>16.21.0</version>
<version>18.7.0</version>
<version>19.0.0</version>
</since>
<synopsis>
Inserts a substring between each character in a string.
@@ -184,6 +189,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="TRIM" language="en_US">
<since><version>16.30.0</version><version>18.16.0</version><version>19.8.0</version><version>20.1.0</version></since>
<synopsis>
Trim leading and trailing whitespace in a string
</synopsis>
@@ -199,6 +205,7 @@ AST_THREADSTORAGE(tmp_buf);
</see-also>
</function>
<function name="LTRIM" language="en_US">
<since><version>16.30.0</version><version>18.16.0</version><version>19.8.0</version><version>20.1.0</version></since>
<synopsis>
Trim leading whitespace in a string
</synopsis>
@@ -214,6 +221,7 @@ AST_THREADSTORAGE(tmp_buf);
</see-also>
</function>
<function name="RTRIM" language="en_US">
<since><version>16.30.0</version><version>18.16.0</version><version>19.8.0</version><version>20.1.0</version></since>
<synopsis>
Trim trailing whitespace in a string
</synopsis>
@@ -229,6 +237,7 @@ AST_THREADSTORAGE(tmp_buf);
</see-also>
</function>
<function name="PASSTHRU" language="en_US">
<since><version>1.8.0</version></since>
<synopsis>
Pass the given argument back as a value.
</synopsis>
@@ -248,6 +257,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="REGEX" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Check string against a regular expression.
</synopsis>
@@ -264,6 +274,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<application name="ClearHash" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Clear the keys from a specified hashname.
</synopsis>
@@ -275,6 +286,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</application>
<function name="HASH" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Implementation of a dialplan associative array
</synopsis>
@@ -289,6 +301,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="HASHKEYS" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Retrieve the keys of the HASH() function.
</synopsis>
@@ -303,6 +316,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="KEYPADHASH" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Hash the letters in string into equivalent keypad numbers.
</synopsis>
@@ -316,6 +330,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="ARRAY" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Allows setting multiple variables at once.
</synopsis>
@@ -334,6 +349,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="STRPTIME" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Returns the epoch of the arbitrary date/time string structured as described by the format.
</synopsis>
@@ -352,6 +368,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="STRFTIME" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Returns the current date/time in the specified format.
</synopsis>
@@ -374,6 +391,7 @@ AST_THREADSTORAGE(tmp_buf);
</see-also>
</function>
<function name="EVAL" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Evaluate stored variables
</synopsis>
@@ -395,6 +413,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="TOUPPER" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Convert string to all uppercase letters.
</synopsis>
@@ -408,6 +427,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="TOLOWER" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Convert string to all lowercase letters.
</synopsis>
@@ -421,6 +441,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="LEN" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Return the length of the string given.
</synopsis>
@@ -434,6 +455,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="QUOTE" language="en_US">
<since><version>1.6.2.0</version></since>
<synopsis>
Quotes a given string, escaping embedded quotes as necessary
</synopsis>
@@ -445,6 +467,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="CSV_QUOTE" language="en_US">
<since><version>1.8.0</version></since>
<synopsis>
Quotes a given string for use in a CSV file, escaping embedded quotes as necessary
</synopsis>
@@ -456,6 +479,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="SHIFT" language="en_US">
<since><version>1.8.0</version></since>
<synopsis>
Removes and returns the first item off of a variable containing delimited text
</synopsis>
@@ -477,6 +501,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="POP" language="en_US">
<since><version>1.8.0</version></since>
<synopsis>
Removes and returns the last item off of a variable containing delimited text
</synopsis>
@@ -498,6 +523,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="PUSH" language="en_US">
<since><version>1.8.0</version></since>
<synopsis>
Appends one or more values to the end of a variable containing delimited text
</synopsis>
@@ -516,6 +542,7 @@ AST_THREADSTORAGE(tmp_buf);
</description>
</function>
<function name="UNSHIFT" language="en_US">
<since><version>1.8.0</version></since>
<synopsis>
Inserts one or more values to the beginning of a variable containing delimited text
</synopsis>