<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18648">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">xmldocs: Improve examples.<br><br>Use example tags instead of regular para tags<br>where possible.<br><br>ASTERISK-30090<br><br>Change-Id: Iada8bbfda08f30b118cedf2d040bbb21e4966ec5<br>---<br>M apps/app_confbridge.c<br>M funcs/func_cdr.c<br>M funcs/func_dialgroup.c<br>M funcs/func_env.c<br>M funcs/func_frame_drop.c<br>M funcs/func_frame_trace.c<br>M funcs/func_math.c<br>M funcs/func_odbc.c<br>M funcs/func_periodic_hook.c<br>M funcs/func_pitchshift.c<br>M funcs/func_rand.c<br>M funcs/func_sha1.c<br>M funcs/func_shell.c<br>M funcs/func_speex.c<br>M funcs/func_strings.c<br>M funcs/func_talkdetect.c<br>M funcs/func_version.c<br>M funcs/func_vmcount.c<br>M funcs/func_volume.c<br>M res/res_calendar.c<br>M res/res_mutestream.c<br>M res/res_pjsip_config_wizard.c<br>M res/res_pjsip_header_funcs.c<br>23 files changed, 353 insertions(+), 243 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/48/18648/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c</span><br><span>index ae17bca..9b3ddba 100644</span><br><span>--- a/apps/app_confbridge.c</span><br><span>+++ b/apps/app_confbridge.c</span><br><span>@@ -198,23 +198,29 @@</span><br><span>                     <para>---- Example 1 ----</para></span><br><span>                         <para>In this example the custom user profile set on the channel will</span><br><span>                  automatically be used by the ConfBridge application.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>exten => 1,1,Answer()</para></span><br><span style="color: hsl(120, 100%, 40%);">+                     <example title="Example 1"></span><br><span style="color: hsl(120, 100%, 40%);">+                   exten => 1,1,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span>                     <para>; In this example the effect of the following line is</para></span><br><span>                       <para>; implied:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>; same => n,Set(CONFBRIDGE(user,template)=default_user)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>same => n,Set(CONFBRIDGE(user,announce_join_leave)=yes)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>same => n,Set(CONFBRIDGE(user,startmuted)=yes)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>same => n,ConfBridge(1) </para></span><br><span style="color: hsl(120, 100%, 40%);">+                  <example title="Example 1b"></span><br><span style="color: hsl(120, 100%, 40%);">+                  same => n,Set(CONFBRIDGE(user,template)=default_user)</span><br><span style="color: hsl(120, 100%, 40%);">+                      same => n,Set(CONFBRIDGE(user,announce_join_leave)=yes)</span><br><span style="color: hsl(120, 100%, 40%);">+                    same => n,Set(CONFBRIDGE(user,startmuted)=yes)</span><br><span style="color: hsl(120, 100%, 40%);">+                     same => n,ConfBridge(1)</span><br><span style="color: hsl(120, 100%, 40%);">+                    </example></span><br><span>                     <para>---- Example 2 ----</para></span><br><span>                         <para>This example shows how to use a predefined user profile in</span><br><span>                       <filename>confbridge.conf</filename> as a template for a dynamic profile.</span><br><span>                        Here we make an admin/marked user out of the <literal>my_user</literal></span><br><span>                  profile that you define in <filename>confbridge.conf</filename>.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>exten => 1,1,Answer()</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>same => n,Set(CONFBRIDGE(user,template)=my_user)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>same => n,Set(CONFBRIDGE(user,admin)=yes)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>same => n,Set(CONFBRIDGE(user,marked)=yes)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>same => n,ConfBridge(1)</para></span><br><span style="color: hsl(120, 100%, 40%);">+                   <example title="Example 2"></span><br><span style="color: hsl(120, 100%, 40%);">+                   exten => 1,1,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+                      same => n,Set(CONFBRIDGE(user,template)=my_user)</span><br><span style="color: hsl(120, 100%, 40%);">+                   same => n,Set(CONFBRIDGE(user,admin)=yes)</span><br><span style="color: hsl(120, 100%, 40%);">+                  same => n,Set(CONFBRIDGE(user,marked)=yes)</span><br><span style="color: hsl(120, 100%, 40%);">+                 same => n,ConfBridge(1)</span><br><span style="color: hsl(120, 100%, 40%);">+                    </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="CONFBRIDGE_INFO" language="en_US"></span><br><span>diff --git a/funcs/func_cdr.c b/funcs/func_cdr.c</span><br><span>index d7bc211..2c6e2e1 100644</span><br><span>--- a/funcs/func_cdr.c</span><br><span>+++ b/funcs/func_cdr.c</span><br><span>@@ -161,7 +161,9 @@</span><br><span>                      <note><para>CDRs can only be modified before the bridge between two channels is</span><br><span>                  torn down. For example, CDRs may not be modified after the <literal>Dial</literal></span><br><span>                       application has returned.</para></note></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example: exten => 1,1,Set(CDR(userfield)=test)</para></span><br><span style="color: hsl(120, 100%, 40%);">+                    <example title="Set the userfield"></span><br><span style="color: hsl(120, 100%, 40%);">+                    exten => 1,1,Set(CDR(userfield)=test)</span><br><span style="color: hsl(120, 100%, 40%);">+                     </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="CDR_PROP" language="en_US"></span><br><span>diff --git a/funcs/func_dialgroup.c b/funcs/func_dialgroup.c</span><br><span>index 9a98b3c..64aa658 100644</span><br><span>--- a/funcs/func_dialgroup.c</span><br><span>+++ b/funcs/func_dialgroup.c</span><br><span>@@ -67,10 +67,11 @@</span><br><span>                     fallback to a queue when the front line people are busy or unavailable, but</span><br><span>                  you still want front line people to log in and out of that group, just like</span><br><span>                  a queue.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>Example:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>exten => 1,1,Set(DIALGROUP(mygroup,add)=SIP/10)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>exten => 1,n,Set(DIALGROUP(mygroup,add)=SIP/20)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>exten => 1,n,Dial(${DIALGROUP(mygroup)})</para></span><br><span style="color: hsl(120, 100%, 40%);">+                  <example title="Add 2 endpoints to a dial group"></span><br><span style="color: hsl(120, 100%, 40%);">+                     exten => 1,1,Set(DIALGROUP(mygroup,add)=SIP/10)</span><br><span style="color: hsl(120, 100%, 40%);">+                    same => n,Set(DIALGROUP(mygroup,add)=SIP/20)</span><br><span style="color: hsl(120, 100%, 40%);">+                       same => n,Dial(${DIALGROUP(mygroup)})</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span>             </description></span><br><span>         </function></span><br><span>  ***/</span><br><span>diff --git a/funcs/func_env.c b/funcs/func_env.c</span><br><span>index 2602500..aba7533 100644</span><br><span>--- a/funcs/func_env.c</span><br><span>+++ b/funcs/func_env.c</span><br><span>@@ -178,48 +178,61 @@</span><br><span>              <description></span><br><span>                  <para>Read and write text file in character and line mode.</para></span><br><span>                        <para>Examples:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para/></span><br><span>                        <para>Read mode (byte):</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>    ;reads the entire content of the file.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>    Set(foo=${FILE(/tmp/test.txt)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>    ;reads from the 11th byte to the end of the file (i.e. skips the first 10).</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>    Set(foo=${FILE(/tmp/test.txt,10)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para>    ;reads from the 11th to 20th byte in the file (i.e. skip the first 10, then read 10 bytes).</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>    Set(foo=${FILE(/tmp/test.txt,10,10)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para/></span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="Reads the entire content of the file"></span><br><span style="color: hsl(120, 100%, 40%);">+                        same => n,Set(foo=${FILE(/tmp/test.txt)})</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Reads from the 11th byte to the end of the file (i.e. skips the first 10)"></span><br><span style="color: hsl(120, 100%, 40%);">+                   same => n,Set(foo=${FILE(/tmp/test.txt,10)})</span><br><span style="color: hsl(120, 100%, 40%);">+                       </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Reads from the 11th to 20th byte in the file (i.e. skip the first 10, then read 10 bytes)"></span><br><span style="color: hsl(120, 100%, 40%);">+                   same => n,Set(foo=${FILE(/tmp/test.txt,10,10)})</span><br><span style="color: hsl(120, 100%, 40%);">+                    </example></span><br><span>                     <para>Read mode (line):</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>    ; reads the 3rd line of the file.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>    Set(foo=${FILE(/tmp/test.txt,3,1,l)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>    ; reads the 3rd and 4th lines of the file.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para>    Set(foo=${FILE(/tmp/test.txt,3,2,l)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>    ; reads from the third line to the end of the file.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>    Set(foo=${FILE(/tmp/test.txt,3,,l)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>    ; reads the last three lines of the file.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>    Set(foo=${FILE(/tmp/test.txt,-3,,l)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>    ; reads the 3rd line of a DOS-formatted file.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>    Set(foo=${FILE(/tmp/test.txt,3,1,l,d)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para/></span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="Reads the 3rd line of the file"></span><br><span style="color: hsl(120, 100%, 40%);">+                      same => n,Set(foo=${FILE(/tmp/test.txt,3,1,l)})</span><br><span style="color: hsl(120, 100%, 40%);">+                    </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Reads the 3rd and 4th lines of the file"></span><br><span style="color: hsl(120, 100%, 40%);">+                     same => n,Set(foo=${FILE(/tmp/test.txt,3,2,l)})</span><br><span style="color: hsl(120, 100%, 40%);">+                    </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Reads from the third line to the end of the file"></span><br><span style="color: hsl(120, 100%, 40%);">+                    same => n,Set(foo=${FILE(/tmp/test.txt,3,,l)})</span><br><span style="color: hsl(120, 100%, 40%);">+                     </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Reads the last three lines of the file"></span><br><span style="color: hsl(120, 100%, 40%);">+                      same => n,Set(foo=${FILE(/tmp/test.txt,-3,,l)})</span><br><span style="color: hsl(120, 100%, 40%);">+                    </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Reads the 3rd line of a DOS-formatted file"></span><br><span style="color: hsl(120, 100%, 40%);">+                  same => n,Set(foo=${FILE(/tmp/test.txt,3,1,l,d)})</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span>                     <para>Write mode (byte):</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>    ; truncate the file and write "bar"</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>    Set(FILE(/tmp/test.txt)=bar)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>    ; Append "bar"</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>    Set(FILE(/tmp/test.txt,,,a)=bar)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>    ; Replace the first byte with "bar" (replaces 1 character with 3)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>    Set(FILE(/tmp/test.txt,0,1)=bar)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>    ; Replace 10 bytes beginning at the 21st byte of the file with "bar"</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>    Set(FILE(/tmp/test.txt,20,10)=bar)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para>    ; Replace all bytes from the 21st with "bar"</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>    Set(FILE(/tmp/test.txt,20)=bar)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>    ; Insert "bar" after the 4th character</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>    Set(FILE(/tmp/test.txt,4,0)=bar)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para/></span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="Truncate the file and write bar"></span><br><span style="color: hsl(120, 100%, 40%);">+                     same => n,Set(FILE(/tmp/test.txt)=bar)</span><br><span style="color: hsl(120, 100%, 40%);">+                     </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Append bar"></span><br><span style="color: hsl(120, 100%, 40%);">+                  same => n,Set(FILE(/tmp/test.txt,,,a)=bar)</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Replace the first byte with bar (replaces 1 character with 3)"></span><br><span style="color: hsl(120, 100%, 40%);">+                       same => n,Set(FILE(/tmp/test.txt,0,1)=bar)</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Replace 10 bytes beginning at the 21st byte of the file with bar"></span><br><span style="color: hsl(120, 100%, 40%);">+                    same => n,Set(FILE(/tmp/test.txt,20,10)=bar)</span><br><span style="color: hsl(120, 100%, 40%);">+                       </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Replace all bytes from the 21st with bar"></span><br><span style="color: hsl(120, 100%, 40%);">+                    same => n,Set(FILE(/tmp/test.txt,20)=bar)</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Insert bar after the 4th character"></span><br><span style="color: hsl(120, 100%, 40%);">+                  same => n,Set(FILE(/tmp/test.txt,4,0)=bar)</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span>                     <para>Write mode (line):</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>    ; Replace the first line of the file with "bar"</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>    Set(FILE(/tmp/foo.txt,0,1,l)=bar)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>    ; Replace the last line of the file with "bar"</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>    Set(FILE(/tmp/foo.txt,-1,,l)=bar)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>    ; Append "bar" to the file with a newline</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>    Set(FILE(/tmp/foo.txt,,,al)=bar)</para></span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="Replace the first line of the file with bar"></span><br><span style="color: hsl(120, 100%, 40%);">+                 same => n,Set(FILE(/tmp/foo.txt,0,1,l)=bar)</span><br><span style="color: hsl(120, 100%, 40%);">+                        </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Replace the last line of the file with bar"></span><br><span style="color: hsl(120, 100%, 40%);">+                  same => n,Set(FILE(/tmp/foo.txt,-1,,l)=bar)</span><br><span style="color: hsl(120, 100%, 40%);">+                        </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Append bar to the file with a newline"></span><br><span style="color: hsl(120, 100%, 40%);">+                       same => n,Set(FILE(/tmp/foo.txt,,,al)=bar)</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span>                     <note></span><br><span>                                 <para>If <literal>live_dangerously</literal> in <literal>asterisk.conf</literal></span><br><span>                               is set to <literal>no</literal>, this function can only be executed from the</span><br><span>diff --git a/funcs/func_frame_drop.c b/funcs/func_frame_drop.c</span><br><span>index f5d70f3..522685c 100644</span><br><span>--- a/funcs/func_frame_drop.c</span><br><span>+++ b/funcs/func_frame_drop.c</span><br><span>@@ -91,9 +91,15 @@</span><br><span>               </syntax></span><br><span>              <description></span><br><span>                  <para>Examples:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => 1,1,Set(FRAME_DROP(TX)=DTMF_BEGIN,DTMF_END); drop only DTMF frames towards this channel.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>exten => 1,1,Set(FRAME_DROP(TX)=ANSWER); drop only ANSWER CONTROL frames towards this channel.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => 1,1,Set(FRAME_DROP(RX)=DTMF_BEGIN,DTMF_END); drop only DTMF frames received on this channel.</para></span><br><span style="color: hsl(120, 100%, 40%);">+                     <example title="Drop only DTMF frames towards this channel"></span><br><span style="color: hsl(120, 100%, 40%);">+                  exten => 1,1,Set(FRAME_DROP(TX)=DTMF_BEGIN,DTMF_END)</span><br><span style="color: hsl(120, 100%, 40%);">+                       </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Drop only Answer control frames towards this channel"></span><br><span style="color: hsl(120, 100%, 40%);">+                        exten => 1,1,Set(FRAME_DROP(TX)=ANSWER)</span><br><span style="color: hsl(120, 100%, 40%);">+                    </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Drop only DTMF frames received on this channel"></span><br><span style="color: hsl(120, 100%, 40%);">+                      exten => 1,1,Set(FRAME_DROP(RX)=DTMF_BEGIN,DTMF_END)</span><br><span style="color: hsl(120, 100%, 40%);">+                       </example></span><br><span>             </description></span><br><span>         </function></span><br><span>  ***/</span><br><span>diff --git a/funcs/func_frame_trace.c b/funcs/func_frame_trace.c</span><br><span>index b62bae9..b023c9f 100644</span><br><span>--- a/funcs/func_frame_trace.c</span><br><span>+++ b/funcs/func_frame_trace.c</span><br><span>@@ -69,9 +69,15 @@</span><br><span>                 </syntax></span><br><span>              <description></span><br><span>                  <para>Examples:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => 1,1,Set(FRAME_TRACE(white)=DTMF_BEGIN,DTMF_END); view only DTMF frames. </para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>exten => 1,1,Set(FRAME_TRACE()=DTMF_BEGIN,DTMF_END); view only DTMF frames. </para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>exten => 1,1,Set(FRAME_TRACE(black)=DTMF_BEGIN,DTMF_END); view everything except DTMF frames. </para></span><br><span style="color: hsl(120, 100%, 40%);">+                    <example title="View only DTMF frames"></span><br><span style="color: hsl(120, 100%, 40%);">+                       exten => 1,1,Set(FRAME_TRACE(white)=DTMF_BEGIN,DTMF_END)</span><br><span style="color: hsl(120, 100%, 40%);">+                   </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="View only DTMF frames"></span><br><span style="color: hsl(120, 100%, 40%);">+                       exten => 1,1,Set(FRAME_TRACE()=DTMF_BEGIN,DTMF_END)</span><br><span style="color: hsl(120, 100%, 40%);">+                        </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="View everything except DTMF frames"></span><br><span style="color: hsl(120, 100%, 40%);">+                  exten => 1,1,Set(FRAME_TRACE(black)=DTMF_BEGIN,DTMF_END)</span><br><span style="color: hsl(120, 100%, 40%);">+                   </example></span><br><span>             </description></span><br><span>         </function></span><br><span>  ***/</span><br><span>diff --git a/funcs/func_math.c b/funcs/func_math.c</span><br><span>index c5c30e4..c3bc71f 100644</span><br><span>--- a/funcs/func_math.c</span><br><span>+++ b/funcs/func_math.c</span><br><span>@@ -71,7 +71,9 @@</span><br><span>              <description></span><br><span>                  <para>Performs mathematical functions based on two parameters and an operator.  The returned</span><br><span>                   value type is <replaceable>type</replaceable></para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>Example: Set(i=${MATH(123%16,int)}) - sets var i=11</para></span><br><span style="color: hsl(120, 100%, 40%);">+                  <example title="Sets var i to 11"></span><br><span style="color: hsl(120, 100%, 40%);">+                    same => n,Set(i=${MATH(123%16,int)})</span><br><span style="color: hsl(120, 100%, 40%);">+                       </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="INC" language="en_US"></span><br><span>@@ -104,8 +106,10 @@</span><br><span>              </syntax></span><br><span>              <description></span><br><span>                  <para>Decrements the value of a variable, while returning the updated value to the dialplan</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>Example: DEC(MyVAR) - Decrements MyVar</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para>Note: DEC(${MyVAR}) - Is wrong, as DEC expects the variable name, not its value</para></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Decrements MyVAR"></span><br><span style="color: hsl(120, 100%, 40%);">+                    same => n,NoOp(${DEC(MyVAR)})</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <note><para>DEC(${MyVAR}) is wrong, as DEC expects the variable name, not its value</para></note></span><br><span>            </description></span><br><span>         </function></span><br><span>    <function name="MIN" language="en_US"></span><br><span>@@ -123,8 +127,9 @@</span><br><span>               </syntax></span><br><span>              <description></span><br><span>                  <para>Returns the minimum of two numbers <replaceable>num1</replaceable> and <replaceable>num2</replaceable>.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>Example:  Set(min=${MIN(7,4)});</span><br><span style="color: hsl(0, 100%, 40%);">-                     Sets the min variable equal to 4.</para></span><br><span style="color: hsl(120, 100%, 40%);">+                        <example title="Sets the min variable equal to 4"></span><br><span style="color: hsl(120, 100%, 40%);">+                    same => n,Set(min=${MIN(7,4)})</span><br><span style="color: hsl(120, 100%, 40%);">+                     </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="MAX" language="en_US"></span><br><span>@@ -142,8 +147,9 @@</span><br><span>               </syntax></span><br><span>              <description></span><br><span>                  <para>Returns the maximum of two numbers <replaceable>num1</replaceable> and <replaceable>num2</replaceable>.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>Example:  Set(max=${MAX(4,7)});</span><br><span style="color: hsl(0, 100%, 40%);">-                     Sets the max variable equal to 7.</para></span><br><span style="color: hsl(120, 100%, 40%);">+                        <example title="Sets the max variable equal to 13"></span><br><span style="color: hsl(120, 100%, 40%);">+                   same => n,Set(max=${MAX(4,7)})</span><br><span style="color: hsl(120, 100%, 40%);">+                     </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="ABS" language="en_US"></span><br><span>@@ -160,8 +166,9 @@</span><br><span>               </syntax></span><br><span>              <description></span><br><span>                  <para>Returns the absolute value of a number <replaceable>num</replaceable>.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example:  Set(absval=${ABS(-13)});</span><br><span style="color: hsl(0, 100%, 40%);">-                  Sets the absval variable equal to 13.</para></span><br><span style="color: hsl(120, 100%, 40%);">+                    <example title="Sets the absval variable equal to 13"></span><br><span style="color: hsl(120, 100%, 40%);">+                        same => n,Set(absval=${ABS(-13)})</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span>             </description></span><br><span>         </function></span><br><span>  ***/</span><br><span>diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c</span><br><span>index 7e4e6a3..43c4a0c 100644</span><br><span>--- a/funcs/func_odbc.c</span><br><span>+++ b/funcs/func_odbc.c</span><br><span>@@ -93,7 +93,9 @@</span><br><span>              <description></span><br><span>                  <para>Used in SQL templates to escape data which may contain single ticks</span><br><span>                      <literal>'</literal> which are otherwise used to delimit data.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example: SELECT foo FROM bar WHERE baz='${SQL_ESC(${ARG1})}'</para></span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="Escape example"></span><br><span style="color: hsl(120, 100%, 40%);">+                       SELECT foo FROM bar WHERE baz='${SQL_ESC(${ARG1})}'</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="SQL_ESC_BACKSLASHES" language="en_US"></span><br><span>@@ -106,7 +108,9 @@</span><br><span>               <description></span><br><span>                  <para>Used in SQL templates to escape data which may contain backslashes</span><br><span>                       <literal>\</literal> which are otherwise used to escape data.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>Example: SELECT foo FROM bar WHERE baz='${SQL_ESC(${SQL_ESC_BACKSLASHES(${ARG1})})}'</para></span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="Escape with backslashes example"></span><br><span style="color: hsl(120, 100%, 40%);">+                     SELECT foo FROM bar WHERE baz='${SQL_ESC(${SQL_ESC_BACKSLASHES(${ARG1})})}'</span><br><span style="color: hsl(120, 100%, 40%);">+                   </example></span><br><span>             </description></span><br><span>         </function></span><br><span>  ***/</span><br><span>diff --git a/funcs/func_periodic_hook.c b/funcs/func_periodic_hook.c</span><br><span>index 6b90ee3..3c7b93e 100644</span><br><span>--- a/funcs/func_periodic_hook.c</span><br><span>+++ b/funcs/func_periodic_hook.c</span><br><span>@@ -67,15 +67,15 @@</span><br><span>                        <para>For example, you could use this function to enable playing</span><br><span>                       a periodic <literal>beep</literal> sound in a call.</para></span><br><span>                         <para/></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>To turn on:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>  Set(BEEPID=${PERIODIC_HOOK(hooks,beep,180)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para/></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>To turn off:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>  Set(PERIODIC_HOOK(${BEEPID})=off)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para/></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>To turn back on again later:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>Set(PERIODIC_HOOK(${BEEPID})=on)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para/></span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="To turn on"></span><br><span style="color: hsl(120, 100%, 40%);">+                  same => n,Set(BEEPID=${PERIODIC_HOOK(hooks,beep,180)})</span><br><span style="color: hsl(120, 100%, 40%);">+                     </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="To turn off"></span><br><span style="color: hsl(120, 100%, 40%);">+                 same => n,Set(PERIODIC_HOOK(${BEEPID})=off)</span><br><span style="color: hsl(120, 100%, 40%);">+                        </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="To turn back on again later"></span><br><span style="color: hsl(120, 100%, 40%);">+                 same => n,Set(PERIODIC_HOOK(${BEEPID})=on)</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span>                     <para>It is important to note that the hook does not actually</span><br><span>                  run on the channel itself.  It runs asynchronously on a new channel.</span><br><span>                         Any audio generated by the hook gets injected into the call for</span><br><span>diff --git a/funcs/func_pitchshift.c b/funcs/func_pitchshift.c</span><br><span>index 779f064..4057ed9 100644</span><br><span>--- a/funcs/func_pitchshift.c</span><br><span>+++ b/funcs/func_pitchshift.c</span><br><span>@@ -97,15 +97,30 @@</span><br><span>               </syntax></span><br><span>              <description></span><br><span>                  <para>Examples:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => 1,1,Set(PITCH_SHIFT(tx)=highest); raises pitch an octave </para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>exten => 1,1,Set(PITCH_SHIFT(rx)=higher) ; raises pitch more </para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>exten => 1,1,Set(PITCH_SHIFT(both)=high)   ; raises pitch </para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>exten => 1,1,Set(PITCH_SHIFT(rx)=low)    ; lowers pitch </para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>exten => 1,1,Set(PITCH_SHIFT(tx)=lower)  ; lowers pitch more </para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>exten => 1,1,Set(PITCH_SHIFT(both)=lowest) ; lowers pitch an octave </para></span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>exten => 1,1,Set(PITCH_SHIFT(rx)=0.8)    ; lowers pitch </para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>exten => 1,1,Set(PITCH_SHIFT(tx)=1.5)    ; raises pitch </para></span><br><span style="color: hsl(120, 100%, 40%);">+                  <example title="Raises pitch an octave"></span><br><span style="color: hsl(120, 100%, 40%);">+                      exten => 1,1,Set(PITCH_SHIFT(tx)=highest)</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Raises pitch more"></span><br><span style="color: hsl(120, 100%, 40%);">+                   exten => 1,1,Set(PITCH_SHIFT(rx)=higher)</span><br><span style="color: hsl(120, 100%, 40%);">+                   </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Raises pitch"></span><br><span style="color: hsl(120, 100%, 40%);">+                        exten => 1,1,Set(PITCH_SHIFT(both)=high)</span><br><span style="color: hsl(120, 100%, 40%);">+                   </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Lowers pitch"></span><br><span style="color: hsl(120, 100%, 40%);">+                        exten => 1,1,Set(PITCH_SHIFT(rx)=low)</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Lowers pitch more"></span><br><span style="color: hsl(120, 100%, 40%);">+                   exten => 1,1,Set(PITCH_SHIFT(tx)=lower)</span><br><span style="color: hsl(120, 100%, 40%);">+                    </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Lowers pitch an octave"></span><br><span style="color: hsl(120, 100%, 40%);">+                      exten => 1,1,Set(PITCH_SHIFT(both)=lowest)</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Lowers pitch"></span><br><span style="color: hsl(120, 100%, 40%);">+                        exten => 1,1,Set(PITCH_SHIFT(rx)=0.8)</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Raises pitch"></span><br><span style="color: hsl(120, 100%, 40%);">+                        exten => 1,1,Set(PITCH_SHIFT(tx)=1.5)</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span>             </description></span><br><span>         </function></span><br><span>  ***/</span><br><span>diff --git a/funcs/func_rand.c b/funcs/func_rand.c</span><br><span>index bf208e9..2b70ba3 100644</span><br><span>--- a/funcs/func_rand.c</span><br><span>+++ b/funcs/func_rand.c</span><br><span>@@ -49,8 +49,9 @@</span><br><span>                      <para>Choose a random number between <replaceable>min</replaceable> and <replaceable>max</replaceable>.</span><br><span>                        <replaceable>min</replaceable> defaults to <literal>0</literal>, if not specified, while <replaceable>max</replaceable> defaults</span><br><span>                         to <literal>RAND_MAX</literal> (2147483647 on many systems).</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>Example:  Set(junky=${RAND(1,8)});</span><br><span style="color: hsl(0, 100%, 40%);">-                  Sets junky to a random number between 1 and 8, inclusive.</para></span><br><span style="color: hsl(120, 100%, 40%);">+                        <example title="Set random number between 1 and 8, inclusive"></span><br><span style="color: hsl(120, 100%, 40%);">+                        exten => s,1,Set(junky=${RAND(1,8)})</span><br><span style="color: hsl(120, 100%, 40%);">+                       </example></span><br><span>             </description></span><br><span>         </function></span><br><span>  ***/</span><br><span>diff --git a/funcs/func_sha1.c b/funcs/func_sha1.c</span><br><span>index 6c96ecd..11685b2 100644</span><br><span>--- a/funcs/func_sha1.c</span><br><span>+++ b/funcs/func_sha1.c</span><br><span>@@ -45,9 +45,11 @@</span><br><span>             </syntax></span><br><span>              <description></span><br><span>                  <para>Generate a SHA1 digest via the SHA1 algorythm.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para>Example:  Set(sha1hash=${SHA1(junky)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para>Sets the asterisk variable sha1hash to the string <literal>60fa5675b9303eb62f99a9cd47f9f5837d18f9a0</literal></span><br><span style="color: hsl(0, 100%, 40%);">-                   which is known as his hash</para></span><br><span style="color: hsl(120, 100%, 40%);">+                       <example title="Set sha1hash variable to SHA1 hash of junky"></span><br><span style="color: hsl(120, 100%, 40%);">+                 exten => s,1,Set(sha1hash=${SHA1(junky)})</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <para>The example above sets the asterisk variable sha1hash to the string <literal>60fa5675b9303eb62f99a9cd47f9f5837d18f9a0</literal></span><br><span style="color: hsl(120, 100%, 40%);">+                       which is known as its hash</para></span><br><span>              </description></span><br><span>         </function></span><br><span>  ***/</span><br><span>diff --git a/funcs/func_shell.c b/funcs/func_shell.c</span><br><span>index fe1debe..c8c2187 100644</span><br><span>--- a/funcs/func_shell.c</span><br><span>+++ b/funcs/func_shell.c</span><br><span>@@ -91,7 +91,9 @@</span><br><span>          </syntax></span><br><span>              <description></span><br><span>                  <para>Collects the output generated by a command executed by the system shell</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>Example:  <literal>Set(foo=${SHELL(echo bar)})</literal></para></span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="Shell example"></span><br><span style="color: hsl(120, 100%, 40%);">+                       exten => s,1,Set(foo=${SHELL(echo bar)})</span><br><span style="color: hsl(120, 100%, 40%);">+                   </example></span><br><span>                     <note></span><br><span>                                 <para>The command supplied to this function will be executed by the</span><br><span>                            system's shell, typically specified in the SHELL environment variable. There</span><br><span>diff --git a/funcs/func_speex.c b/funcs/func_speex.c</span><br><span>index 1a88fae..7d05d6f 100644</span><br><span>--- a/funcs/func_speex.c</span><br><span>+++ b/funcs/func_speex.c</span><br><span>@@ -66,9 +66,10 @@</span><br><span>                   analog lines, but could be useful for other channels as well. The target volume</span><br><span>                      is set with a number between <literal>1-32768</literal>. The larger the number</span><br><span>                   the louder (more gain) the channel will receive.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>Examples:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => 1,1,Set(AGC(rx)=8000)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => 1,2,Set(AGC(tx)=off)</para></span><br><span style="color: hsl(120, 100%, 40%);">+                     <example title="Apply automatic gain control"></span><br><span style="color: hsl(120, 100%, 40%);">+                        exten => 1,1,Set(AGC(rx)=8000)</span><br><span style="color: hsl(120, 100%, 40%);">+                     exten => 1,2,Set(AGC(tx)=off)</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="DENOISE" language="en_US"></span><br><span>@@ -87,9 +88,10 @@</span><br><span>                    that it is executed on. It is very useful for noisy analog lines, especially</span><br><span>                         when adjusting gains or using AGC. Use <literal>rx</literal> for audio received from the channel</span><br><span>                         and <literal>tx</literal> to apply the filter to the audio being sent to the channel.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>Examples:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => 1,1,Set(DENOISE(rx)=on)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>exten => 1,2,Set(DENOISE(tx)=off)</para></span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="Apply noise reduction"></span><br><span style="color: hsl(120, 100%, 40%);">+                       exten => 1,1,Set(DENOISE(rx)=on)</span><br><span style="color: hsl(120, 100%, 40%);">+                   exten => 1,2,Set(DENOISE(tx)=off)</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span>             </description></span><br><span>         </function></span><br><span>  ***/</span><br><span>diff --git a/funcs/func_strings.c b/funcs/func_strings.c</span><br><span>index 3eed847..77cdc99 100644</span><br><span>--- a/funcs/func_strings.c</span><br><span>+++ b/funcs/func_strings.c</span><br><span>@@ -62,7 +62,10 @@</span><br><span>                         carriage return, and tab characters, respectively.  Also, octal and hexadecimal specifications are recognized</span><br><span>                        by the patterns <literal>\0nnn</literal> and <literal>\xHH</literal>, respectively.  For example, if you wanted</span><br><span>                      to encode a comma as the delimiter, you could use either <literal>\054</literal> or <literal>\x2C</literal>.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>Example: If ${example} contains <literal>ex-amp-le</literal>, then ${FIELDQTY(example,-)} returns 3.</para></span><br><span style="color: hsl(120, 100%, 40%);">+                     <example title="Prints 3"></span><br><span style="color: hsl(120, 100%, 40%);">+                    exten => s,1,Set(example=ex-amp-le)</span><br><span style="color: hsl(120, 100%, 40%);">+                                same => n,NoOp(${FIELDQTY(example,-)})</span><br><span style="color: hsl(120, 100%, 40%);">+                     </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="FIELDNUM" language="en_US"></span><br><span>@@ -83,7 +86,10 @@</span><br><span>                   carriage return, and tab characters, respectively.  Also, octal and hexadecimal specifications are recognized</span><br><span>                        by the patterns <literal>\0nnn</literal> and <literal>\xHH</literal>, respectively.  For example, if you wanted</span><br><span>                      to encode a comma as the delimiter, you could use either <literal>\054</literal> or <literal>\x2C</literal>.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>Example: If ${example} contains <literal>ex-amp-le</literal>, then ${FIELDNUM(example,-,amp)} returns 2.</para></span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="Prints 2"></span><br><span style="color: hsl(120, 100%, 40%);">+                    exten => s,1,Set(example=ex-amp-le)</span><br><span style="color: hsl(120, 100%, 40%);">+                                same => n,NoOp(${FIELDNUM(example,-,amp)})</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="LISTFILTER" language="en_US"></span><br><span>@@ -190,8 +196,10 @@</span><br><span>                       string, instead.</para></span><br><span>                        <note><para>The functions which take a variable name need to be passed var and not</span><br><span>                       ${var}.  Similarly, use PASSTHRU() and not ${PASSTHRU()}.</para></note></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example: ${CHANNEL} contains SIP/321-1</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para>         ${CUT(PASSTHRU(${CUT(CHANNEL,-,1)}),/,2)}) will return 321</para></span><br><span style="color: hsl(120, 100%, 40%);">+                  <example title="Prints 321"></span><br><span style="color: hsl(120, 100%, 40%);">+                  exten => s,1,NoOp(${CHANNEL}) ; contains SIP/321-1</span><br><span style="color: hsl(120, 100%, 40%);">+                         same => n,NoOp(${CUT(PASSTHRU(${CUT(CHANNEL,-,1)}),/,2)})</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="REGEX" language="en_US"></span><br><span>@@ -257,7 +265,9 @@</span><br><span>                     <parameter name="string" required="true" /></span><br><span>                </syntax></span><br><span>              <description></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example: ${KEYPADHASH(Les)} returns "537"</para></span><br><span style="color: hsl(120, 100%, 40%);">+                  <example title="Returns 537"></span><br><span style="color: hsl(120, 100%, 40%);">+                 exten => s,1,Return(${KEYPADHASH(Les)})</span><br><span style="color: hsl(120, 100%, 40%);">+                    </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="ARRAY" language="en_US"></span><br><span>@@ -273,7 +283,9 @@</span><br><span>                     <para>The comma-delimited list passed as a value to which the function is set will</span><br><span>                     be interpreted as a set of values to which the comma-delimited list of</span><br><span>                       variable names in the argument should be set.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>Example: Set(ARRAY(var1,var2)=1,2) will set var1 to 1 and var2 to 2</para></span><br><span style="color: hsl(120, 100%, 40%);">+                  <example title="Set var1 to 1 and var2 to 2"></span><br><span style="color: hsl(120, 100%, 40%);">+                 same => n,Set(ARRAY(var1,var2)=1,2)</span><br><span style="color: hsl(120, 100%, 40%);">+                        </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="STRPTIME" language="en_US"></span><br><span>@@ -289,7 +301,9 @@</span><br><span>                  <para>This is useful for converting a date into <literal>EPOCH</literal> time,</span><br><span>                     possibly to pass to an application like SayUnixTime or to calculate the difference</span><br><span>                   between the two date strings</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>Example: ${STRPTIME(2006-03-01 07:30:35,America/Chicago,%Y-%m-%d %H:%M:%S)} returns 1141219835</para></span><br><span style="color: hsl(120, 100%, 40%);">+                       <example title="Prints 1141219835"></span><br><span style="color: hsl(120, 100%, 40%);">+                   same => n,NoOp(${STRPTIME(2006-03-01 07:30:35,America/Chicago,%Y-%m-%d %H:%M:%S)})</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="STRFTIME" language="en_US"></span><br><span>@@ -343,7 +357,9 @@</span><br><span>                  <parameter name="string" required="true" /></span><br><span>                </syntax></span><br><span>              <description></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example: ${TOUPPER(Example)} returns "EXAMPLE"</para></span><br><span style="color: hsl(120, 100%, 40%);">+                     <example title="Prints EXAMPLE"></span><br><span style="color: hsl(120, 100%, 40%);">+                      exten => s,1,NoOp(${TOUPPER(Example)})</span><br><span style="color: hsl(120, 100%, 40%);">+                     </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="TOLOWER" language="en_US"></span><br><span>@@ -354,7 +370,9 @@</span><br><span>                   <parameter name="string" required="true" /></span><br><span>                </syntax></span><br><span>              <description></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example: ${TOLOWER(Example)} returns "example"</para></span><br><span style="color: hsl(120, 100%, 40%);">+                     <example title="Prints example"></span><br><span style="color: hsl(120, 100%, 40%);">+                      exten => s,1,NoOp(${TOLOWER(Example)})</span><br><span style="color: hsl(120, 100%, 40%);">+                     </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="LEN" language="en_US"></span><br><span>@@ -365,7 +383,9 @@</span><br><span>                       <parameter name="string" required="true" /></span><br><span>                </syntax></span><br><span>              <description></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example: ${LEN(example)} returns 7</para></span><br><span style="color: hsl(120, 100%, 40%);">+                   <example title="Prints 7"></span><br><span style="color: hsl(120, 100%, 40%);">+                    exten => s,1,NoOp(${LEN(example)})</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="QUOTE" language="en_US"></span><br><span>@@ -399,11 +419,12 @@</span><br><span>                   <parameter name="delimiter" required="false" default="," /></span><br><span>              </syntax></span><br><span>              <description></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>exten => s,1,Set(array=one,two,three)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>exten => s,n,While($["${SET(var=${SHIFT(array)})}" != ""])</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => s,n,NoOp(var is ${var})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>exten => s,n,EndWhile</para></span><br><span style="color: hsl(120, 100%, 40%);">+                     <example title="SHIFT example"></span><br><span style="color: hsl(120, 100%, 40%);">+                       exten => s,1,Set(array=one,two,three)</span><br><span style="color: hsl(120, 100%, 40%);">+                      exten => s,n,While($["${SET(var=${SHIFT(array)})}" != ""])</span><br><span style="color: hsl(120, 100%, 40%);">+                     exten => s,n,NoOp(var is ${var})</span><br><span style="color: hsl(120, 100%, 40%);">+                   exten => s,n,EndWhile</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span>                     <para>This would iterate over each value in array, left to right, and</span><br><span>                          would result in NoOp(var is one), NoOp(var is two), and</span><br><span>                              NoOp(var is three) being executed.</span><br><span>@@ -419,11 +440,12 @@</span><br><span>                   <parameter name="delimiter" required="false" default="," /></span><br><span>              </syntax></span><br><span>              <description></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>exten => s,1,Set(array=one,two,three)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>exten => s,n,While($["${SET(var=${POP(array)})}" != ""])</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>exten => s,n,NoOp(var is ${var})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>exten => s,n,EndWhile</para></span><br><span style="color: hsl(120, 100%, 40%);">+                     <example title="POP example"></span><br><span style="color: hsl(120, 100%, 40%);">+                 exten => s,1,Set(array=one,two,three)</span><br><span style="color: hsl(120, 100%, 40%);">+                      exten => s,n,While($["${SET(var=${POP(array)})}" != ""])</span><br><span style="color: hsl(120, 100%, 40%);">+                       exten => s,n,NoOp(var is ${var})</span><br><span style="color: hsl(120, 100%, 40%);">+                   exten => s,n,EndWhile</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span>                     <para>This would iterate over each value in array, right to left, and</span><br><span>                          would result in NoOp(var is three), NoOp(var is two), and</span><br><span>                            NoOp(var is one) being executed.</span><br><span>@@ -439,7 +461,10 @@</span><br><span>                      <parameter name="delimiter" required="false" default="," /></span><br><span>              </syntax></span><br><span>              <description></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example: Set(PUSH(array)=one,two,three) would append one,</span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="PUSH example"></span><br><span style="color: hsl(120, 100%, 40%);">+                        exten => s,1,Set(PUSH(array)=one,two,three)</span><br><span style="color: hsl(120, 100%, 40%);">+                        </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <para>This would append one,</span><br><span>                           two, and three to the end of the values stored in the variable</span><br><span>                               "array".</span><br><span>                   </para></span><br><span>@@ -454,7 +479,10 @@</span><br><span>                         <parameter name="delimiter" required="false" default="," /></span><br><span>              </syntax></span><br><span>              <description></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example: Set(UNSHIFT(array)=one,two,three) would insert one,</span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="UNSHIFT example"></span><br><span style="color: hsl(120, 100%, 40%);">+                     exten => s,1,Set(UNSHIFT(array)=one,two,three)</span><br><span style="color: hsl(120, 100%, 40%);">+                     </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <para>This would insert one,</span><br><span>                           two, and three before the values stored in the variable</span><br><span>                              "array".</span><br><span>                   </para></span><br><span>diff --git a/funcs/func_talkdetect.c b/funcs/func_talkdetect.c</span><br><span>index 88c470e..257ecda 100644</span><br><span>--- a/funcs/func_talkdetect.c</span><br><span>+++ b/funcs/func_talkdetect.c</span><br><span>@@ -103,11 +103,18 @@</span><br><span>                       natural speech.</para></span><br><span>                         <para>By default this value is 2500ms. Valid values are 1</span><br><span>                      through 2^31.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>Example:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>same => n,Set(TALK_DETECT(set)=)     ; Enable talk detection</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>same => n,Set(TALK_DETECT(set)=1200) ; Update existing talk detection's silence threshold to 1200 ms</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>same => n,Set(TALK_DETECT(remove)=)  ; Remove talk detection</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>same => n,Set(TALK_DETECT(set)=,128) ; Enable and set talk threshold to 128</para></span><br><span style="color: hsl(120, 100%, 40%);">+                       <example title="Enable talk detection"></span><br><span style="color: hsl(120, 100%, 40%);">+                       same => n,Set(TALK_DETECT(set)=)</span><br><span style="color: hsl(120, 100%, 40%);">+                   </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Update existing talk detection's silence threshold to 1200 ms"></span><br><span style="color: hsl(120, 100%, 40%);">+                   same => n,Set(TALK_DETECT(set)=1200)</span><br><span style="color: hsl(120, 100%, 40%);">+                       </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Remove talk detection"></span><br><span style="color: hsl(120, 100%, 40%);">+                       same => n,Set(TALK_DETECT(remove)=)</span><br><span style="color: hsl(120, 100%, 40%);">+                        </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Enable and set talk threshold to 128"></span><br><span style="color: hsl(120, 100%, 40%);">+                        same => n,Set(TALK_DETECT(set)=,128)</span><br><span style="color: hsl(120, 100%, 40%);">+                       </example></span><br><span>                     <para>This function will set the following variables:</para></span><br><span>                     <note></span><br><span>                                 <para>The TALK_DETECT function uses an audiohook to inspect the</span><br><span>@@ -117,10 +124,11 @@</span><br><span>                                it typically makes sense to place functions that modify the voice</span><br><span>                            media data prior to placing the TALK_DETECT function, as this will</span><br><span>                           yield better results.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                              <para>Example:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                               <para>same => n,Set(DENOISE(rx)=on)    ; Denoise received audio</para></span><br><span style="color: hsl(0, 100%, 40%);">-                           <para>same => n,Set(TALK_DETECT(set)=) ; Perform talk detection on the denoised received audio</para></span><br><span>                         </note></span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="Denoise and then perform talk detection"></span><br><span style="color: hsl(120, 100%, 40%);">+                     same => n,Set(DENOISE(rx)=on)    ; Denoise received audio</span><br><span style="color: hsl(120, 100%, 40%);">+                  same => n,Set(TALK_DETECT(set)=) ; Perform talk detection on the denoised received audio</span><br><span style="color: hsl(120, 100%, 40%);">+                   </example></span><br><span>             </description></span><br><span>         </function></span><br><span>  ***/</span><br><span>diff --git a/funcs/func_version.c b/funcs/func_version.c</span><br><span>index 01cb748..baef884 100644</span><br><span>--- a/funcs/func_version.c</span><br><span>+++ b/funcs/func_version.c</span><br><span>@@ -47,7 +47,7 @@</span><br><span>                          <enumlist></span><br><span>                                     <enum name="ASTERISK_VERSION_NUM"></span><br><span>                                           <para>A string of digits is returned, e.g. 10602 for 1.6.2 or 100300 for 10.3.0,</span><br><span style="color: hsl(0, 100%, 40%);">-                                          or 999999 when using an SVN build.</para></span><br><span style="color: hsl(120, 100%, 40%);">+                                               or 999999 when using a Git build.</para></span><br><span>                                       </enum></span><br><span>                                        <enum name="BUILD_USER"></span><br><span>                                             <para>The string representing the user's name whose account</span><br><span>@@ -73,9 +73,10 @@</span><br><span>                   </parameter></span><br><span>           </syntax></span><br><span>              <description></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>If there are no arguments, return the version of Asterisk in this format: SVN-branch-1.4-r44830M</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>Example:  Set(junky=${VERSION()};</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>Sets junky to the string <literal>SVN-branch-1.6-r74830M</literal>, or possibly, <literal>SVN-trunk-r45126M</literal>.</para></span><br><span style="color: hsl(120, 100%, 40%);">+                       <para>If there are no arguments, return the version of Asterisk in this format: 18.12.0</para></span><br><span style="color: hsl(120, 100%, 40%);">+                    <example title="Get current version"></span><br><span style="color: hsl(120, 100%, 40%);">+                 same => n,Set(junky=${VERSION()} ; sets junky to 18.12.0, or possibly GITMasterxxxxxx</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span>             </description></span><br><span>         </function></span><br><span>  ***/</span><br><span>diff --git a/funcs/func_vmcount.c b/funcs/func_vmcount.c</span><br><span>index 6600703..b6302cc 100644</span><br><span>--- a/funcs/func_vmcount.c</span><br><span>+++ b/funcs/func_vmcount.c</span><br><span>@@ -57,7 +57,9 @@</span><br><span>          <description></span><br><span>                  <para>Count the number of voicemails in a specified mailbox, you could also specify</span><br><span>                    the mailbox <replaceable>folder</replaceable>.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para>Example: <literal>exten => s,1,Set(foo=${VMCOUNT(125@default)})</literal></para></span><br><span style="color: hsl(120, 100%, 40%);">+                     <example title="Mailbox folder count"></span><br><span style="color: hsl(120, 100%, 40%);">+                        exten => s,1,Set(foo=${VMCOUNT(125@default)})</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span>                     <para>An ampersand-separated list of mailboxes may be specified to count voicemails in</span><br><span>                         multiple mailboxes. If a folder is specified, this will apply to all mailboxes specified.</para></span><br><span>                         <example title="Multiple mailbox inbox count"></span><br><span>diff --git a/funcs/func_volume.c b/funcs/func_volume.c</span><br><span>index a20bb76..9372872 100644</span><br><span>--- a/funcs/func_volume.c</span><br><span>+++ b/funcs/func_volume.c</span><br><span>@@ -59,11 +59,24 @@</span><br><span>              <description></span><br><span>                  <para>The VOLUME function can be used to increase or decrease the <literal>tx</literal> or</span><br><span>                         <literal>rx</literal> gain of any channel.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>For example:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>Set(VOLUME(TX)=3)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>Set(VOLUME(RX)=2)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>Set(VOLUME(TX,p)=3)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>Set(VOLUME(RX,p)=3)</para></span><br><span style="color: hsl(120, 100%, 40%);">+                  <example title="Increase volume"></span><br><span style="color: hsl(120, 100%, 40%);">+                     same => n,Set(VOLUME(TX)=3)</span><br><span style="color: hsl(120, 100%, 40%);">+                        </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Increase volume"></span><br><span style="color: hsl(120, 100%, 40%);">+                     same => n,Set(VOLUME(RX)=2)</span><br><span style="color: hsl(120, 100%, 40%);">+                        </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Increase volume with DTMF control"></span><br><span style="color: hsl(120, 100%, 40%);">+                   same => n,Set(VOLUME(TX,p)=3)</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Increase RX volume with DTMF control"></span><br><span style="color: hsl(120, 100%, 40%);">+                        same => n,Set(VOLUME(RX,p)=3)</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Decrease RX volume"></span><br><span style="color: hsl(120, 100%, 40%);">+                  same => n,Set(VOLUME(RX)=-4)</span><br><span style="color: hsl(120, 100%, 40%);">+                       </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Reset to normal"></span><br><span style="color: hsl(120, 100%, 40%);">+                     same => n,Set(VOLUME(RX)=0)</span><br><span style="color: hsl(120, 100%, 40%);">+                        </example></span><br><span>             </description></span><br><span>         </function></span><br><span>  ***/</span><br><span>diff --git a/res/res_calendar.c b/res/res_calendar.c</span><br><span>index 98f9169..4af1fde 100644</span><br><span>--- a/res/res_calendar.c</span><br><span>+++ b/res/res_calendar.c</span><br><span>@@ -193,7 +193,9 @@</span><br><span>                        </parameter></span><br><span>           </syntax></span><br><span>              <description></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>Example: CALENDAR_WRITE(calendar,field1,field2,field3)=val1,val2,val3</para></span><br><span style="color: hsl(120, 100%, 40%);">+                        <example title="Set calendar fields"></span><br><span style="color: hsl(120, 100%, 40%);">+                 same => n,Set(CALENDAR_WRITE(calendar,field1,field2,field3)=val1,val2,val3)</span><br><span style="color: hsl(120, 100%, 40%);">+                        </example></span><br><span>                     <para>The field and value arguments can easily be set/passed using the HASHKEYS() and HASH() functions</para></span><br><span>                    <variablelist></span><br><span>                                 <variable name="CALENDAR_SUCCESS"></span><br><span>diff --git a/res/res_mutestream.c b/res/res_mutestream.c</span><br><span>index 8040a3a..93c6d0a 100644</span><br><span>--- a/res/res_mutestream.c</span><br><span>+++ b/res/res_mutestream.c</span><br><span>@@ -69,16 +69,13 @@</span><br><span>                        </parameter></span><br><span>           </syntax></span><br><span>              <description></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>The MUTEAUDIO function can be used to mute inbound (to the PBX) or outbound audio in a call.</span><br><span style="color: hsl(0, 100%, 40%);">-                        </para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>Examples:</span><br><span style="color: hsl(0, 100%, 40%);">-                   </para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para></span><br><span style="color: hsl(0, 100%, 40%);">-                    MUTEAUDIO(in)=on</span><br><span style="color: hsl(0, 100%, 40%);">-                        </para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para></span><br><span style="color: hsl(0, 100%, 40%);">-                    MUTEAUDIO(in)=off</span><br><span style="color: hsl(0, 100%, 40%);">-                       </para></span><br><span style="color: hsl(120, 100%, 40%);">+                 <para>The MUTEAUDIO function can be used to mute inbound (to the PBX) or outbound audio in a call.</para></span><br><span style="color: hsl(120, 100%, 40%);">+                 <example title="Mute incoming audio"></span><br><span style="color: hsl(120, 100%, 40%);">+                 exten => s,1,Set(MUTEAUDIO(in)=on)</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Do not mute incoming audio"></span><br><span style="color: hsl(120, 100%, 40%);">+                  exten => s,1,Set(MUTEAUDIO(in)=off)</span><br><span style="color: hsl(120, 100%, 40%);">+                        </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <manager name="MuteAudio" language="en_US"></span><br><span>diff --git a/res/res_pjsip_config_wizard.c b/res/res_pjsip_config_wizard.c</span><br><span>index 4c1c59b..59976b1 100644</span><br><span>--- a/res/res_pjsip_config_wizard.c</span><br><span>+++ b/res/res_pjsip_config_wizard.c</span><br><span>@@ -65,25 +65,24 @@</span><br><span>                         endpoint, aor, contact, auth and phoneprov objects necessary for a phone to</span><br><span>                  get phone provisioning information, register, and make and receive calls.</span><br><span>                    A hint is also created in the default context for extension 1000.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para> </para></span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>[myphone]</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>type = wizard</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>sends_auth = no</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>accepts_auth = yes</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>sends_registrations = no</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>accepts_registrations = yes</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>has_phoneprov = yes</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>transport = ipv4</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>has_hint = yes</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para>hint_exten = 1000</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>inbound_auth/username = testname</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>inbound_auth/password = test password</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>endpoint/allow = ulaw</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>endpoint/context = default</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>phoneprov/MAC = 001122aa4455</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>phoneprov/PROFILE = profile1</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para> </para></span><br><span style="color: hsl(120, 100%, 40%);">+                    <example title="myphone"></span><br><span style="color: hsl(120, 100%, 40%);">+                     [myphone]</span><br><span style="color: hsl(120, 100%, 40%);">+                     type = wizard</span><br><span style="color: hsl(120, 100%, 40%);">+                 sends_auth = no</span><br><span style="color: hsl(120, 100%, 40%);">+                       accepts_auth = yes</span><br><span style="color: hsl(120, 100%, 40%);">+                    sends_registrations = no</span><br><span style="color: hsl(120, 100%, 40%);">+                      accepts_registrations = yes</span><br><span style="color: hsl(120, 100%, 40%);">+                   has_phoneprov = yes</span><br><span style="color: hsl(120, 100%, 40%);">+                   transport = ipv4</span><br><span style="color: hsl(120, 100%, 40%);">+                      has_hint = yes</span><br><span style="color: hsl(120, 100%, 40%);">+                        hint_exten = 1000</span><br><span style="color: hsl(120, 100%, 40%);">+                     inbound_auth/username = testname</span><br><span style="color: hsl(120, 100%, 40%);">+                      inbound_auth/password = test password</span><br><span style="color: hsl(120, 100%, 40%);">+                 endpoint/allow = ulaw</span><br><span style="color: hsl(120, 100%, 40%);">+                 endpoint/context = default</span><br><span style="color: hsl(120, 100%, 40%);">+                    phoneprov/MAC = 001122aa4455</span><br><span style="color: hsl(120, 100%, 40%);">+                  phoneprov/PROFILE = profile1</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span> </span><br><span>                         <para>The first 8 items are specific to the wizard.  The rest of the items</span><br><span>                     are passed verbatim to the underlying objects.</para></span><br><span>@@ -92,21 +91,20 @@</span><br><span>                    <para>The following configuration snippet would create the</span><br><span>                     endpoint, aor, contact, auth, identify and registration objects necessary for a trunk</span><br><span>                        to another pbx or ITSP that requires registration.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para> </para></span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>[mytrunk]</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>type = wizard</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>sends_auth = yes</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>accepts_auth = no</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>sends_registrations = yes</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>accepts_registrations = no</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>transport = ipv4</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>remote_hosts = sip1.myitsp.com:5060,sip2.myitsp.com:5060</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>outbound_auth/username = testname</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>outbound_auth/password = test password</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para>endpoint/allow = ulaw</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>endpoint/context = default</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para> </para></span><br><span style="color: hsl(120, 100%, 40%);">+                    <example title="mytrunk"></span><br><span style="color: hsl(120, 100%, 40%);">+                     [mytrunk]</span><br><span style="color: hsl(120, 100%, 40%);">+                     type = wizard</span><br><span style="color: hsl(120, 100%, 40%);">+                 sends_auth = yes</span><br><span style="color: hsl(120, 100%, 40%);">+                      accepts_auth = no</span><br><span style="color: hsl(120, 100%, 40%);">+                     sends_registrations = yes</span><br><span style="color: hsl(120, 100%, 40%);">+                     accepts_registrations = no</span><br><span style="color: hsl(120, 100%, 40%);">+                    transport = ipv4</span><br><span style="color: hsl(120, 100%, 40%);">+                      remote_hosts = sip1.myitsp.com:5060,sip2.myitsp.com:5060</span><br><span style="color: hsl(120, 100%, 40%);">+                      outbound_auth/username = testname</span><br><span style="color: hsl(120, 100%, 40%);">+                     outbound_auth/password = test password</span><br><span style="color: hsl(120, 100%, 40%);">+                        endpoint/allow = ulaw</span><br><span style="color: hsl(120, 100%, 40%);">+                 endpoint/context = default</span><br><span style="color: hsl(120, 100%, 40%);">+                    </example></span><br><span> </span><br><span>                         <para>Of course, any of the items in either example could be placed into</span><br><span>                       templates and shared among wizard objects.</para></span><br><span>@@ -227,10 +225,10 @@</span><br><span>                                      <para>   <literal>exten =&gt; &lt;hint_exten&gt;,1,&lt;hint_application&gt;</literal></para></span><br><span>                                     <para> </para></span><br><span>                                   <para>You can specify any valid extensions.conf application expression.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                                      <para>Examples: </para></span><br><span style="color: hsl(0, 100%, 40%);">-                                     <para>   <literal>Dial(${HINT})</literal></para></span><br><span style="color: hsl(0, 100%, 40%);">-                                        <para>   <literal>Gosub(stdexten,${EXTEN},1(${HINT}))</literal></para></span><br><span style="color: hsl(0, 100%, 40%);">-                                  <para> </para></span><br><span style="color: hsl(120, 100%, 40%);">+                                    <example title="Valid expressions"></span><br><span style="color: hsl(120, 100%, 40%);">+                                   Dial(${HINT})</span><br><span style="color: hsl(120, 100%, 40%);">+                                 Gosub(stdexten,${EXTEN},1(${HINT}))</span><br><span style="color: hsl(120, 100%, 40%);">+                                   </example></span><br><span>                                     <para>Any extensions.conf style variables specified are passed directly to the</span><br><span>                                         dialplan.</para></span><br><span>                                       <para> </para></span><br><span>diff --git a/res/res_pjsip_header_funcs.c b/res/res_pjsip_header_funcs.c</span><br><span>index ee94147..fa6db34 100644</span><br><span>--- a/res/res_pjsip_header_funcs.c</span><br><span>+++ b/res/res_pjsip_header_funcs.c</span><br><span>@@ -84,65 +84,59 @@</span><br><span>                        channel. One exception is that you can read headers that you have already</span><br><span>                    added on the outbound channel.</para></span><br><span>                  <para>Examples:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>; Set 'somevar' to the value of the 'From' header.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>exten => 1,1,Set(somevar=${PJSIP_HEADER(read,From)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>; Set 'via2' to the value of the 2nd 'Via' header.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>exten => 1,1,Set(via2=${PJSIP_HEADER(read,Via,2)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>; Set 'xhdr' to the value of the 1sx X-header.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para>exten => 1,1,Set(xhdr=${PJSIP_HEADER(read,X-*,1)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>; Add an 'X-Myheader' header with the value of 'myvalue'.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => 1,1,Set(PJSIP_HEADER(add,X-MyHeader)=myvalue)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>; Add an 'X-Myheader' header with an empty value.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => 1,1,Set(PJSIP_HEADER(add,X-MyHeader)=)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>; Update the value of the header named 'X-Myheader' to 'newvalue'.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                     <para>; 'X-Myheader' must already exist or the call will fail.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>exten => 1,1,Set(PJSIP_HEADER(update,X-MyHeader)=newvalue)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>; Remove all headers whose names exactly match 'X-MyHeader'.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>exten => 1,1,Set(PJSIP_HEADER(remove,X-MyHeader)=)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>; Remove all headers that begin with 'X-My'.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>exten => 1,1,Set(PJSIP_HEADER(remove,X-My*)=)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>; Remove all previously added headers.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                 <para>exten => 1,1,Set(PJSIP_HEADER(remove,*)=)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(120, 100%, 40%);">+                    <example title="Set somevar to the value of the From header"></span><br><span style="color: hsl(120, 100%, 40%);">+                 exten => 1,1,Set(somevar=${PJSIP_HEADER(read,From)})</span><br><span style="color: hsl(120, 100%, 40%);">+                       </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Set via2 to the value of the 2nd Via header"></span><br><span style="color: hsl(120, 100%, 40%);">+                 exten => 1,1,Set(via2=${PJSIP_HEADER(read,Via,2)})</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Set xhdr to the value of the 1st X-header"></span><br><span style="color: hsl(120, 100%, 40%);">+                   exten => 1,1,Set(xhdr=${PJSIP_HEADER(read,X-*,1)})</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Add an X-Myheader header with the value of myvalue"></span><br><span style="color: hsl(120, 100%, 40%);">+                  exten => 1,1,Set(PJSIP_HEADER(add,X-MyHeader)=myvalue)</span><br><span style="color: hsl(120, 100%, 40%);">+                     </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Add an X-Myheader header with an empty value"></span><br><span style="color: hsl(120, 100%, 40%);">+                        exten => 1,1,Set(PJSIP_HEADER(add,X-MyHeader)=)</span><br><span style="color: hsl(120, 100%, 40%);">+                    </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Update the value of the header named X-Myheader to newvalue"></span><br><span style="color: hsl(120, 100%, 40%);">+                 ; 'X-Myheader' must already exist or the call will fail.</span><br><span style="color: hsl(120, 100%, 40%);">+                      exten => 1,1,Set(PJSIP_HEADER(update,X-MyHeader)=newvalue)</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Remove all headers whose names exactly match X-MyHeader"></span><br><span style="color: hsl(120, 100%, 40%);">+                     exten => 1,1,Set(PJSIP_HEADER(remove,X-MyHeader)=)</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Remove all headers that begin with X-My"></span><br><span style="color: hsl(120, 100%, 40%);">+                     exten => 1,1,Set(PJSIP_HEADER(remove,X-My*)=)</span><br><span style="color: hsl(120, 100%, 40%);">+                      </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Remove all previously added headers"></span><br><span style="color: hsl(120, 100%, 40%);">+                 exten => 1,1,Set(PJSIP_HEADER(remove,*)=)</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span>                     <note><para>The <literal>remove</literal> action can be called by reading</span><br><span style="color: hsl(0, 100%, 40%);">-                       <emphasis>or</emphasis> writing PJSIP_HEADER.</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>; Display the number of headers removed</para></span><br><span style="color: hsl(0, 100%, 40%);">-                        <para>exten => 1,1,Verbose( Removed ${PJSIP_HEADER(remove,X-MyHeader)} headers)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>; Set a variable to the number of headers removed</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => 1,1,Set(count=${PJSIP_HEADER(remove,X-MyHeader)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>; Just remove them ignoring any count</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>exten => 1,1,Set(=${PJSIP_HEADER(remove,X-MyHeader)})</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>exten => 1,1,Set(PJSIP_HEADER(remove,X-MyHeader)=)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      </note></span><br><span style="color: hsl(120, 100%, 40%);">+                 <emphasis>or</emphasis> writing PJSIP_HEADER.</para></note></span><br><span style="color: hsl(120, 100%, 40%);">+                   <example title="Display the number of headers removed"></span><br><span style="color: hsl(120, 100%, 40%);">+                       exten => 1,1,Verbose( Removed ${PJSIP_HEADER(remove,X-MyHeader)} headers)</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Set a variable to the number of headers removed"></span><br><span style="color: hsl(120, 100%, 40%);">+                     exten => 1,1,Set(count=${PJSIP_HEADER(remove,X-MyHeader)})</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span style="color: hsl(120, 100%, 40%);">+                      <example title="Just remove them ignoring any count"></span><br><span style="color: hsl(120, 100%, 40%);">+                 exten => 1,1,Set(=${PJSIP_HEADER(remove,X-MyHeader)})</span><br><span style="color: hsl(120, 100%, 40%);">+                      exten => 1,1,Set(PJSIP_HEADER(remove,X-MyHeader)=)</span><br><span style="color: hsl(120, 100%, 40%);">+                 </example></span><br><span> </span><br><span>                         <note><para>If you call PJSIP_HEADER in a normal dialplan context you'll be</span><br><span>                  operating on the <emphasis>caller's (incoming)</emphasis> channel which</span><br><span>                      may not be what you want. To operate on the <emphasis>callee's (outgoing)</emphasis></span><br><span style="color: hsl(0, 100%, 40%);">-                    channel call PJSIP_HEADER in a pre-dial handler. </para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>Example:</para></span><br><span style="color: hsl(0, 100%, 40%);">-                       <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>[handler]</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => addheader,1,Set(PJSIP_HEADER(add,X-MyHeader)=myvalue)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>exten => addheader,2,Set(PJSIP_HEADER(add,X-MyHeader2)=myvalue2)</para></span><br><span style="color: hsl(0, 100%, 40%);">-                    <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      <para>[somecontext]</para></span><br><span style="color: hsl(0, 100%, 40%);">-                  <para>exten => 1,1,Dial(PJSIP/${EXTEN},,b(handler^addheader^1))</para></span><br><span style="color: hsl(0, 100%, 40%);">-                   <para>;</para></span><br><span style="color: hsl(0, 100%, 40%);">-                      </note></span><br><span style="color: hsl(120, 100%, 40%);">+                 channel call PJSIP_HEADER in a pre-dial handler. </para></note></span><br><span style="color: hsl(120, 100%, 40%);">+                   <example title="Set headers on callee channel"></span><br><span style="color: hsl(120, 100%, 40%);">+                       [handler]</span><br><span style="color: hsl(120, 100%, 40%);">+                     exten => addheader,1,Set(PJSIP_HEADER(add,X-MyHeader)=myvalue)</span><br><span style="color: hsl(120, 100%, 40%);">+                     exten => addheader,2,Set(PJSIP_HEADER(add,X-MyHeader2)=myvalue2)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+                 [somecontext]</span><br><span style="color: hsl(120, 100%, 40%);">+                 exten => 1,1,Dial(PJSIP/${EXTEN},,b(handler^addheader^1))</span><br><span style="color: hsl(120, 100%, 40%);">+                  </example></span><br><span>             </description></span><br><span>         </function></span><br><span>    <function name="PJSIP_HEADERS" language="en_US"></span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18648">change 18648</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/18648"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 19 </div>
<div style="display:none"> Gerrit-Change-Id: Iada8bbfda08f30b118cedf2d040bbb21e4966ec5 </div>
<div style="display:none"> Gerrit-Change-Number: 18648 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>