Browse Source

Merge pull request #450 from giavac/master

cfgt: second pass at documentation update
Victor Seva 9 năm trước cách đây
mục cha
commit
a2e3c04ac1
2 tập tin đã thay đổi với 66 bổ sung12 xóa
  1. 36 5
      modules/cfgt/README
  2. 30 7
      modules/cfgt/doc/cfgt_admin.xml

+ 36 - 5
modules/cfgt/README

@@ -29,6 +29,8 @@ Victor Seva
               3.2. mask (int)
               3.2. mask (int)
               3.3. callid_prefix (string)
               3.3. callid_prefix (string)
 
 
+        4. Usage
+
    List of Examples
    List of Examples
 
 
    1.1. Set cfgtrace parameter
    1.1. Set cfgtrace parameter
@@ -51,13 +53,15 @@ Chapter 1. Admin Guide
         3.2. mask (int)
         3.2. mask (int)
         3.3. callid_prefix (string)
         3.3. callid_prefix (string)
 
 
+   4. Usage
+
 1. Overview
 1. Overview
 
 
    This module provides a report of the way Kamailio SIP Server Platform
    This module provides a report of the way Kamailio SIP Server Platform
    configuration has been executed as part of a unit test for different
    configuration has been executed as part of a unit test for different
    SIP scenarios.
    SIP scenarios.
 
 
-   In order to identify defferent scenarios a prefix string should be used
+   In order to identify different scenarios a prefix string should be used
    inside the Call-ID header.
    inside the Call-ID header.
 
 
 2. Dependencies
 2. Dependencies
@@ -114,10 +118,10 @@ modparam("cfgt", "mask", 12)
 
 
 3.3. callid_prefix (string)
 3.3. callid_prefix (string)
 
 
-   Prefix used to indentify test scenario messages. Last char of the
-   string will be used as delimiter for the scenario ID. With parameter
-   set to “NGCP%” and Call-ID “NGCP%123%456” the scenario identified will
-   be “123”.
+   Prefix used to identify test scenario messages. Last char of the string
+   will be used as delimiter for the scenario ID. With parameter set to
+   “NGCP%” and Call-ID “NGCP%123%456” the scenario identified will be
+   “123”.
 
 
    Default value is “NGCP%” (using “%” as delimiter).
    Default value is “NGCP%” (using “%” as delimiter).
 
 
@@ -126,3 +130,30 @@ modparam("cfgt", "mask", 12)
 # using '%' as delimiter
 # using '%' as delimiter
 modparam("cfgt", "callid_prefix", "TEST-ID%")
 modparam("cfgt", "callid_prefix", "TEST-ID%")
 ...
 ...
+
+4. Usage
+
+   This module is used by the debugger module, so it must be loaded first.
+   To enable the generation of the reports, the debugger module must be
+   configured by setting the cfgtest parameter to "1".
+
+   Example of configuration:
+...
+#!ifdef WITH_DEBUG
+loadmodule "cfgt.so"
+loadmodule "debugger.so"
+#!endif
+...
+#!ifdef WITH_DEBUG
+# ----- cfgt params -----
+modparam("cfgt", "basedir", "/tmp/kamailio/cfgtest")
+modparam("cfgt", "callid_prefix", "TRACE-ID%")
+modparam("cfgt", "mask", 32)
+
+# ----- debugger params -----
+modparam("debugger", "cfgtrace", 1)
+modparam("debugger", "log_level_name", "exec")
+
+modparam("debugger", "cfgtest", 1)
+#!endif
+...

+ 30 - 7
modules/cfgt/doc/cfgt_admin.xml

@@ -22,7 +22,7 @@
 		SIP scenarios.
 		SIP scenarios.
 	</para>
 	</para>
 	<para>
 	<para>
-		In order to identify defferent scenarios a prefix string should be
+		In order to identify different scenarios a prefix string should be
 		used inside the Call-ID header.
 		used inside the Call-ID header.
 	</para>
 	</para>
 	</section>
 	</section>
@@ -125,7 +125,7 @@ modparam("cfgt", "mask", 12)
 	<section id="cfgt.p.callid_prefix">
 	<section id="cfgt.p.callid_prefix">
 		<title><varname>callid_prefix</varname> (string)</title>
 		<title><varname>callid_prefix</varname> (string)</title>
 		<para>
 		<para>
-			Prefix used to indentify test scenario messages. Last char of the
+			Prefix used to identify test scenario messages. Last char of the
 			string will be used as delimiter for the scenario ID. With parameter
 			string will be used as delimiter for the scenario ID. With parameter
 			set to <quote>NGCP%</quote> and Call-ID <quote>NGCP%123%456</quote> 
 			set to <quote>NGCP%</quote> and Call-ID <quote>NGCP%123%456</quote> 
 			the scenario identified will be <quote>123</quote>.
 			the scenario identified will be <quote>123</quote>.
@@ -148,13 +148,36 @@ modparam("cfgt", "callid_prefix", "TEST-ID%")
 	</section>
 	</section>
 
 
 	</section>
 	</section>
-
-<!--
 	<section>
 	<section>
 		<title>Usage</title>
 		<title>Usage</title>
 		<para>
 		<para>
-			TODO: add some more info of how this is been used
+		This module is used by the <emphasis>debugger</emphasis> module, so it must be loaded
+		first. To enable the generation of the reports, the <emphasis>debugger</emphasis> module
+		must be configured by setting the <emphasis>cfgtest</emphasis> parameter to "1".
 		</para>
 		</para>
-	</section>
--->
+		<para>
+		Example of configuration:
+		</para>
+<programlisting  format="linespecific">
+...
+#!ifdef WITH_DEBUG
+loadmodule "cfgt.so"
+loadmodule "debugger.so"
+#!endif
+...
+#!ifdef WITH_DEBUG
+# ----- cfgt params -----
+modparam("cfgt", "basedir", "/tmp/kamailio/cfgtest")
+modparam("cfgt", "callid_prefix", "TRACE-ID%")
+modparam("cfgt", "mask", 32)
+
+# ----- debugger params -----
+modparam("debugger", "cfgtrace", 1)
+modparam("debugger", "log_level_name", "exec")
+
+modparam("debugger", "cfgtest", 1)
+#!endif
+...
+</programlisting>
+    </section>
 </chapter>
 </chapter>