Review Board 1.7.16


xmldoc: Add support for an <example> tag in the Asterisk XML documentation

Review Request #3807 - Created July 16, 2014 and submitted

Matt Jordan
trunk
Reviewers
asterisk-dev
Asterisk
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.
Updated the JITTERBUFFER function. It now displays its dialplan examples in a single example block in the CLI help.

Changes between revision 1 and 2

1 2 3 4
1 2 3 4

  1. /trunk/funcs/func_jitterbuffer.c: Loading...
/trunk/funcs/func_jitterbuffer.c
Diff Revision 1 Diff Revision 2
[20] 63 lines
[+20] [+] ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
64
			<para>The length in milliseconds over which a timestamp difference will result in resyncing the jitterbuffer. </para>
64
			<para>The length in milliseconds over which a timestamp difference will result in resyncing the jitterbuffer. </para>
65
			<para> </para>
65
			<para> </para>
66
			<para>target_extra: Defaults to 40ms</para>
66
			<para>target_extra: Defaults to 40ms</para>
67
			<para>This option only affects the adaptive jitterbuffer. It represents the amount time in milliseconds by which the new jitter buffer will pad its size.</para>
67
			<para>This option only affects the adaptive jitterbuffer. It represents the amount time in milliseconds by which the new jitter buffer will pad its size.</para>
68
			<para> </para>
68
			<para> </para>
69
			<example title="Dialplan examples" language="text">
69
			<example title="Fixed with defaults" language="text">
70
			exten => 1,1,Set(JITTERBUFFER(fixed)=default);Fixed with defaults.
70
			exten => 1,1,Set(JITTERBUFFER(fixed)=default)
71
			exten => 1,1,Set(JITTERBUFFER(fixed)=200);Fixed with max size 200ms, default resync threshold and target extra.
71
			</example>
72
			exten => 1,1,Set(JITTERBUFFER(fixed)=200,1500);Fixed with max size 200ms resync threshold 1500.
72
			<example title="Fixed with 200ms max size" language="text">
73
			exten => 1,1,Set(JITTERBUFFER(adaptive)=default);Adaptive with defaults.
73
			exten => 1,1,Set(JITTERBUFFER(fixed)=200)
74
			exten => 1,1,Set(JITTERBUFFER(adaptive)=200,,60);Adaptive with max size 200ms, default resync threshold and 40ms target extra.
74
			</example>
75
			exten => 1,n,Set(JITTERBUFFER(disabled)=);Remove previously applied jitterbuffer
75
			<example title="Fixed with 200ms max size, resync threshold 1500" language="text">

    
   
76
			exten => 1,1,Set(JITTERBUFFER(fixed)=200,1500)

    
   
77
			</example>

    
   
78
			<example title="Adaptive with defaults" language="text">

    
   
79
			exten => 1,1,Set(JITTERBUFFER(adaptive)=default)

    
   
80
			</example>

    
   
81
			<example title="Adaptive with 200ms max size, 60ms target extra" language="text">

    
   
82
			exten => 1,1,Set(JITTERBUFFER(adaptive)=200,,60)

    
   
83
			</example>

    
   
84
			<example title="Set a fixed jitterbuffer with defaults; then remove it" language="text">

    
   
85
			exten => 1,1,Set(JITTERBUFFER(fixed)=default)

    
   
86
			exten => 1,n,Set(JITTERBUFFER(disabled)=)
76
			</example>
87
			</example>
77
			<note><para>If a channel specifies a jitterbuffer due to channel driver configuration and
88
			<note><para>If a channel specifies a jitterbuffer due to channel driver configuration and
78
			the JITTERBUFFER function has set a jitterbuffer for that channel, the jitterbuffer set by
89
			the JITTERBUFFER function has set a jitterbuffer for that channel, the jitterbuffer set by
79
			the JITTERBUFFER function will take priority and the jitterbuffer set by the channel
90
			the JITTERBUFFER function will take priority and the jitterbuffer set by the channel
80
			configuration will not be applied.</para></note>
91
			configuration will not be applied.</para></note>
[+20] [20] 81 lines
  1. /trunk/funcs/func_jitterbuffer.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.