documentation: Standardize examples

Most examples in the XML documentation use the
example tag to demonstrate examples, which gets
parsed specially in the Wiki to make it easier
to follow for users.

This fixes a few modules to use the example
tag instead of vanilla para tags to bring them
in line with the standard syntax.

ASTERISK-29777 #close

Change-Id: I9acb6cc5faf1d220e73c6dd28592371d768d279b
This commit is contained in:
Naveen Albert
2021-11-25 18:41:18 +00:00
committed by Kevin Harwell
parent dbc1a15146
commit bfac8fbeed
8 changed files with 78 additions and 53 deletions

View File

@@ -46,7 +46,8 @@
</synopsis>
<syntax>
<parameter name="direction" required="true">
<para>Must be <literal>TX</literal> or <literal>RX</literal>.</para>
<para>Must be <literal>TX</literal> or <literal>RX</literal> to
store digits, or <literal>remove</literal> to disable.</para>
</parameter>
</syntax>
<description>
@@ -58,10 +59,15 @@
<para><replaceable>max_digits</replaceable>: The maximum number of digits to
store in the variable. Defaults to 0 (no maximum). After reading <literal>
maximum</literal> digits, no more digits will be stored.</para>
<para>For example:</para>
<para>StoreDTMF(TX,CDR(digits))</para>
<para>StoreDTMF(RX,testvar,24)</para>
<para>StoreDTMF(remove)</para>
<example title="Store digits in CDR variable">
same => n,StoreDTMF(TX,CDR(digits))
</example>
<example title="Store up to 24 digits">
same => n,StoreDTMF(RX,testvar,24)
</example>
<example title="Disable digit collection">
same => n,StoreDTMF(remove)
</example>
</description>
</application>
***/

View File

@@ -65,9 +65,11 @@
<description>
<para>Executes mpg123 to play the given location, which typically would be a mp3 filename
or m3u playlist filename or a URL. Please read http://en.wikipedia.org/wiki/M3U
to see how M3U playlist file format is like, Example usage would be
to see what the M3U playlist file format is like.</para>
<para>User can exit by pressing any key on the dialpad, or by hanging up.</para>
<example title="Play an MP3 playlist">
exten => 1234,1,MP3Player(/var/lib/asterisk/playlist.m3u)
User can exit by pressing any key on the dialpad, or by hanging up.</para>
</example>
<para>This application does not automatically answer and should be preceeded by an
application such as Answer() or Progress().</para>
</description>

View File

@@ -376,7 +376,9 @@
<value name="NOTDYNAMIC" />
</variable>
</variablelist>
<para>Example: RemoveQueueMember(techsupport,SIP/3000)</para>
<example title="Remove queue member">
same => n,RemoveQueueMember(techsupport,SIP/3000)
</example>
</description>
<see-also>
<ref type="application">Queue</ref>
@@ -421,7 +423,9 @@
<value name="NOTFOUND" />
</variable>
</variablelist>
<para>Example: PauseQueueMember(,SIP/3000)</para>
<example title="Pause queue member">
same => n,PauseQueueMember(,SIP/3000)
</example>
</description>
<see-also>
<ref type="application">Queue</ref>
@@ -463,7 +467,9 @@
<value name="NOTFOUND" />
</variable>
</variablelist>
<para>Example: UnpauseQueueMember(,SIP/3000)</para>
<example title="Unpause queue member">
same => n,UnpauseQueueMember(,SIP/3000)
</example>
</description>
<see-also>
<ref type="application">Queue</ref>
@@ -495,7 +501,9 @@
</syntax>
<description>
<para>Allows you to write your own events into the queue log.</para>
<para>Example: QueueLog(101,${UNIQUEID},${AGENT},WENTONBREAK,600)</para>
<example title="Log custom queue event">
same => n,QueueLog(101,${UNIQUEID},${AGENT},WENTONBREAK,600)
</example>
</description>
<see-also>
<ref type="application">Queue</ref>
@@ -516,7 +524,7 @@
</application>
<application name="QueueUpdate" language="en_US">
<synopsis>
Writes to the queue_log file for OutBound calls and updates Realtime Data.
Writes to the queue_log file for outbound calls and updates Realtime Data.
Is used at h extension to be able to have all the parameters.
</synopsis>
<syntax>
@@ -529,7 +537,9 @@
</syntax>
<description>
<para>Allows you to write Outbound events into the queue log.</para>
<para>Example: exten => h,1,QueueUpdate(${QUEUE}, ${UNIQUEID}, ${AGENT}, ${DIALSTATUS}, ${ANSWEREDTIME}, ${DIALEDTIME} | ${DIALEDNUMBER})</para>
<example title="Write outbound event into queue log">
exten => h,1,QueueUpdate(${QUEUE}, ${UNIQUEID}, ${AGENT}, ${DIALSTATUS}, ${ANSWEREDTIME}, ${DIALEDTIME} | ${DIALEDNUMBER})
</example>
</description>
</application>
<function name="QUEUE_VARIABLES" language="en_US">

View File

@@ -23,9 +23,6 @@
*
* \brief Wait for Silence
* - Waits for up to 'x' milliseconds of silence, 'y' times \n
* - WaitForSilence(500,2) will wait for 1/2 second of silence, twice \n
* - WaitForSilence(1000,1) will wait for 1 second of silence, once \n
* - WaitForSilence(300,3,10) will wait for 300ms of silence, 3 times, and return after 10sec \n
*
* \author David C. Troy <dave@popvox.com>
*
@@ -78,11 +75,15 @@
playing a message.</para>
<para>Typically you will want to include two or more calls to WaitForSilence when dealing with an answering
machine; first waiting for the spiel to finish, then waiting for the beep, etc.</para>
<para>Examples:</para>
<para>WaitForSilence(500,2) will wait for 1/2 second of silence, twice</para>
<para>WaitForSilence(1000) will wait for 1 second of silence, once</para>
<para>WaitForSilence(300,3,10) will wait for 300ms silence, 3 times, and returns after 10 sec, even if silence
is not detected</para>
<example title="Wait for half a second of silence, twice">
same => n,WaitForSilence(500,2)
</example>
<example title="Wait for one second of silence, once">
same => n,WaitForSilence(1000)
</example>
<example title="Wait for 300 ms of silence, 3 times, and returns after 10 seconds, even if no silence detected">
same => n,WaitForSilence(300,3,10)
</example>
<para>Sets the channel variable <variable>WAITSTATUS</variable> to one of these values:</para>
<variablelist>
<variable name="WAITSTATUS">