cpl-c_user.sgml
来自「性能优秀的SIP Proxy」· SGML 代码 · 共 627 行 · 第 1/2 页
SGML
627 行
<!-- Module User's Guide --><chapter> <chapterinfo> <revhistory> <revision> <revnumber>$Revision: 1.6 $</revnumber> <date>$Date: 2006/02/09 17:28:25 $</date> </revision> </revhistory> </chapterinfo> <title>User's Guide</title> <section> <title>Overview</title> <para>cpl-c modules implements a CPL (Call Processing Language) interpreter. Support for uploading/downloading/removing scripts via SIP REGISTER method is present. </para> </section> <section> <title>Dependencies</title> <section> <title>&ser; Modules</title> <para> The following modules must be loaded before this module: <itemizedlist> <listitem> <para> <emphasis>TM (Transaction) module- used for proxying/forking requests </emphasis> </para> </listitem> <listitem> <para> <emphasis>SL (StateLess) module - used for sending stateless reply when responding to REGISTER request or for sending back error responses </emphasis> </para> </listitem> <listitem> <para> <emphasis>USRLOC (User Location) module - used for implementing lookup("registration") tag (adding into location set of the users' contact) </emphasis> </para> </listitem> </itemizedlist> </para> </section> <section> <title>External Libraries or Applications</title> <para> The following libraries or applications must be installed before running &ser; with this module loaded: <itemizedlist> <listitem> <para> <emphasis>libxml2 and libxml2-devel - on some SO, these to packages are merged into libxml2. This library contains an engine for XML parsing, DTD validation and DOM manipulation. </emphasis> </para> </listitem> </itemizedlist> </para> </section> </section> <section> <title>Exported Parameters</title> <section> <title><varname>db_url</varname> (string)</title> <para> A SQL URL have to be given to the module for knowing where the database containing the table with CPL scripts is locates. If required a user name and password can be specified for allowing the module to connect to the database server. </para> <para> <emphasis> This parameter is MANDATORY! </emphasis> </para> <example> <title>Set <varname>db_url</varname> parameter</title> <programlisting format="linespecific">...modparam("cpl_c","db_url","mysql://user:passwd@host/database")...</programlisting> </example> </section> <section> <title><varname>cpl_table</varname> (string)</title> <para> Indicates the name of the table that store the CPL scripts. This table must be locate into the database specified by "cpl_db" parameter. For more about the format of the CPL table please see modules/cpl-c/init.mysql. </para> <para> <emphasis> This parameter is MANDATORY! </emphasis> </para> <example> <title>Set <varname>cpl_table</varname> parameter</title> <programlisting format="linespecific">...modparam("cpl_c","cpl_table","cpltable")...</programlisting> </example> </section> <section> <title><varname>username_column</varname> (string)</title> <para> Indicates the name of the column used for storing the username. </para> <para> <emphasis> Default value is <quote>username</quote>. </emphasis> </para> <example> <title>Set <varname>username_column</varname> parameter</title> <programlisting format="linespecific">...modparam("cpl_c","username_column","username")...</programlisting> </example> </section> <section> <title><varname>domain_column</varname> (string)</title> <para> Indicates the name of the column used for storing the domain. </para> <para> <emphasis> Default value is <quote>domain</quote>. </emphasis> </para> <example> <title>Set <varname>domain_column</varname> parameter</title> <programlisting format="linespecific">...modparam("cpl_c","domain_column","domain")...</programlisting> </example> </section> <section> <title><varname>cpl_xml_column</varname> (string)</title> <para> Indicates the name of the column used for storing the the XML version of the cpl script. </para> <para> <emphasis> Default value is <quote>cpl_xml</quote>. </emphasis> </para> <example> <title>Set <varname>cpl_xml_column</varname> parameter</title> <programlisting format="linespecific">...modparam("cpl_c","cpl_xml_column","cpl_xml")...</programlisting> </example> </section> <section> <title><varname>cpl_bin_column</varname> (string)</title> <para> Indicates the name of the column used for storing the the binary version of the cpl script (compiled version). </para> <para> <emphasis> Default value is <quote>cpl_bin</quote>. </emphasis> </para> <example> <title>Set <varname>cpl_bin_column</varname> parameter</title> <programlisting format="linespecific">...modparam("cpl_c","cpl_bin_column","cpl_bin")...</programlisting> </example> </section> <section> <title><varname>cpl_dtd_file</varname> (string)</title> <para> Points to the DTD file describing the CPL grammar. The file name may include also the path to the file. This path can be absolute or relative (be careful the the path will be relative to the starting directory of &ser;). </para> <para> <emphasis> This parameter is MANDATORY! </emphasis> </para> <example> <title>Set <varname>cpl_dtd_file</varname> parameter</title> <programlisting format="linespecific">...modparam("cpl_c","cpl_dtd_file","/etc/openser/cpl-06.dtd")...</programlisting> </example> </section> <section> <title><varname>log_dir</varname> (string)</title> <para> Points to a directory where should be created all the log file generated by the LOG CPL node. A log file per user will be created (on demand) having the name username.log. </para> <para> <emphasis> If this parameter is absent, the logging will be disabled without generating error on execution. </emphasis> </para> <example> <title>Set <varname>log_dir</varname> parameter</title> <programlisting format="linespecific">...modparam("cpl_c","log_dir","/var/log/openser/cpl")...</programlisting> </example> </section> <section> <title><varname>proxy_recurse</varname> (int)</title> <para> Tells for how many time is allow to have recurse for PROXY CPL node If it has value 2, when doing proxy, only twice the proxy action will be re-triggered by a redirect response; the third time, the proxy execution will end by going on REDIRECTION branch. The recurse feature can be disable by setting this parameter to 0 </para> <para> <emphasis> Default value of this parameter is 0. </emphasis> </para> <example> <title>Set <varname>proxy_recurse</varname> parameter</title> <programlisting format="linespecific">...modparam("cpl_c","proxy_recurse",2)...</programlisting> </example> </section> <section> <title><varname>proxy_route</varname> (int)</title> <para> Before doing proxy (forward), a script route can be executed. All modifications made by that route will be reflected only for the current branch. </para> <para> <emphasis> Default value of this parameter is 0 (none). </emphasis> </para> <example> <title>Set <varname>proxy_route</varname> parameter</title> <programlisting format="linespecific">...modparam("cpl_c","proxy_route",1)...</programlisting> </example> </section> <section> <title><varname>case_sensitive</varname> (int)</title> <para> Tells if the username matching should be perform case sensitive or not. Set it to a non zero value to force a case sensitive handling of usernames. </para> <para> <emphasis> Default value of this parameter is 0. </emphasis> </para> <example> <title>Set <varname>case_sensitive</varname> parameter</title> <programlisting format="linespecific">...modparam("cpl_c","case_sensitive",1)...</programlisting> </example> </section> <section> <title><varname>realm_prefix</varname> (string)</title> <para> Defines a prefix for the domain part which should be ignored in handling users and scripts.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?