Browse Source

dialplan: documentation for match_dynamic parameter

Daniel-Constantin Mierla 11 years ago
parent
commit
f24c03d667
2 changed files with 55 additions and 5 deletions
  1. 27 5
      modules/dialplan/README
  2. 28 0
      modules/dialplan/doc/dialplan_admin.xml

+ 27 - 5
modules/dialplan/README

@@ -43,6 +43,7 @@ Juha Heinanen
               5.10. attrs_col (string)
               5.11. attrs_pvar (string)
               5.12. fetch_rows (int)
+              5.13. match_dynamic (int)
 
         6. Functions
 
@@ -76,9 +77,10 @@ Juha Heinanen
    1.10. Set attrs_col parameter
    1.11. Set attrs_pvar parameter
    1.12. Set fetch_rows parameter
-   1.13. dp_translate usage
+   1.13. Set match_dynamic parameter
    1.14. dp_translate usage
-   1.15. Example of rules
+   1.15. dp_translate usage
+   1.16. Example of rules
 
 Chapter 1. Admin Guide
 
@@ -106,6 +108,7 @@ Chapter 1. Admin Guide
         5.10. attrs_col (string)
         5.11. attrs_pvar (string)
         5.12. fetch_rows (int)
+        5.13. match_dynamic (int)
 
    6. Functions
 
@@ -196,6 +199,7 @@ Chapter 1. Admin Guide
    5.10. attrs_col (string)
    5.11. attrs_pvar (string)
    5.12. fetch_rows (int)
+   5.13. match_dynamic (int)
 
 5.1. db_url (string)
 
@@ -334,6 +338,24 @@ modparam("dialplan", "attrs_pvar", "$avp(s:dest)")
 modparam("dialplan", "fetch_rows", 4000)
 ...
 
+5.13. match_dynamic (int)
+
+   If set to 1, the match and substitution expressions can include script
+   variables and their values are evaluated at runtime.
+
+   During the loading process, the values that contain variables are no
+   longer pre-compiled to PCRE structure in memory, because the values
+   change at runtime, thus expect slightly slower performances. Values
+   without script variables are pre-compiled even if this parameter is
+   enabled.
+
+   Default value is "0" (disabled).
+
+   Example 1.13. Set match_dynamic parameter
+...
+modparam("dialplan", "match_dynamic", 1)
+...
+
 6. Functions
 
    6.1. dp_translate(id, [src[/dest]])
@@ -373,13 +395,13 @@ modparam("dialplan", "fetch_rows", 4000)
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.13. dp_translate usage
+   Example 1.14. dp_translate usage
 ...
 dp_translate("240", "$ruri.user/$avp(s:dest)");
 xlog("translated to var $avp(s:dest) \n");
 ...
 
-   Example 1.14. dp_translate usage
+   Example 1.15. dp_translate usage
 ...
 $avp(s:src) = $ruri.user;
 dp_translate("$var(x)", "$avp(s:src)/$var(y)");
@@ -462,7 +484,7 @@ xlog("translated to var $var(y) \n");
    Some sample records from a dialplan table are presented in the next
    figure.
 
-   Example 1.15. Example of rules
+   Example 1.16. Example of rules
 ...
 dpid: 1
 pr: 1

+ 28 - 0
modules/dialplan/doc/dialplan_admin.xml

@@ -351,6 +351,34 @@ modparam("dialplan", "fetch_rows", 4000)
 		</example>
 	</section>
 
+	<section id="dialplan.p.match_dynamic">
+		<title><varname>match_dynamic</varname> (int)</title>
+		<para>
+		If set to 1, the match and substitution expressions can
+		include script variables and their values are evaluated at
+		runtime.
+		</para>
+		<para>
+		During the loading process, the values that contain
+		variables are no longer pre-compiled to PCRE structure in
+		memory, because the values change at runtime, thus expect slightly
+		slower performances. Values without script variables are pre-compiled
+		even if this parameter is enabled.
+		</para>
+		<para>
+		<emphasis>
+			Default value is <quote>0</quote> (disabled).
+		</emphasis>
+		</para>
+		<example>
+		<title>Set <varname>match_dynamic</varname> parameter</title>
+		<programlisting format="linespecific">
+...
+modparam("dialplan", "match_dynamic", 1)
+...
+		</programlisting>
+		</example>
+	</section>
 
 	</section>