|
@@ -221,6 +221,11 @@ modparam("rtpengine", "rtpengine_tout_ms", 2000)
|
|
This is <emphasis>useful</emphasis> when deactivating a node for maintanance and reject new sessions but allow current ones to finish.
|
|
This is <emphasis>useful</emphasis> when deactivating a node for maintanance and reject new sessions but allow current ones to finish.
|
|
</para>
|
|
</para>
|
|
<para>
|
|
<para>
|
|
|
|
+ The behaviour is the same for a rtpengine deleted table node.
|
|
|
|
+ When the node is deleted from the table and the table reloaded (see nh_reload_rtpp) the node actually is disabled(permanent) and hidden for display.
|
|
|
|
+ Next time the same node will be added in the table, and the content reloaded, it will be updated and re-displayed.
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
<emphasis>
|
|
<emphasis>
|
|
Default value is <quote>0</quote> to keep the current behaviour.
|
|
Default value is <quote>0</quote> to keep the current behaviour.
|
|
</emphasis>
|
|
</emphasis>
|
|
@@ -294,7 +299,7 @@ modparam("rtpengine", "extra_id_pv", "$avp(extra_id)")
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
- <section id="rtpengine.p.setid_pv">
|
|
|
|
|
|
+ <section id="rtpengine.p.setid_avp">
|
|
<title><varname>setid_avp</varname> (string)</title>
|
|
<title><varname>setid_avp</varname> (string)</title>
|
|
<para>
|
|
<para>
|
|
The parameter defines an AVP that, if set,
|
|
The parameter defines an AVP that, if set,
|
|
@@ -453,13 +458,199 @@ modparam("rtpengine", "hash_table_size", "123")
|
|
...
|
|
...
|
|
modparam("rtpengine", "hash_table_tout", "300")
|
|
modparam("rtpengine", "hash_table_tout", "300")
|
|
...
|
|
...
|
|
|
|
+</programlisting>
|
|
|
|
+ </example>
|
|
|
|
+ </section>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <section id="rtpengine.p.db_url">
|
|
|
|
+ <title><varname>db_url</varname> (string)</title>
|
|
|
|
+ <para>
|
|
|
|
+ The rtpengine datablase url. If present and valid, it activates database mode.
|
|
|
|
+ Node information is read from database, not from config.
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
|
|
+ By default, the datablase url is NULL (not set).
|
|
|
|
+ </para>
|
|
|
|
+ <example>
|
|
|
|
+ <title>Set <varname>db_url</varname> parameter</title>
|
|
|
|
+<programlisting format="linespecific">
|
|
|
|
+...
|
|
|
|
+modparam("rtpengine", "db_url", "mysql://pass@localhost/db")
|
|
|
|
+...
|
|
|
|
+</programlisting>
|
|
|
|
+ </example>
|
|
|
|
+ </section>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <section id="rtpengine.p.table_name">
|
|
|
|
+ <title><varname>table_name</varname> (string)</title>
|
|
|
|
+ <para>
|
|
|
|
+ The rtpengine table name. If database mode is activated (i.e. valid db_url),
|
|
|
|
+ set the name of rtpengine table, on startup.
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
|
|
+ By default, the rtpengine table name is "rtpengine".
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
|
|
+ NOTE: One needs to add the version of the rtpengine table in the version table.
|
|
|
|
+ The current version is version 1.
|
|
|
|
+ </para>
|
|
|
|
+ <example>
|
|
|
|
+ <title>Set <varname>table_name</varname> parameter</title>
|
|
|
|
+<programlisting format="linespecific">
|
|
|
|
+...
|
|
|
|
+modparam("rtpengine", "table_name", "rtpengine_table_name")
|
|
|
|
+...
|
|
|
|
+</programlisting>
|
|
|
|
+ </example>
|
|
|
|
+
|
|
|
|
+ <example>
|
|
|
|
+ <title>Setup <varname>rtpengine</varname> table</title>
|
|
|
|
+<programlisting format="linespecific">
|
|
|
|
+mysql> describe rtpengine;
|
|
|
|
++----------+------------------+------+-----+---------+-------+
|
|
|
|
+| Field | Type | Null | Key | Default | Extra |
|
|
|
|
++----------+------------------+------+-----+---------+-------+
|
|
|
|
+| setid | int(10) unsigned | NO | | NULL | |
|
|
|
|
+| url | varchar(256) | NO | | NULL | |
|
|
|
|
+| weight | int(10) unsigned | NO | | NULL | |
|
|
|
|
+| disabled | int(11) | NO | | NULL | |
|
|
|
|
++----------+------------------+------+-----+---------+-------+
|
|
|
|
+
|
|
|
|
+mysql> select * from rtpengine;
|
|
|
|
++-------+---------------------------+--------+----------+
|
|
|
|
+| setid | url | weight | disabled |
|
|
|
|
++-------+---------------------------+--------+----------+
|
|
|
|
+| 0 | udp:rtpproxy1.domain:8800 | 100 | 0 |
|
|
|
|
+| 0 | udp:rtpproxy2.domain:8800 | 200 | 1 |
|
|
|
|
++-------+---------------------------+--------+----------+
|
|
|
|
+
|
|
|
|
+mysql> select * from version;
|
|
|
|
++---------------------------+---------------+
|
|
|
|
+| table_name | table_version |
|
|
|
|
++---------------------------+---------------+
|
|
|
|
+| rtpengine | 1 |
|
|
|
|
++---------------------------+---------------+
|
|
</programlisting>
|
|
</programlisting>
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
+ <section id="rtpengine.p.setid_col">
|
|
|
|
+ <title><varname>setid_col</varname> (string)</title>
|
|
|
|
+ <para>
|
|
|
|
+ Column name in the rtpengine table. If database mode is activated (i.e. valid db_url),
|
|
|
|
+ set the setid of rtp nodes according to this column, on startup.
|
|
|
|
+ The MySQL value for this column should be INT UNSIGNED.
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
|
|
+ By default, the column name is "setid".
|
|
|
|
+ </para>
|
|
|
|
+ <example>
|
|
|
|
+ <title>Set <varname>setid_col</varname> parameter</title>
|
|
|
|
+<programlisting format="linespecific">
|
|
|
|
+...
|
|
|
|
+modparam("rtpengine", "setid_col", "setid_column_name")
|
|
|
|
+...
|
|
|
|
+</programlisting>
|
|
|
|
+ </example>
|
|
|
|
+ </section>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <section id="rtpengine.p.url_col">
|
|
|
|
+ <title><varname>url_col</varname> (string)</title>
|
|
|
|
+ <para>
|
|
|
|
+ Column name in the rtpengine table. If database mode is activated (i.e. valid db_url),
|
|
|
|
+ set the url of rtp nodes according to this column, on startup.
|
|
|
|
+ The MySQL value for this column should be VARCHAR.
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
|
|
+ By default, the column name is "url".
|
|
|
|
+ </para>
|
|
|
|
+ <example>
|
|
|
|
+ <title>Set <varname>url_col</varname> parameter</title>
|
|
|
|
+<programlisting format="linespecific">
|
|
|
|
+...
|
|
|
|
+modparam("rtpengine", "url_col", "url_column_name")
|
|
|
|
+...
|
|
|
|
+</programlisting>
|
|
|
|
+ </example>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <section id="rtpengine.p.weight_col">
|
|
|
|
+ <title><varname>weight_col</varname> (string)</title>
|
|
|
|
+ <para>
|
|
|
|
+ Column name in the rtpengine table. If database mode is activated (i.e. valid db_url),
|
|
|
|
+ set the weight of rtp nodes according to this column, on startup. The column value has
|
|
|
|
+ priority over the URL weight.
|
|
|
|
+ The MySQL value for this column should be INT UNSIGNED.
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
|
|
+ By default, the column name is "weight".
|
|
|
|
+ </para>
|
|
|
|
+ <example>
|
|
|
|
+ <title>Set <varname>weight_col</varname> parameter</title>
|
|
|
|
+<programlisting format="linespecific">
|
|
|
|
+...
|
|
|
|
+modparam("rtpengine", "weight_col", "weight_column_name")
|
|
|
|
+...
|
|
|
|
+</programlisting>
|
|
|
|
+ </example>
|
|
|
|
+ </section>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <section id="rtpengine.p.disabled_col">
|
|
|
|
+ <title><varname>disabled_col</varname> (string)</title>
|
|
|
|
+ <para>
|
|
|
|
+ Column name in the rtpengine table. If database mode is activated (i.e. valid db_url),
|
|
|
|
+ set the state of rtp nodes according to this column, on startup.
|
|
|
|
+ The MySQL value for this column should be INT.
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
|
|
+ By default, the column name is "disabled".
|
|
|
|
+ </para>
|
|
|
|
+ <example>
|
|
|
|
+ <title>Set <varname>disabled_col</varname> parameter</title>
|
|
|
|
+<programlisting format="linespecific">
|
|
|
|
+...
|
|
|
|
+modparam("rtpengine", "disabled_col", "disabled_column_name")
|
|
|
|
+...
|
|
|
|
+</programlisting>
|
|
|
|
+ </example>
|
|
|
|
+ </section>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <section id="rtpengine.p.setid_default">
|
|
|
|
+ <title><varname>setid_default</varname> (string)</title>
|
|
|
|
+ <para>
|
|
|
|
+ The default set of nodes to be used.
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
|
|
+ By default, the setid is 0.
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
|
|
+ NOTE that if setid_avp is configured, this value will be ignored and
|
|
|
|
+ the active set will be chosen according to the setid_avp.
|
|
|
|
+ </para>
|
|
|
|
+ <example>
|
|
|
|
+ <title>Set <varname>setid_default</varname> parameter</title>
|
|
|
|
+<programlisting format="linespecific">
|
|
|
|
+...
|
|
|
|
+modparam("rtpengine", "setid_default", 11)
|
|
|
|
+...
|
|
|
|
+</programlisting>
|
|
|
|
+ </example>
|
|
|
|
+ </section>
|
|
|
|
+
|
|
|
|
+ </section>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
<section>
|
|
<section>
|
|
<title>Functions</title>
|
|
<title>Functions</title>
|
|
<section id="rtpengine.f.set_rtpengine_set">
|
|
<section id="rtpengine.f.set_rtpengine_set">
|
|
@@ -1067,6 +1258,30 @@ $ &ctltool; fifo nh_ping_rtpp all
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <section id="rtpengine.m.nh_reload_rtpp">
|
|
|
|
+ <title><function moreinfo="none">nh_reload_rtpp</function></title>
|
|
|
|
+ <para>
|
|
|
|
+ Reloads the database node table content <emphasis>if configured</emphasis>.
|
|
|
|
+ Returns specific message related to success, failure and no db_url configured.
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
|
|
+ NOTE: The current behaviour updates the nodes state or creates new ones or
|
|
|
|
+ hides old ones, based on the database content. If allow_op modparam is enabled,
|
|
|
|
+ the sessions are still allowed to finish for the hidden old nodes.
|
|
|
|
+ </para>
|
|
|
|
+ <example>
|
|
|
|
+ <title>
|
|
|
|
+ <function moreinfo="none">nh_reload_rtpp</function> usage</title>
|
|
|
|
+ <programlisting format="linespecific">
|
|
|
|
+...
|
|
|
|
+$ &ctltool; fifo nh_reload_rtpp
|
|
|
|
+...
|
|
|
|
+ </programlisting>
|
|
|
|
+ </example>
|
|
|
|
+ </section>
|
|
|
|
+
|
|
|
|
+
|
|
<section id="rtpengine.m.nh_show_hash_total">
|
|
<section id="rtpengine.m.nh_show_hash_total">
|
|
<title><function moreinfo="none">nh_show_hash_total</function></title>
|
|
<title><function moreinfo="none">nh_show_hash_total</function></title>
|
|
<para>
|
|
<para>
|