|
@@ -43,9 +43,10 @@ Olle E. Johansson
|
|
4. Parameters
|
|
4. Parameters
|
|
|
|
|
|
4.1. db_mode (integer)
|
|
4.1. db_mode (integer)
|
|
- 4.2. default_connection (string)
|
|
|
|
- 4.3. emptystring (integer)
|
|
|
|
- 4.4. file_buffer_size (integer)
|
|
|
|
|
|
+ 4.2. db_delim (string)
|
|
|
|
+ 4.3. default_connection (string)
|
|
|
|
+ 4.4. emptystring (integer)
|
|
|
|
+ 4.5. file_buffer_size (integer)
|
|
|
|
|
|
5. Exported RPC Functions
|
|
5. Exported RPC Functions
|
|
|
|
|
|
@@ -64,14 +65,15 @@ Olle E. Johansson
|
|
1.2. Minimal Kamailio location dbtext table definition
|
|
1.2. Minimal Kamailio location dbtext table definition
|
|
1.3. Minimal Kamailio subscriber dbtext table example
|
|
1.3. Minimal Kamailio subscriber dbtext table example
|
|
1.4. Set db_mode parameter
|
|
1.4. Set db_mode parameter
|
|
- 1.5. Set default_connection parameter
|
|
|
|
- 1.6. Set emptystring parameter
|
|
|
|
- 1.7. Set file_buffer_size parameter
|
|
|
|
- 1.8. Load the dbtext module
|
|
|
|
- 1.9. Definition of 'subscriber' table (one line)
|
|
|
|
- 1.10. Definition of 'location' and 'aliases' tables (one line)
|
|
|
|
- 1.11. Definition of 'version' table and sample records
|
|
|
|
- 1.12. Configuration file
|
|
|
|
|
|
+ 1.5. Set db_mode parameter
|
|
|
|
+ 1.6. Set default_connection parameter
|
|
|
|
+ 1.7. Set emptystring parameter
|
|
|
|
+ 1.8. Set file_buffer_size parameter
|
|
|
|
+ 1.9. Load the dbtext module
|
|
|
|
+ 1.10. Definition of 'subscriber' table (one line)
|
|
|
|
+ 1.11. Definition of 'location' and 'aliases' tables (one line)
|
|
|
|
+ 1.12. Definition of 'version' table and sample records
|
|
|
|
+ 1.13. Configuration file
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
Chapter 1. Admin Guide
|
|
|
|
|
|
@@ -91,9 +93,10 @@ Chapter 1. Admin Guide
|
|
4. Parameters
|
|
4. Parameters
|
|
|
|
|
|
4.1. db_mode (integer)
|
|
4.1. db_mode (integer)
|
|
- 4.2. default_connection (string)
|
|
|
|
- 4.3. emptystring (integer)
|
|
|
|
- 4.4. file_buffer_size (integer)
|
|
|
|
|
|
+ 4.2. db_delim (string)
|
|
|
|
+ 4.3. default_connection (string)
|
|
|
|
+ 4.4. emptystring (integer)
|
|
|
|
+ 4.5. file_buffer_size (integer)
|
|
|
|
|
|
5. Exported RPC Functions
|
|
5. Exported RPC Functions
|
|
|
|
|
|
@@ -217,9 +220,10 @@ suser:supasswd:xxx:alpha.org:xxx
|
|
4. Parameters
|
|
4. Parameters
|
|
|
|
|
|
4.1. db_mode (integer)
|
|
4.1. db_mode (integer)
|
|
- 4.2. default_connection (string)
|
|
|
|
- 4.3. emptystring (integer)
|
|
|
|
- 4.4. file_buffer_size (integer)
|
|
|
|
|
|
+ 4.2. db_delim (string)
|
|
|
|
+ 4.3. default_connection (string)
|
|
|
|
+ 4.4. emptystring (integer)
|
|
|
|
+ 4.5. file_buffer_size (integer)
|
|
|
|
|
|
4.1. db_mode (integer)
|
|
4.1. db_mode (integer)
|
|
|
|
|
|
@@ -235,19 +239,30 @@ suser:supasswd:xxx:alpha.org:xxx
|
|
modparam("db_text", "db_mode", 1)
|
|
modparam("db_text", "db_mode", 1)
|
|
...
|
|
...
|
|
|
|
|
|
-4.2. default_connection (string)
|
|
|
|
|
|
+4.2. db_delim (string)
|
|
|
|
+
|
|
|
|
+ Set the delimiter inside the db_text file.
|
|
|
|
+
|
|
|
|
+ Default value is “:”.
|
|
|
|
+
|
|
|
|
+ Example 1.5. Set db_mode parameter
|
|
|
|
+...
|
|
|
|
+modparam("db_text", "db_delim", "|")
|
|
|
|
+...
|
|
|
|
+
|
|
|
|
+4.3. default_connection (string)
|
|
|
|
|
|
connection for use with rpc query command.
|
|
connection for use with rpc query command.
|
|
|
|
|
|
Default value is “none” (off).
|
|
Default value is “none” (off).
|
|
|
|
|
|
- Example 1.5. Set default_connection parameter
|
|
|
|
|
|
+ Example 1.6. Set default_connection parameter
|
|
...
|
|
...
|
|
modparam("db_text", "default_connection", "text:///var/db/ka
|
|
modparam("db_text", "default_connection", "text:///var/db/ka
|
|
mailio/dbtext")
|
|
mailio/dbtext")
|
|
...
|
|
...
|
|
|
|
|
|
-4.3. emptystring (integer)
|
|
|
|
|
|
+4.4. emptystring (integer)
|
|
|
|
|
|
db_text by default handles an empty string as a NULL value. Some
|
|
db_text by default handles an empty string as a NULL value. Some
|
|
modules, like the dialplan module, does not accept NULL strings. If you
|
|
modules, like the dialplan module, does not accept NULL strings. If you
|
|
@@ -256,19 +271,19 @@ mailio/dbtext")
|
|
|
|
|
|
Default value is “0” (off).
|
|
Default value is “0” (off).
|
|
|
|
|
|
- Example 1.6. Set emptystring parameter
|
|
|
|
|
|
+ Example 1.7. Set emptystring parameter
|
|
...
|
|
...
|
|
modparam("db_text", "emptystring", 1)
|
|
modparam("db_text", "emptystring", 1)
|
|
...
|
|
...
|
|
|
|
|
|
-4.4. file_buffer_size (integer)
|
|
|
|
|
|
+4.5. file_buffer_size (integer)
|
|
|
|
|
|
size of the buffer used to read the text file. Some presence tables
|
|
size of the buffer used to read the text file. Some presence tables
|
|
have columns with large content.
|
|
have columns with large content.
|
|
|
|
|
|
Default value is “16384” (off).
|
|
Default value is “16384” (off).
|
|
|
|
|
|
- Example 1.7. Set file_buffer_size parameter
|
|
|
|
|
|
+ Example 1.8. Set file_buffer_size parameter
|
|
...
|
|
...
|
|
modparam("db_text", "file_buffer_size", 8192)
|
|
modparam("db_text", "file_buffer_size", 8192)
|
|
...
|
|
...
|
|
@@ -313,7 +328,7 @@ modparam("db_text", "file_buffer_size", 8192)
|
|
database path. So, either you provide an absolute path to database
|
|
database path. So, either you provide an absolute path to database
|
|
directory or a relative one to “CFG_DIR” directory.
|
|
directory or a relative one to “CFG_DIR” directory.
|
|
|
|
|
|
- Example 1.8. Load the dbtext module
|
|
|
|
|
|
+ Example 1.9. Load the dbtext module
|
|
...
|
|
...
|
|
loadmodule "/path/to/kamailio/modules_k/db_text.so"
|
|
loadmodule "/path/to/kamailio/modules_k/db_text.so"
|
|
...
|
|
...
|
|
@@ -332,7 +347,7 @@ modparam("module_name", "db_url", "text:///path/to/dbtext/database")
|
|
in order to have authentication. To use with the given configuration
|
|
in order to have authentication. To use with the given configuration
|
|
file, the table files must be placed in the '/tmp/serdb' directory.
|
|
file, the table files must be placed in the '/tmp/serdb' directory.
|
|
|
|
|
|
- Example 1.9. Definition of 'subscriber' table (one line)
|
|
|
|
|
|
+ Example 1.10. Definition of 'subscriber' table (one line)
|
|
...
|
|
...
|
|
username(str) domain(str) password(str) first_name(str) last_name(str) phone(str
|
|
username(str) domain(str) password(str) first_name(str) last_name(str) phone(str
|
|
) email_address(str) datetime_created(int) datetime_modified(int) confirmation(s
|
|
) email_address(str) datetime_created(int) datetime_modified(int) confirmation(s
|
|
@@ -340,14 +355,14 @@ tr) flag(str) sendnotification(str) greeting(str) ha1(str) ha1b(str) perms(str)
|
|
allow_find(str) timezone(str,null) rpid(str,null)
|
|
allow_find(str) timezone(str,null) rpid(str,null)
|
|
...
|
|
...
|
|
|
|
|
|
- Example 1.10. Definition of 'location' and 'aliases' tables (one line)
|
|
|
|
|
|
+ Example 1.11. Definition of 'location' and 'aliases' tables (one line)
|
|
...
|
|
...
|
|
username(str) domain(str,null) contact(str,null) received(str) expires(int,null)
|
|
username(str) domain(str,null) contact(str,null) received(str) expires(int,null)
|
|
q(double,null) callid(str,null) cseq(int,null) last_modified(str) flags(int) us
|
|
q(double,null) callid(str,null) cseq(int,null) last_modified(str) flags(int) us
|
|
er_agent(str) socket(str)
|
|
er_agent(str) socket(str)
|
|
...
|
|
...
|
|
|
|
|
|
- Example 1.11. Definition of 'version' table and sample records
|
|
|
|
|
|
+ Example 1.12. Definition of 'version' table and sample records
|
|
...
|
|
...
|
|
table_name(str) table_version(int)
|
|
table_name(str) table_version(int)
|
|
subscriber:3
|
|
subscriber:3
|
|
@@ -355,7 +370,7 @@ location:6
|
|
aliases:6
|
|
aliases:6
|
|
...
|
|
...
|
|
|
|
|
|
- Example 1.12. Configuration file
|
|
|
|
|
|
+ Example 1.13. Configuration file
|
|
...
|
|
...
|
|
#
|
|
#
|
|
# $Id$
|
|
# $Id$
|