4. Parameters
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
1.2. Minimal Kamailio location dbtext table definition
1.3. Minimal Kamailio subscriber dbtext table example
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
4. Parameters
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
4. Parameters
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)
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.
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
mailio/dbtext")
...
-4.3. emptystring (integer)
+4.4. emptystring (integer)
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
Default value is “0” (off).
- Example 1.6. Set emptystring parameter
+ Example 1.7. Set emptystring parameter
...
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
have columns with large content.
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)
...
database path. So, either you provide an absolute path to database
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"
...
in order to have authentication. To use with the given configuration
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
) email_address(str) datetime_created(int) datetime_modified(int) confirmation(s
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)
q(double,null) callid(str,null) cseq(int,null) last_modified(str) flags(int) us
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)
subscriber:3
aliases:6
...
- Example 1.12. Configuration file
+ Example 1.13. Configuration file
...
#
# $Id$
bks.tv
<rybkin.a@bks.tv>
+Edited by
+
+Julien Chavanton
+
+ flowroute.com
+ <jchavanton@gmail.com>
+
Copyright © 2014
+
+ Copyright © 2017
__________________________________________________________________
Table of Contents
3.2. sync (int)
3.3. batch_size (int)
3.4. batch_usleep (int)
-
- 4. usrloc_domain (string)
+ 3.5. batch_msg_size (int)
+ 3.6. batch_msg_contacts (int)
+ 3.7. usrloc_domain (string)
List of Examples
1.2. Set sync parameter
1.3. Set batch size parameter
1.4. Set batch_usleep parameter
- 1.5. Set usrloc_domain parameter
+ 1.5. Set batch_msg_size parameter
+ 1.6. Set batch_msg_contacts parameter
+ 1.7. Set usrloc_domain parameter
Chapter 1. Admin Guide
3.2. sync (int)
3.3. batch_size (int)
3.4. batch_usleep (int)
-
- 4. usrloc_domain (string)
+ 3.5. batch_msg_size (int)
+ 3.6. batch_msg_contacts (int)
+ 3.7. usrloc_domain (string)
1. Overview
3.2. sync (int)
3.3. batch_size (int)
3.4. batch_usleep (int)
+ 3.5. batch_msg_size (int)
+ 3.6. batch_msg_contacts (int)
+ 3.7. usrloc_domain (string)
3.1. enable (int)
modparam("dmq_usrloc", "batch_usleep", 1000)
...
-4. usrloc_domain (string)
+3.5. batch_msg_size (int)
+
+ The parameter controls the size of the messages during a sync. This is
+ to make sure the messages are never larger then 65536 (the maximum
+ datagram size).
+
+ Note that batch_msg_contacts will also be checked.
+
+ Default value is 60000. Maximum value is 60000.
+
+ Example 1.5. Set batch_msg_size parameter
+...
+modparam("dmq_usrloc", "batch_msg_contacts", 50) # 50 contacts / message
+modparam("dmq_usrloc", "batch_msg_size", 500000)
+# with this config, when doing a full sync, each message will be sent a soon as
+the body is larger 50K or contains 50 contacts
+...
+
+3.6. batch_msg_contacts (int)
+
+ The parameter controls the amount of contact per message/transaction
+ during a sync.
+
+ Note that batch_msg_size will also be checked.
+
+ Default value is 1. Maximum value is 150.
+
+ Example 1.6. Set batch_msg_contacts parameter
+...
+modparam("dmq_usrloc", "batch_msg_contacts", 50) # 50 contacts / message
+modparam("dmq_usrloc", "batch_size", 10000) # 10000 contacts / batch
+modparam("dmq_usrloc", "batch_usleep", 500000) # one batch every 500ms
+# syncing 20K contacts/second with 50 contacts/message
+...
+
+3.7. usrloc_domain (string)
The usrloc domain to synchronize.
Default value is “location”.
- Example 1.5. Set usrloc_domain parameter
+ Example 1.7. Set usrloc_domain parameter
...
modparam("dmq_usrloc", "usrloc_domain", "my_domain")
...