瀏覽代碼

modules/dialplan: dp_translate documentation improvement

Juha Heinanen 13 年之前
父節點
當前提交
bf2cb0f9a5
共有 2 個文件被更改,包括 28 次插入28 次删除
  1. 22 22
      modules/dialplan/README
  2. 6 6
      modules/dialplan/doc/dialplan_admin.xml

+ 22 - 22
modules/dialplan/README

@@ -12,9 +12,9 @@ Edited by
 
 
 Juha Heinanen
 Juha Heinanen
 
 
-   Copyright © 2007-2008 Voice Sistem SRL
+   Copyright © 2007-2008 Voice Sistem SRL
 
 
-   Copyright © 2008-2010 Juha Heinanen
+   Copyright © 2008-2010 Juha Heinanen
      __________________________________________________________________
      __________________________________________________________________
 
 
    Table of Contents
    Table of Contents
@@ -46,7 +46,7 @@ Juha Heinanen
 
 
         6. Functions
         6. Functions
 
 
-              6.1. dp_translate(id, src[/dest])
+              6.1. dp_translate(id, [src[/dest]])
 
 
         7. MI Commands
         7. MI Commands
 
 
@@ -109,7 +109,7 @@ Chapter 1. Admin Guide
 
 
    6. Functions
    6. Functions
 
 
-        6.1. dp_translate(id, src[/dest])
+        6.1. dp_translate(id, [src[/dest]])
 
 
    7. MI Commands
    7. MI Commands
 
 
@@ -200,7 +200,7 @@ Chapter 1. Admin Guide
 
 
    The translation rules will be loaded using this database URL.
    The translation rules will be loaded using this database URL.
 
 
-   Default value is "mysql://openser:openserrw@localhost/openser".
+   Default value is “mysql://openser:openserrw@localhost/openser�.
 
 
    Example 1.1. Set db_url parameter
    Example 1.1. Set db_url parameter
 ...
 ...
@@ -211,7 +211,7 @@ modparam("dialplan", "db_url", "mysql://user:passwb@localhost/db")
 
 
    The table's name from which to load the translation rules.
    The table's name from which to load the translation rules.
 
 
-   Default value is "dialplan".
+   Default value is “dialplan�.
 
 
    Example 1.2. Set table_name parameter
    Example 1.2. Set table_name parameter
 ...
 ...
@@ -222,7 +222,7 @@ modparam("dialplan", "table_name", "my_table")
 
 
    The column name used to store the dialplan ID group.
    The column name used to store the dialplan ID group.
 
 
-   Default value is "dpid".
+   Default value is “dpid�.
 
 
    Example 1.3. Set dpid_col parameter
    Example 1.3. Set dpid_col parameter
 ...
 ...
@@ -234,7 +234,7 @@ modparam("dialplan", "dpid_col", "column_name")
    The column name used to store the priority of the corresponding rule
    The column name used to store the priority of the corresponding rule
    from the database row.
    from the database row.
 
 
-   Default value is "pr".
+   Default value is “pr�.
 
 
    Example 1.4. Set pr_col parameter
    Example 1.4. Set pr_col parameter
 ...
 ...
@@ -245,7 +245,7 @@ modparam("dialplan", "pr_col", "column_name")
 
 
    The column name used to store the type of matching of the rule.
    The column name used to store the type of matching of the rule.
 
 
-   Default value is "match_op".
+   Default value is “match_op�.
 
 
    Example 1.5. Set match_op_col parameter
    Example 1.5. Set match_op_col parameter
 ...
 ...
@@ -256,7 +256,7 @@ modparam("dialplan", "match_op_col", "column_name")
 
 
    The column name to store the rule match expression.
    The column name to store the rule match expression.
 
 
-   Default value is "match_exp".
+   Default value is “match_exp�.
 
 
    Example 1.6. Set match_exp_col parameter
    Example 1.6. Set match_exp_col parameter
 ...
 ...
@@ -268,7 +268,7 @@ modparam("dialplan", "match_exp_col", "column_name")
    The column name to store the length of a string matching the match
    The column name to store the length of a string matching the match
    expression.
    expression.
 
 
-   Default value is "match_len".
+   Default value is “match_len�.
 
 
    Example 1.7. Set pr_col parameter
    Example 1.7. Set pr_col parameter
 ...
 ...
@@ -279,7 +279,7 @@ modparam("dialplan", "match_len_col", "column_name")
 
 
    The column name to store the rule's substitution expression.
    The column name to store the rule's substitution expression.
 
 
-   Default value is "subst_exp".
+   Default value is “subst_exp�.
 
 
    Example 1.8. Set pr_col parameter
    Example 1.8. Set pr_col parameter
 ...
 ...
@@ -290,7 +290,7 @@ modparam("dialplan", "subst_exp_col", "column_name")
 
 
    The column name to store the rule's replacement expression.
    The column name to store the rule's replacement expression.
 
 
