Преглед на файлове

app_python: added skeleton for docs

- needs to be filled in
Daniel-Constantin Mierla преди 15 години
родител
ревизия
bd93ff3ab2
променени са 4 файла, в които са добавени 283 реда и са изтрити 0 реда
  1. 104 0
      modules/app_python/README
  2. 4 0
      modules/app_python/doc/Makefile
  3. 34 0
      modules/app_python/doc/app_python.xml
  4. 141 0
      modules/app_python/doc/app_python_admin.xml

+ 104 - 0
modules/app_python/README

@@ -0,0 +1,104 @@
+app_python Module
+
+Maxim Sobolev
+
+Edited by
+
+Maxim Sobolev
+
+   Copyright © 2010 Maxim Sobolev
+     __________________________________________________________________
+
+   Table of Contents
+
+   1. Admin Guide
+
+        1.1. Overview
+        1.2. Dependencies
+
+              1.2.1. Kamailio Modules
+              1.2.2. External Libraries or Applications
+
+        1.3. Exported Parameters
+
+              1.3.1. script_name (string)
+              1.3.2. mod_init_function (string)
+              1.3.3. child_init_method (string)
+
+        1.4. Exported Functions
+
+              1.4.1. python_exec(method [, mystr])
+
+   List of Examples
+
+   1.1. Set script_name parameter
+   1.2. Set mod_init_function parameter
+   1.3. Set child_init_method parameter
+   1.4. python_exec usage
+
+Chapter 1. Admin Guide
+
+1.1. Overview
+
+   This module allows executing Python scripts from config file, exporting
+   functions to access the SIP message from Python.
+
+1.2. Dependencies
+
+1.2.1. Kamailio Modules
+
+   The following modules must be loaded before this module:
+     * none.
+
+1.2.2. External Libraries or Applications
+
+   The following libraries or applications must be installed before
+   running Kamailio with this module loaded:
+     * python-dev - Python devel library.
+
+1.3. Exported Parameters
+
+1.3.1. script_name (string)
+
+   TBD.
+
+   Default value is "/usr/local/etc/sip-router/handler.py".
+
+   Example 1.1. Set script_name parameter
+...
+modparam("app_python", "script_name", "/usr/local/etc/sip-router/myscript.py")
+...
+
+1.3.2. mod_init_function (string)
+
+   TBD.
+
+   Default value is "mod_init".
+
+   Example 1.2. Set mod_init_function parameter
+...
+modparam("app_python", "mod_init_function", "my_mod_init")
+...
+
+1.3.3. child_init_method (string)
+
+   TBD.
+
+   Default value is "child_init".
+
+   Example 1.3. Set child_init_method parameter
+...
+modparam("app_python", "child_init_method", "my_child_init")
+...
+
+1.4. Exported Functions
+
+1.4.1. python_exec(method [, mystr])
+
+   TBD.
+
+   Example 1.4. python_exec usage
+...
+python_exec("...");
+python_exec("...", "...");
+...

+ 4 - 0
modules/app_python/doc/Makefile

@@ -0,0 +1,4 @@
+docs = app_python.xml
+
+docbook_dir = ../../../docbook
+include $(docbook_dir)/Makefile.module

+ 34 - 0
modules/app_python/doc/app_python.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+
+<!-- Include general documentation entities -->
+<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
+%docentities;
+
+]>
+
+<book xmlns:xi="http://www.w3.org/2001/XInclude">
+    <bookinfo>
+	<title>app_python Module</title>
+	<productname class="trade">&kamailioname;</productname>
+	<authorgroup>
+	    <author>
+		<firstname>Maxim</firstname>
+		<surname>Sobolev</surname>
+	    </author>
+	    <editor>
+		<firstname>Maxim</firstname>
+		<surname>Sobolev</surname>
+	    </editor>
+	</authorgroup>
+	<copyright>
+	    <year>2010</year>
+	    <holder>Maxim Sobolev</holder>
+	</copyright>
+    </bookinfo>
+    <toc></toc>
+    
+	<xi:include href="app_python_admin.xml"/>
+    
+</book>

+ 141 - 0
modules/app_python/doc/app_python_admin.xml

@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+
+<!-- Include general documentation entities -->
+<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
+%docentities;
+
+]>
+
+<!-- Module User's Guide -->
+
+<chapter>
+    
+    <title>&adminguide;</title>
+    
+    <section>
+	<title>Overview</title>
+	<para>
+		This module allows executing Python scripts from config file,
+		exporting functions to access the SIP message from Python.
+	</para>
+    </section>
+    <section>
+	<title>Dependencies</title>
+	<section>
+	    <title>&kamailio; Modules</title>
+	    <para>
+		The following modules must be loaded before this module:
+	    	<itemizedlist>
+		    <listitem>
+			<para>
+			    <emphasis>none</emphasis>.
+			</para>
+		    </listitem>
+	    	</itemizedlist>
+	    </para>
+	</section>
+	<section>
+	    <title>External Libraries or Applications</title>
+	    <para>
+		The following libraries or applications must be installed before running
+		&kamailio; with this module loaded:
+	    	<itemizedlist>
+		    <listitem>
+			<para>
+			    <emphasis>python-dev</emphasis> - Python devel library.
+			</para>
+		    </listitem>
+	    	</itemizedlist>
+	    </para>
+	</section>
+    </section>
+    <section>
+	<title>Exported Parameters</title>
+	<section>
+	    <title><varname>script_name</varname> (string)</title>
+	    <para>
+			TBD.
+	    </para>
+	    <para>
+		<emphasis>
+		    Default value is <quote>/usr/local/etc/sip-router/handler.py</quote>.
+		</emphasis>
+	    </para>
+	    <example>
+		<title>Set <varname>script_name</varname> parameter</title>
+		<programlisting format="linespecific">
+...
+modparam("app_python", "script_name", "/usr/local/etc/sip-router/myscript.py")
+...
+</programlisting>
+	    </example>
+	</section>
+
+	<section>
+	    <title><varname>mod_init_function</varname> (string)</title>
+	    <para>
+			TBD.
+	    </para>
+	    <para>
+		<emphasis>
+		    Default value is <quote>mod_init</quote>.
+		</emphasis>
+	    </para>
+	    <example>
+		<title>Set <varname>mod_init_function</varname> parameter</title>
+		<programlisting format="linespecific">
+...
+modparam("app_python", "mod_init_function", "my_mod_init")
+...
+</programlisting>
+	    </example>
+	</section>
+
+	<section>
+	    <title><varname>child_init_method</varname> (string)</title>
+	    <para>
+			TBD.
+	    </para>
+	    <para>
+		<emphasis>
+		    Default value is <quote>child_init</quote>.
+		</emphasis>
+	    </para>
+	    <example>
+		<title>Set <varname>child_init_method</varname> parameter</title>
+		<programlisting format="linespecific">
+...
+modparam("app_python", "child_init_method", "my_child_init")
+...
+</programlisting>
+	    </example>
+	</section>
+
+	</section>
+	
+    <section>
+	<title>Exported Functions</title>
+ 	<section>
+	    <title>
+		<function moreinfo="none">python_exec(method [, mystr])</function>
+	    </title>
+	    <para>
+		TBD.
+	    </para>
+		<example>
+		<title><function>python_exec</function> usage</title>
+		<programlisting format="linespecific">
+...
+python_exec("...");
+python_exec("...", "...");
+...
+</programlisting>
+	    </example>
+	</section>
+	
+    </section>
+	
+</chapter>
+