|
@@ -10,7 +10,7 @@ Juha Heinanen
|
|
|
|
|
|
<[email protected]>
|
|
<[email protected]>
|
|
|
|
|
|
- Copyright © 2002-2008 Juha Heinanen
|
|
|
|
|
|
+ Copyright © 2002-2008 Juha Heinanen
|
|
Revision History
|
|
Revision History
|
|
Revision $Revision$ $Date$
|
|
Revision $Revision$ $Date$
|
|
__________________________________________________________________
|
|
__________________________________________________________________
|
|
@@ -40,7 +40,12 @@ Juha Heinanen
|
|
5.1. domain_reload
|
|
5.1. domain_reload
|
|
5.2. domain_dump
|
|
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
|
|
2. Developer Guide
|
|
|
|
|
|
@@ -84,12 +89,17 @@ Chapter 1. Admin Guide
|
|
5.1. domain_reload
|
|
5.1. domain_reload
|
|
5.2. domain_dump
|
|
5.2. domain_dump
|
|
|
|
|
|
- 6. Known Limitations
|
|
|
|
|
|
+ 6. Exported RPC Commands
|
|
|
|
+
|
|
|
|
+ 6.1. domain.reload
|
|
|
|
+ 6.2. domain.dump
|
|
|
|
+
|
|
|
|
+ 7. Known Limitations
|
|
|
|
|
|
1. Overview
|
|
1. Overview
|
|
|
|
|
|
Domain module implements checks that based on domain table determine if
|
|
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.
|
|
the proxy is responsible for.
|
|
|
|
|
|
Domain module operates in caching or non-caching mode depending on
|
|
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
|
|
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
|
|
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
|
|
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
|
|
behavior. In non-caching mode domain module always queries domain table
|
|
in the database.
|
|
in the database.
|
|
|
|
|
|
Caching is implemented using a hash table. The size of the hash table
|
|
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
|
|
2. Dependencies
|
|
|
|
|
|
@@ -123,7 +133,7 @@ Chapter 1. Admin Guide
|
|
|
|
|
|
This is URL of the database to be used.
|
|
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
|
|
Example 1.1. Setting db_url parameter
|
|
modparam("domain", "db_url", "mysql://ser:pass@db_host/ser")
|
|
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
|
|
responsible for. Local users must have in their sip uri a host part
|
|
that is equal to one of these domains.
|
|
that is equal to one of these domains.
|
|
|
|
|
|
- Default value is "domain".
|
|
|
|
|
|
+ Default value is “domain�.
|
|
|
|
|
|
Example 1.3. Setting domain_table parameter
|
|
Example 1.3. Setting domain_table parameter
|
|
modparam("domain", "domain_table", "new_name")
|
|
modparam("domain", "domain_table", "new_name")
|
|
@@ -152,7 +162,7 @@ modparam("domain", "domain_table", "new_name")
|
|
|
|
|
|
Name of column containing domains in domain table.
|
|
Name of column containing domains in domain table.
|
|
|
|
|
|
- Default value is "domain".
|
|
|
|
|
|
+ Default value is “domain�.
|
|
|
|
|
|
Example 1.4. Setting domain_col parameter
|
|
Example 1.4. Setting domain_col parameter
|
|
modparam("domain", "domain_col", "domain_name")
|
|
modparam("domain", "domain_col", "domain_name")
|
|
@@ -270,7 +280,35 @@ if (is_domain_local("$avp(s:some_avp)")) {
|
|
:domain_dump:_reply_fifo_file_
|
|
:domain_dump:_reply_fifo_file_
|
|
_empty_line_
|
|
_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
|
|
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,
|
|
uses a table, which is reloaded at the same time twice through FIFO,
|