-   Default value is "repl_exp".
+   Default value is “repl_exp�.
 
 
    Example 1.9. Set repl_exp_col parameter
    Example 1.9. Set repl_exp_col parameter
 ...
 ...
@@ -302,7 +302,7 @@ modparam("dialplan", "repl_exp_col", "column_name")
    The column name to store the rule's attributes to be set to the
    The column name to store the rule's attributes to be set to the
    message.
    message.
 
 
-   Default value is "attrs".
+   Default value is “attrs�.
 
 
    Example 1.10. Set attrs_col parameter
    Example 1.10. Set attrs_col parameter
 ...
 ...
@@ -315,7 +315,7 @@ modparam("dialplan", "attrs_col", "column_name")
    (dp_translate() succeeds). This parameter can be an AVP or a SCRIPT
    (dp_translate() succeeds). This parameter can be an AVP or a SCRIPT
    VAR.
    VAR.
 
 
-   Default value is "NULL".
+   Default value is “NULL�.
 
 
    Example 1.11. Set attrs_pvar parameter
    Example 1.11. Set attrs_pvar parameter
 ...
 ...
@@ -326,7 +326,7 @@ modparam("dialplan", "attrs_pvar", "$avp(s:dest)")
 
 
    The number of rows to be fetched at once from database
    The number of rows to be fetched at once from database
 
 
-   Default value is "1000".
+   Default value is “1000�.
 
 
    Example 1.12. Set fetch_rows parameter
    Example 1.12. Set fetch_rows parameter
 ...
 ...
@@ -335,12 +335,14 @@ modparam("dialplan", "fetch_rows", 4000)
 
 
 6. Functions
 6. Functions
 
 
-   6.1. dp_translate(id, src[/dest])
+   6.1. dp_translate(id, [src[/dest]])
 
 
-6.1. dp_translate(id, src[/dest])
+6.1.  dp_translate(id, [src[/dest]])
 
 
    Will try to translate src into dest according to the translation rules
    Will try to translate src into dest according to the translation rules
-   with dialplan ID equal to id. If dest is missing, only matching and
+   with dialplan ID equal to id. If src/dest is missing the default
+   parameter “ruri.user/ruri.user� will be used, thus translating the
+   request uri user part. If only dest is missing, only matching and
    storing of matching rule's attributes is done.
    storing of matching rule's attributes is done.
 
 
    Returns 1, if translation succeeded, -1 in case of some error occurred,
    Returns 1, if translation succeeded, -1 in case of some error occurred,
@@ -354,9 +356,7 @@ modparam("dialplan", "fetch_rows", 4000)
             variable
             variable
           + script var - the dialplan id is the value of an existing
           + script var - the dialplan id is the value of an existing
             script variable.
             script variable.
-     * src/dest - input and output of the function. If this parameter is
-       missing the default parameter "ruri.user/ruri.user" will be used,
-       thus translating the request uri user part.
+     * src/dest - input and output of the function.
        Input parameter src can be any pseudo variable. Output parameter
        Input parameter src can be any pseudo variable. Output parameter
        dest can be:
        dest can be:
           + R-URI
           + R-URI

+ 6 - 6
modules/dialplan/doc/dialplan_admin.xml

@@ -358,13 +358,16 @@ modparam("dialplan", "fetch_rows", 4000)
 	
 	
 	<section>
 	<section>
 	<title>
 	<title>
-		<function moreinfo="none">dp_translate(id, src[/dest])</function>
+		<function moreinfo="none">dp_translate(id, [src[/dest]])</function>
 	</title>
 	</title>
 	<para>
 	<para>
 	Will try to translate src into dest according to 
 	Will try to translate src into dest according to 
-	the translation rules with dialplan ID equal to id.  If dest is
+	the translation rules with dialplan ID equal to id.  If src/dest is
+	missing the default parameter <quote>ruri.user/ruri.user</quote> will
+	be used, thus translating the request uri user part.  If only dest is
 	missing, only matching and storing of matching rule's
 	missing, only matching and storing of matching rule's
-	attributes is done.
+	attributes is done.	
+
 	</para>
 	</para>
 	<para>
 	<para>
 	  Returns 1, if translation succeeded, -1 in case of some error
 	  Returns 1, if translation succeeded, -1 in case of some error
@@ -399,9 +402,6 @@ modparam("dialplan", "fetch_rows", 4000)
 	<listitem>
 	<listitem>
 		<para>
 		<para>
  		<emphasis>src/dest</emphasis> - input and output of the function.
  		<emphasis>src/dest</emphasis> - input and output of the function.
-		If this parameter is missing the default parameter 
-		<quote>ruri.user/ruri.user</quote> will be used, thus
-		translating the request uri user part. 
  		</para>
  		</para>
 		<para>Input parameter src can be any pseudo variable.
 		<para>Input parameter src can be any pseudo variable.
 		Output parameter dest can be:
 		Output parameter dest can be: