Module: sip-router Branch: master Commit: d59a7f567b6f8f5c18215c15ee969cab42649710 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d59a7f56...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Sat Apr 16 23:05:07 2011 +0200
domain(k): readme updated with rpc commands
---
modules_k/domain/README | 60 +++++++++++++++++++++++++++------ modules_k/domain/doc/domain_admin.xml | 37 ++++++++++++++++++++ 2 files changed, 86 insertions(+), 11 deletions(-)
diff --git a/modules_k/domain/README b/modules_k/domain/README index 1ba35a6..48b125d 100644 --- a/modules_k/domain/README +++ b/modules_k/domain/README @@ -10,7 +10,7 @@ Juha Heinanen
- Copyright � 2002-2008 Juha Heinanen + Copyright © 2002-2008 Juha Heinanen Revision History Revision $Revision$ $Date$ __________________________________________________________________ @@ -40,7 +40,12 @@ Juha Heinanen 5.1. domain_reload 5.2. domain_dump
- 6. Known Limitations + 6. Exported RPC Commands + + 6.1. domain.reload + 6.2. domain.dump + + 7. Known Limitations
2. Developer Guide
@@ -84,12 +89,17 @@ Chapter 1. Admin Guide 5.1. domain_reload 5.2. domain_dump
- 6. Known Limitations + 6. Exported RPC Commands + + 6.1. domain.reload + 6.2. domain.dump + + 7. Known Limitations
1. Overview
Domain module implements checks that based on domain table determine if - a host part of an URI is "local" or not. A "local" domain is one that + a host part of an URI is “local” or not. A “local” domain is one that the proxy is responsible for.
Domain module operates in caching or non-caching mode depending on @@ -97,13 +107,13 @@ Chapter 1. Admin Guide the contents of domain table into cache memory when the module is loaded. After that domain table is re-read only when module is given domain_reload fifo command. Any changes in domain table must thus be - followed by "domain_reload" command in order to reflect them in module + followed by “domain_reload” command in order to reflect them in module behavior. In non-caching mode domain module always queries domain table in the database.
Caching is implemented using a hash table. The size of the hash table - is given by HASH_SIZE constant defined in domain_mod.h. Its "factory - default" value is 128. + is given by HASH_SIZE constant defined in domain_mod.h. Its “factory + default” value is 128.
2. Dependencies
@@ -123,7 +133,7 @@ Chapter 1. Admin Guide
This is URL of the database to be used.
- Default value is "mysql://openserro:openserro@localhost/openser" + Default value is “mysql://openserro:openserro@localhost/openser”
Example 1.1. Setting db_url parameter modparam("domain", "db_url", "mysql://ser:pass@db_host/ser") @@ -143,7 +153,7 @@ modparam("domain", "db_mode", 1) # Use caching responsible for. Local users must have in their sip uri a host part that is equal to one of these domains.
- Default value is "domain". + Default value is “domain”.
Example 1.3. Setting domain_table parameter modparam("domain", "domain_table", "new_name") @@ -152,7 +162,7 @@ modparam("domain", "domain_table", "new_name")
Name of column containing domains in domain table.
- Default value is "domain". + Default value is “domain”.
Example 1.4. Setting domain_col parameter modparam("domain", "domain_col", "domain_name") @@ -270,7 +280,35 @@ if (is_domain_local("$avp(s:some_avp)")) { :domain_dump:_reply_fifo_file_ _empty_line_
-6. Known Limitations +6. Exported RPC Commands + + 6.1. domain.reload + 6.2. domain.dump + +6.1. domain.reload + + Causes domain module to re-read the contents of domain table into cache + memory. + + Name: domain.reload + + Parameters: none + + Example: + sercmd domain.reload + +6.2. domain.dump + + Causes domain module to dump domain names in its cache memory. + + Name: domain.dump + + Parameters: none + + Example: + sercmd domain.dump + +7. Known Limitations
There is an unlikely race condition on domain list update. If a process uses a table, which is reloaded at the same time twice through FIFO, diff --git a/modules_k/domain/doc/domain_admin.xml b/modules_k/domain/doc/domain_admin.xml index 9961dea..51be940 100644 --- a/modules_k/domain/doc/domain_admin.xml +++ b/modules_k/domain/doc/domain_admin.xml @@ -275,6 +275,43 @@ if (is_domain_local("$avp(s:some_avp)")) { </section> </section> <section> + <title>Exported RPC Commands</title> + <section> + <title><function moreinfo="none">domain.reload</function></title> + <para> + Causes domain module to re-read the contents of domain table + into cache memory. + </para> + <para> + Name: <emphasis>domain.reload</emphasis> + </para> + <para>Parameters: <emphasis>none</emphasis></para> + <para> + Example: + </para> + <programlisting format="linespecific"> + sercmd domain.reload + </programlisting> + </section> + <section> + <title><function moreinfo="none">domain.dump</function></title> + <para> + Causes domain module to dump domain names in + its cache memory. + </para> + <para> + Name: <emphasis>domain.dump</emphasis> + </para> + <para>Parameters: <emphasis>none</emphasis></para> + <para> + Example: + </para> + <programlisting format="linespecific"> + sercmd domain.dump + </programlisting> + </section> + </section> + <section> <title>Known Limitations</title> <para> There is an unlikely race condition on domain list update. If a