69e687c5fa4a0d5c6c3bbe38c5e7af679027c97b
[sip-router] / modules / corex / doc / corex_admin.xml
1 <?xml version="1.0" encoding='ISO-8859-1'?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4
5 <!-- Include general documentation entities -->
6 <!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
7 %docentities;
8
9 ]>
10 <!-- Module User's Guide -->
11
12 <chapter>
13         
14         <title>&adminguide;</title>
15         
16         <section>
17         <title>Overview</title>
18         <para>
19                 This module provides reimplementation of very old functions that
20                 were in core and supported only static string or integer parameters.
21                 The new versions bring support for dynamic parameters (allowing
22                 variables inside the parameters).
23         </para>
24         <para>
25                 There are also brand new features, related to core internals, but
26                 controlled from configuration file or via control interfaces.
27         </para>
28         <para>
29                 Contributions to this module must be done under BSD license, to
30                 follow the requirements of the core contributions.
31         </para>
32         </section>
33
34         <section>
35         <title>Dependencies</title>
36         <section>
37                 <title>&kamailio; Modules</title>
38                 <para>
39                 The following modules must be loaded before this module:
40                         <itemizedlist>
41                         <listitem>
42                         <para>
43                                 <emphasis>None</emphasis>.
44                         </para>
45                         </listitem>
46                         </itemizedlist>
47                 </para>
48         </section>
49         <section>
50                 <title>External Libraries or Applications</title>
51                 <para>
52                 The following libraries or applications must be installed before running
53                 &kamailio; with this module loaded:
54                         <itemizedlist>
55                         <listitem>
56                         <para>
57                                 <emphasis>None</emphasis>
58                         </para>
59                         </listitem>
60                         </itemizedlist>
61                 </para>
62         </section>
63         </section>
64
65     <section>
66         <title>Parameters</title>
67         <section>
68             <title><varname>alias_subdomains</varname> (string)</title>
69             <para>
70                 Register a domain and all its sub-domains to match the myself
71                 condition. It can be set many times. Its full format is:
72                 'proto:domain:port', allowing to set restrictions on protocol
73                 and port as well. Protocol and port are optional.
74             </para>
75             <para>
76                 <emphasis>
77                     Default value is <quote>NULL</quote>.
78                 </emphasis>
79             </para>
80             <example>
81                 <title>Set <varname>alias_subdomains</varname> parameter</title>
82                 <programlisting format="linespecific">
83 ...
84 modparam("corex", "alias_subdomains", "kamailio.org")
85 modparam("corex", "alias_subdomains", "udp:sip-router.org:5060")
86 ...
87 </programlisting>
88             </example>
89         </section>
90         </section>
91
92         <section>
93         <title>Functions</title>
94         <section>
95             <title>
96                 <function moreinfo="none">append_branch([ uri, [ q ] ])</function>
97             </title>
98             <para>
99                         Append a new branch to the destination set, useful to build the
100                         addresses for parallel forking or redirect replies.
101                 </para>
102                 <para>
103                         Both parameters are optional, If no uri parameter is provided,
104                         then the address from request URI (r-uri) is taken to build the
105                         new branch.
106                 </para>
107                 <para>Meaning of the parameters is as follows:</para>
108                 <itemizedlist>
109                 <listitem>
110                         <para>
111                                 <emphasis>uri</emphasis> - SIP address of the branch to be
112                                 used as R-URI in the outgoing request.
113                         </para>
114                 </listitem>
115                 <listitem>
116                         <para>
117                                 <emphasis>q</emphasis> - the Q value to set the priority
118                                 of the branch based on Contact address specifications
119                         </para>
120                 </listitem>
121                 </itemizedlist>
122                 <para>
123                 This function can be used from REQUEST_ROUTE or FAILURE_ROUTE.
124                 </para>
125                 <example>
126                 <title><function>append_branch</function> usage</title>
127                 <programlisting format="linespecific">
128 ...
129     append_branch();
130     append_branch("$avp(uri)", "0.5");
131 ...
132 </programlisting>
133             </example>
134         </section>
135         </section>
136
137         <section>
138         <title>RPC Commands</title>
139         <section>
140                 <title>
141                 <function moreinfo="none">corex.list_sockets</function>
142                 </title>
143                 <para>
144                         Print the list of sockets the application is listening on.
145                 </para>
146                 <para>
147                 Example:
148                 </para>
149         <programlisting  format="linespecific">
150                 sercmd corex.list_sockets
151                 </programlisting>
152     </section>
153         <section>
154                 <title>
155                 <function moreinfo="none">corex.list_aliases</function>
156                 </title>
157                 <para>
158                         Print the list of hostname aliases used to match myself
159                         condition.
160                 </para>
161                 <para>
162                 Example:
163                 </para>
164         <programlisting  format="linespecific">
165                 sercmd corex.list_aliases
166                 </programlisting>
167     </section>
168     </section>
169 </chapter>
170