|
@@ -16,9 +16,9 @@ Edited by
|
|
|
|
|
|
Juha Heinanen
|
|
|
|
|
|
- Copyright © 2006 Voice Sistem SRL
|
|
|
+ Copyright © 2006 Voice Sistem SRL
|
|
|
|
|
|
- Copyright © 2009 Juha Heinanen
|
|
|
+ Copyright © 2009 Juha Heinanen
|
|
|
__________________________________________________________________
|
|
|
|
|
|
Table of Contents
|
|
@@ -70,7 +70,11 @@ Juha Heinanen
|
|
|
5.1. refreshWatchers
|
|
|
5.2. cleanup
|
|
|
|
|
|
- 6. Installation
|
|
|
+ 6. RPC Commands
|
|
|
+
|
|
|
+ 6.1. presence.cleanup
|
|
|
+
|
|
|
+ 7. Installation
|
|
|
|
|
|
2. Developer Guide
|
|
|
|
|
@@ -170,7 +174,11 @@ Chapter 1. Admin Guide
|
|
|
5.1. refreshWatchers
|
|
|
5.2. cleanup
|
|
|
|
|
|
- 6. Installation
|
|
|
+ 6. RPC Commands
|
|
|
+
|
|
|
+ 6.1. presence.cleanup
|
|
|
+
|
|
|
+ 7. Installation
|
|
|
|
|
|
1. Overview
|
|
|
|
|
@@ -245,19 +253,19 @@ Chapter 1. Admin Guide
|
|
|
If set, the module is a fully operational presence server. Otherwise,
|
|
|
it is used as a 'library', for its exported functions.
|
|
|
|
|
|
- Default value is “NULL�.
|
|
|
+ Default value is "NULL".
|
|
|
|
|
|
Example 1.1. Set db_url parameter
|
|
|
...
|
|
|
modparam("presence", "db_url",
|
|
|
- "mysql://openser:openserrw@localhost/openser")
|
|
|
+ "mysql://kamailio:kamailiorw@localhost/kamailio")
|
|
|
...
|
|
|
|
|
|
3.2. presentity_table(str)
|
|
|
|
|
|
The name of the db table where PUBLISH presence information is stored.
|
|
|
|
|
|
- Default value is “presentity�.
|
|
|
+ Default value is "presentity".
|
|
|
|
|
|
Example 1.2. Set presentity_table parameter
|
|
|
...
|
|
@@ -269,7 +277,7 @@ modparam("presence", "presentity_table", "presentity")
|
|
|
The name of the db table where active subscription information is
|
|
|
stored.
|
|
|
|
|
|
- Default value is “active_watchers�.
|
|
|
+ Default value is "active_watchers".
|
|
|
|
|
|
Example 1.3. Set active_watchers_table parameter
|
|
|
...
|
|
@@ -280,7 +288,7 @@ modparam("presence", "active_watchers_table", "active_watchers")
|
|
|
|
|
|
The name of the db table where subscription states are stored.
|
|
|
|
|
|
- Default value is “watchers�.
|
|
|
+ Default value is "watchers".
|
|
|
|
|
|
Example 1.4. Set watchers_table parameter
|
|
|
...
|
|
@@ -292,7 +300,7 @@ modparam("presence", "watchers_table", "watchers")
|
|
|
The period in seconds between checks if there are expired messages
|
|
|
stored in database.
|
|
|
|
|
|
- Default value is “100�. A zero or negative value disables this
|
|
|
+ Default value is "100". A zero or negative value disables this
|
|
|
activity.
|
|
|
|
|
|
Example 1.5. Set clean_period parameter
|
|
@@ -305,7 +313,7 @@ modparam("presence", "clean_period", 100)
|
|
|
The period at which to synchronize cached subscriber info with the
|
|
|
database.
|
|
|
|
|
|
- Default value is “100�. A zero or negative value disables
|
|
|
+ Default value is "100". A zero or negative value disables
|
|
|
synchronization.
|
|
|
|
|
|
Example 1.6. Set db_update_period parameter
|
|
@@ -323,7 +331,7 @@ modparam("presence", "db_update_period", 100)
|
|
|
than 0. When notifier_processes is less than or equal to 0 NOTIFY
|
|
|
requests are sent immediately.
|
|
|
|
|
|
- Default value is “5�.
|
|
|
+ Default value is "5".
|
|
|
|
|
|
Example 1.7. Set waitn_time parameter
|
|
|
...
|
|
@@ -340,7 +348,7 @@ modparam("presence", "waitn_time", 10)
|
|
|
Separate notifier processes are only run when subs_db_mode is 3 (DB
|
|
|
only mode).
|
|
|
|
|
|
- Default value is “10�.
|
|
|
+ Default value is "10".
|
|
|
|
|
|
Example 1.8. Set notifier_poll_rate parameter
|
|
|
...
|
|
@@ -360,7 +368,7 @@ modparam("presence", "notifier_poll_rate", 20)
|
|
|
NOTIFY requests can be sent on a dialog at the same time, there are
|
|
|
race conditions which result in CSeq re-use.
|
|
|
|
|
|
- Default value is “1�.
|
|
|
+ Default value is "1".
|
|
|
|
|
|
Example 1.9. Set notifier_processes parameter
|
|
|
...
|
|
@@ -372,7 +380,7 @@ modparam("presence", "notifier_processes", 2)
|
|
|
The prefix used when generating to_tag when sending replies for
|
|
|
SUBSCRIBE requests.
|
|
|
|
|
|
- Default value is “10�.
|
|
|
+ Default value is "10".
|
|
|
|
|
|
Example 1.10. Set to_tag_pref parameter
|
|
|
...
|
|
@@ -385,7 +393,7 @@ modparam("presence", "to_tag_pref", 'pres')
|
|
|
when sending a 200OK for a publish. It is used for forcing the client
|
|
|
to send an update before the old publish expires.
|
|
|
|
|
|
- Default value is “0�.
|
|
|
+ Default value is "0".
|
|
|
|
|
|
Example 1.11. Set expires_offset parameter
|
|
|
...
|
|
@@ -397,7 +405,7 @@ modparam("presence", "expires_offset", 10)
|
|
|
The the maximum admissible expires value for PUBLISH/SUBSCRIBE message
|
|
|
(in seconds).
|
|
|
|
|
|
- Default value is “3600�.
|
|
|
+ Default value is "3600".
|
|
|
|
|
|
Example 1.12. Set max_expires parameter
|
|
|
...
|
|
@@ -468,7 +476,7 @@ modparam("presence", "subs_db_mode", 1)
|
|
|
database or there are other external entities inserting data into the
|
|
|
presentity table.
|
|
|
|
|
|
- Default value is “1�.
|
|
|
+ Default value is "1".
|
|
|
|
|
|
Example 1.15. Set publ_cache parameter
|
|
|
...
|
|
@@ -481,7 +489,7 @@ modparam("presence", "publ_cache", 0)
|
|
|
This parameter will be used as the power of 2 when computing table
|
|
|
size.
|
|
|
|
|
|
- Default value is “9 (512)�.
|
|
|
+ Default value is "9 (512)".
|
|
|
|
|
|
Example 1.16. Set subs_htable_size parameter
|
|
|
...
|
|
@@ -493,7 +501,7 @@ modparam("presence", "subs_htable_size", 11)
|
|
|
The size of the in-memory hash table to store publish records. This
|
|
|
parameter will be used as the power of 2 when computing table size.
|
|
|
|
|
|
- Default value is “9 (512)�.
|
|
|
+ Default value is "9 (512)".
|
|
|
|
|
|
Example 1.17. Set pres_htable_size parameter
|
|
|
...
|
|
@@ -508,7 +516,7 @@ modparam("presence", "pres_htable_size", 11)
|
|
|
empty NOTIFY to an message-summary event. This parameter is enabled by
|
|
|
default, thus addering to the standard.
|
|
|
|
|
|
- Default value is “1 �.
|
|
|
+ Default value is "1 ".
|
|
|
|
|
|
Example 1.18. Set send_fast_notify parameter
|
|
|
...
|
|
@@ -523,7 +531,7 @@ modparam("presence", "send_fast_notify", 0)
|
|
|
this check requires extra processing that should be avoided if this
|
|
|
feature is not supported by the clients.
|
|
|
|
|
|
- Default value is “0 �.
|
|
|
+ Default value is "0 ".
|
|
|
|
|
|
Example 1.19. Set enable_sphere_check parameter
|
|
|
...
|
|
@@ -538,7 +546,7 @@ modparam("presence", "enable_sphere_check", 1)
|
|
|
on. Disabling this will keep subscriptions active on unreliable
|
|
|
networks.
|
|
|
|
|
|
- Default value is “1�.
|
|
|
+ Default value is "1".
|
|
|
|
|
|
Example 1.20. Set timeout_rm_subs parameter
|
|
|
...
|
|
@@ -740,7 +748,21 @@ pres_update_watchers("sip:[email protected]", "presence");
|
|
|
:cleanup:fifo_reply
|
|
|
_empty_line_
|
|
|
|
|
|
-6. Installation
|
|
|
+6. RPC Commands
|
|
|
+
|
|
|
+ 6.1. presence.cleanup
|
|
|
+
|
|
|
+6.1. presence.cleanup
|
|
|
+
|
|
|
+ Manually triggers the cleanup functions for the active_watchers,
|
|
|
+ presentity, and watchers tables. Useful if you have set clean_period
|
|
|
+ and/or db_update_period to zero or less.
|
|
|
+
|
|
|
+ Name: presence.cleanup
|
|
|
+
|
|
|
+ Parameters: none
|
|
|
+
|
|
|
+7. Installation
|
|
|
|
|
|
The module requires 3 tables in the Kamailio database: "presentity",
|
|
|
"active_watchers" and "watchers". The SQL syntax to create them can be
|