|
@@ -34,23 +34,26 @@ Juha Heinanen
|
|
|
3. Parameters
|
|
|
|
|
|
3.1. db_url(str)
|
|
|
- 3.2. presentity_table(str)
|
|
|
- 3.3. active_watchers_table(str)
|
|
|
- 3.4. watchers_table(str)
|
|
|
- 3.5. clean_period (int)
|
|
|
- 3.6. db_update_period (int)
|
|
|
- 3.7. to_tag_pref (str)
|
|
|
- 3.8. expires_offset (int)
|
|
|
- 3.9. max_expires (int)
|
|
|
- 3.10. server_address (str)
|
|
|
- 3.11. subs_db_mode (int)
|
|
|
- 3.12. publ_cache (int)
|
|
|
- 3.13. subs_htable_size (int)
|
|
|
- 3.14. pres_htable_size (int)
|
|
|
- 3.15. send_fast_notify (int)
|
|
|
- 3.16. enable_sphere_check (int)
|
|
|
- 3.17. timeout_rm_subs (int)
|
|
|
- 3.18. fetch_rows (integer)
|
|
|
+ 3.2. xcap_db_url(str)
|
|
|
+ 3.3. presentity_table(str)
|
|
|
+ 3.4. active_watchers_table(str)
|
|
|
+ 3.5. watchers_table(str)
|
|
|
+ 3.6. xcap_table(str)
|
|
|
+ 3.7. clean_period (int)
|
|
|
+ 3.8. db_update_period (int)
|
|
|
+ 3.9. to_tag_pref (str)
|
|
|
+ 3.10. expires_offset (int)
|
|
|
+ 3.11. max_expires (int)
|
|
|
+ 3.12. server_address (str)
|
|
|
+ 3.13. subs_db_mode (int)
|
|
|
+ 3.14. publ_cache (int)
|
|
|
+ 3.15. subs_htable_size (int)
|
|
|
+ 3.16. pres_htable_size (int)
|
|
|
+ 3.17. send_fast_notify (int)
|
|
|
+ 3.18. enable_sphere_check (int)
|
|
|
+ 3.19. timeout_rm_subs (int)
|
|
|
+ 3.20. fetch_rows (integer)
|
|
|
+ 3.21. integrated_xcap_server (integer)
|
|
|
|
|
|
4. Functions
|
|
|
|
|
@@ -59,6 +62,7 @@ Juha Heinanen
|
|
|
4.3. pres_auth_status(watcher_uri, presentity_uri)
|
|
|
4.4. pres_refresh_watchers(uri, event, type)
|
|
|
4.5. pres_update_watchers(uri, event)
|
|
|
+ 4.6. pres_update_presentity(uri, file_uri, filename)
|
|
|
|
|
|
5. MI Commands
|
|
|
|
|
@@ -90,28 +94,32 @@ Juha Heinanen
|
|
|
List of Examples
|
|
|
|
|
|
1.1. Set db_url parameter
|
|
|
- 1.2. Set presentity_table parameter
|
|
|
- 1.3. Set active_watchers_table parameter
|
|
|
- 1.4. Set watchers_table parameter
|
|
|
- 1.5. Set clean_period parameter
|
|
|
- 1.6. Set db_update_period parameter
|
|
|
- 1.7. Set to_tag_pref parameter
|
|
|
- 1.8. Set expires_offset parameter
|
|
|
- 1.9. Set max_expires parameter
|
|
|
- 1.10. Set server_address parameter
|
|
|
- 1.11. Set subs_db_mode parameter
|
|
|
- 1.12. Set publ_cache parameter
|
|
|
- 1.13. Set subs_htable_size parameter
|
|
|
- 1.14. Set pres_htable_size parameter
|
|
|
- 1.15. Set send_fast_notify parameter
|
|
|
- 1.16. Set enable_sphere_check parameter
|
|
|
- 1.17. Set timeout_rm_subs parameter
|
|
|
- 1.18. Set fetch_rows parameter
|
|
|
- 1.19. handle_publish usage
|
|
|
- 1.20. handle_subscribe usage
|
|
|
- 1.21. pres_auth_status usage
|
|
|
- 1.22. pres_refresh_watchers usage
|
|
|
- 1.23. pres_update_watchers usage
|
|
|
+ 1.2. Set xcap_db_url parameter
|
|
|
+ 1.3. Set presentity_table parameter
|
|
|
+ 1.4. Set active_watchers_table parameter
|
|
|
+ 1.5. Set watchers_table parameter
|
|
|
+ 1.6. Set xcap_table parameter
|
|
|
+ 1.7. Set clean_period parameter
|
|
|
+ 1.8. Set db_update_period parameter
|
|
|
+ 1.9. Set to_tag_pref parameter
|
|
|
+ 1.10. Set expires_offset parameter
|
|
|
+ 1.11. Set max_expires parameter
|
|
|
+ 1.12. Set server_address parameter
|
|
|
+ 1.13. Set subs_db_mode parameter
|
|
|
+ 1.14. Set publ_cache parameter
|
|
|
+ 1.15. Set subs_htable_size parameter
|
|
|
+ 1.16. Set pres_htable_size parameter
|
|
|
+ 1.17. Set send_fast_notify parameter
|
|
|
+ 1.18. Set enable_sphere_check parameter
|
|
|
+ 1.19. Set timeout_rm_subs parameter
|
|
|
+ 1.20. Set fetch_rows parameter
|
|
|
+ 1.21. Set integrated_xcap_server parameter
|
|
|
+ 1.22. handle_publish usage
|
|
|
+ 1.23. handle_subscribe usage
|
|
|
+ 1.24. pres_auth_status usage
|
|
|
+ 1.25. pres_refresh_watchers usage
|
|
|
+ 1.26. pres_update_watchers usage
|
|
|
+ 1.27. pres_update_presentity usage
|
|
|
2.1. presence_api_t structure
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
@@ -127,23 +135,26 @@ Chapter 1. Admin Guide
|
|
|
3. Parameters
|
|
|
|
|
|
3.1. db_url(str)
|
|
|
- 3.2. presentity_table(str)
|
|
|
- 3.3. active_watchers_table(str)
|
|
|
- 3.4. watchers_table(str)
|
|
|
- 3.5. clean_period (int)
|
|
|
- 3.6. db_update_period (int)
|
|
|
- 3.7. to_tag_pref (str)
|
|
|
- 3.8. expires_offset (int)
|
|
|
- 3.9. max_expires (int)
|
|
|
- 3.10. server_address (str)
|
|
|
- 3.11. subs_db_mode (int)
|
|
|
- 3.12. publ_cache (int)
|
|
|
- 3.13. subs_htable_size (int)
|
|
|
- 3.14. pres_htable_size (int)
|
|
|
- 3.15. send_fast_notify (int)
|
|
|
- 3.16. enable_sphere_check (int)
|
|
|
- 3.17. timeout_rm_subs (int)
|
|
|
- 3.18. fetch_rows (integer)
|
|
|
+ 3.2. xcap_db_url(str)
|
|
|
+ 3.3. presentity_table(str)
|
|
|
+ 3.4. active_watchers_table(str)
|
|
|
+ 3.5. watchers_table(str)
|
|
|
+ 3.6. xcap_table(str)
|
|
|
+ 3.7. clean_period (int)
|
|
|
+ 3.8. db_update_period (int)
|
|
|
+ 3.9. to_tag_pref (str)
|
|
|
+ 3.10. expires_offset (int)
|
|
|
+ 3.11. max_expires (int)
|
|
|
+ 3.12. server_address (str)
|
|
|
+ 3.13. subs_db_mode (int)
|
|
|
+ 3.14. publ_cache (int)
|
|
|
+ 3.15. subs_htable_size (int)
|
|
|
+ 3.16. pres_htable_size (int)
|
|
|
+ 3.17. send_fast_notify (int)
|
|
|
+ 3.18. enable_sphere_check (int)
|
|
|
+ 3.19. timeout_rm_subs (int)
|
|
|
+ 3.20. fetch_rows (integer)
|
|
|
+ 3.21. integrated_xcap_server (integer)
|
|
|
|
|
|
4. Functions
|
|
|
|
|
@@ -152,6 +163,7 @@ Chapter 1. Admin Guide
|
|
|
4.3. pres_auth_status(watcher_uri, presentity_uri)
|
|
|
4.4. pres_refresh_watchers(uri, event, type)
|
|
|
4.5. pres_update_watchers(uri, event)
|
|
|
+ 4.6. pres_update_presentity(uri, file_uri, filename)
|
|
|
|
|
|
5. MI Commands
|
|
|
|
|
@@ -205,23 +217,26 @@ Chapter 1. Admin Guide
|
|
|
3. Parameters
|
|
|
|
|
|
3.1. db_url(str)
|
|
|
- 3.2. presentity_table(str)
|
|
|
- 3.3. active_watchers_table(str)
|
|
|
- 3.4. watchers_table(str)
|
|
|
- 3.5. clean_period (int)
|
|
|
- 3.6. db_update_period (int)
|
|
|
- 3.7. to_tag_pref (str)
|
|
|
- 3.8. expires_offset (int)
|
|
|
- 3.9. max_expires (int)
|
|
|
- 3.10. server_address (str)
|
|
|
- 3.11. subs_db_mode (int)
|
|
|
- 3.12. publ_cache (int)
|
|
|
- 3.13. subs_htable_size (int)
|
|
|
- 3.14. pres_htable_size (int)
|
|
|
- 3.15. send_fast_notify (int)
|
|
|
- 3.16. enable_sphere_check (int)
|
|
|
- 3.17. timeout_rm_subs (int)
|
|
|
- 3.18. fetch_rows (integer)
|
|
|
+ 3.2. xcap_db_url(str)
|
|
|
+ 3.3. presentity_table(str)
|
|
|
+ 3.4. active_watchers_table(str)
|
|
|
+ 3.5. watchers_table(str)
|
|
|
+ 3.6. xcap_table(str)
|
|
|
+ 3.7. clean_period (int)
|
|
|
+ 3.8. db_update_period (int)
|
|
|
+ 3.9. to_tag_pref (str)
|
|
|
+ 3.10. expires_offset (int)
|
|
|
+ 3.11. max_expires (int)
|
|
|
+ 3.12. server_address (str)
|
|
|
+ 3.13. subs_db_mode (int)
|
|
|
+ 3.14. publ_cache (int)
|
|
|
+ 3.15. subs_htable_size (int)
|
|
|
+ 3.16. pres_htable_size (int)
|
|
|
+ 3.17. send_fast_notify (int)
|
|
|
+ 3.18. enable_sphere_check (int)
|
|
|
+ 3.19. timeout_rm_subs (int)
|
|
|
+ 3.20. fetch_rows (integer)
|
|
|
+ 3.21. integrated_xcap_server (integer)
|
|
|
|
|
|
3.1. db_url(str)
|
|
|
|
|
@@ -238,41 +253,69 @@ modparam("presence", "db_url",
|
|
|
"mysql://openser:openserrw@localhost/openser")
|
|
|
...
|
|
|
|
|
|
-3.2. presentity_table(str)
|
|
|
+3.2. xcap_db_url(str)
|
|
|
+
|
|
|
+ The XCAP database url.
|
|
|
+
|
|
|
+ This option is only required if integrated_xcap_server is enabled AND
|
|
|
+ the xcap table is on a difference server from the other presence
|
|
|
+ tables. If this option is not set db_url is used for the
|
|
|
+ integrated_xcap_server when required.
|
|
|
+
|
|
|
+ Default value is “NULL”.
|
|
|
+
|
|
|
+ Example 1.2. Set xcap_db_url parameter
|
|
|
+...
|
|
|
+modparam("presence", "xcap_db_url",
|
|
|
+ "mysql://openser:openserrw@localhost/openser")
|
|
|
+...
|
|
|
+
|
|
|
+3.3. presentity_table(str)
|
|
|
|
|
|
The name of the db table where PUBLISH presence information is stored.
|
|
|
|
|
|
Default value is “presentity”.
|
|
|
|
|
|
- Example 1.2. Set presentity_table parameter
|
|
|
+ Example 1.3. Set presentity_table parameter
|
|
|
...
|
|
|
modparam("presence", "presentity_table", "presentity")
|
|
|
...
|
|
|
|
|
|
-3.3. active_watchers_table(str)
|
|
|
+3.4. active_watchers_table(str)
|
|
|
|
|
|
The name of the db table where active subscription information is
|
|
|
stored.
|
|
|
|
|
|
Default value is “active_watchers”.
|
|
|
|
|
|
- Example 1.3. Set active_watchers_table parameter
|
|
|
+ Example 1.4. Set active_watchers_table parameter
|
|
|
...
|
|
|
modparam("presence", "active_watchers_table", "active_watchers")
|
|
|
...
|
|
|
|
|
|
-3.4. watchers_table(str)
|
|
|
+3.5. watchers_table(str)
|
|
|
|
|
|
The name of the db table where subscription states are stored.
|
|
|
|
|
|
Default value is “watchers”.
|
|
|
|
|
|
- Example 1.4. Set watchers_table parameter
|
|
|
+ Example 1.5. Set watchers_table parameter
|
|
|
...
|
|
|
modparam("presence", "watchers_table", "watchers")
|
|
|
...
|
|
|
|
|
|
-3.5. clean_period (int)
|
|
|
+3.6. xcap_table(str)
|
|
|
+
|
|
|
+ The name of the db table where XML documents are stored.
|
|
|
+
|
|
|
+ Default value is “xcap”.
|
|
|
+
|
|
|
+ Example 1.6. Set xcap_table parameter
|
|
|
+...
|
|
|
+modparam("presence", "xcap_table", "xcap")
|
|
|
+...
|
|
|
+
|
|
|
+3.7. clean_period (int)
|
|
|
|
|
|
The period in seconds between checks if there are expired messages
|
|
|
stored in database.
|
|
@@ -280,12 +323,12 @@ modparam("presence", "watchers_table", "watchers")
|
|
|
Default value is “100”. A zero or negative value disables this
|
|
|
activity.
|
|
|
|
|
|
- Example 1.5. Set clean_period parameter
|
|
|
+ Example 1.7. Set clean_period parameter
|
|
|
...
|
|
|
modparam("presence", "clean_period", 100)
|
|
|
...
|
|
|
|
|
|
-3.6. db_update_period (int)
|
|
|
+3.8. db_update_period (int)
|
|
|
|
|
|
The period at which to synchronize cached subscriber info with the
|
|
|
database.
|
|
@@ -293,24 +336,24 @@ modparam("presence", "clean_period", 100)
|
|
|
Default value is “100”. A zero or negative value disables
|
|
|
synchronization.
|
|
|
|
|
|
- Example 1.6. Set db_update_period parameter
|
|
|
+ Example 1.8. Set db_update_period parameter
|
|
|
...
|
|
|
modparam("presence", "db_update_period", 100)
|
|
|
...
|
|
|
|
|
|
-3.7. to_tag_pref (str)
|
|
|
+3.9. to_tag_pref (str)
|
|
|
|
|
|
The prefix used when generating to_tag when sending replies for
|
|
|
SUBSCRIBE requests.
|
|
|
|
|
|
Default value is “10”.
|
|
|
|
|
|
- Example 1.7. Set to_tag_pref parameter
|
|
|
+ Example 1.9. Set to_tag_pref parameter
|
|
|
...
|
|
|
modparam("presence", "to_tag_pref", 'pres')
|
|
|
...
|
|
|
|
|
|
-3.8. expires_offset (int)
|
|
|
+3.10. expires_offset (int)
|
|
|
|
|
|
The value in seconds that should be subtracted from the expires value
|
|
|
when sending a 200OK for a publish. It is used for forcing the client
|
|
@@ -318,35 +361,35 @@ modparam("presence", "to_tag_pref", 'pres')
|
|
|
|
|
|
Default value is “0”.
|
|
|
|
|
|
- Example 1.8. Set expires_offset parameter
|
|
|
+ Example 1.10. Set expires_offset parameter
|
|
|
...
|
|
|
modparam("presence", "expires_offset", 10)
|
|
|
...
|
|
|
|
|
|
-3.9. max_expires (int)
|
|
|
+3.11. max_expires (int)
|
|
|
|
|
|
The the maximum admissible expires value for PUBLISH/SUBSCRIBE message
|
|
|
(in seconds).
|
|
|
|
|
|
Default value is “3600”.
|
|
|
|
|
|
- Example 1.9. Set max_expires parameter
|
|
|
+ Example 1.11. Set max_expires parameter
|
|
|
...
|
|
|
modparam("presence", "max_expires", 3600)
|
|
|
...
|
|
|
|
|
|
-3.10. server_address (str)
|
|
|
+3.12. server_address (str)
|
|
|
|
|
|
The presence server address which will become the value of Contact
|
|
|
header filed for 200 OK replies to SUBSCRIBE and PUBLISH and in NOTIFY
|
|
|
messages.
|
|
|
|
|
|
- Example 1.10. Set server_address parameter
|
|
|
+ Example 1.12. Set server_address parameter
|
|
|
...
|
|
|
modparam("presence", "server_address", "sip:10.10.10.10:5060")
|
|
|
...
|
|
|
|
|
|
-3.11. subs_db_mode (int)
|
|
|
+3.13. subs_db_mode (int)
|
|
|
|
|
|
The presence module can utilize database for persistent subscription
|
|
|
storage. If you use database, your subscriptions will survive machine
|
|
@@ -380,12 +423,12 @@ modparam("presence", "server_address", "sip:10.10.10.10:5060")
|
|
|
|
|
|
Default value is 2 (Write-Back scheme).
|
|
|
|
|
|
- Example 1.11. Set subs_db_mode parameter
|
|
|
+ Example 1.13. Set subs_db_mode parameter
|
|
|
...
|
|
|
modparam("presence", "subs_db_mode", 1)
|
|
|
...
|
|
|
|
|
|
-3.12. publ_cache (int)
|
|
|
+3.14. publ_cache (int)
|
|
|
|
|
|
To improve performance, the presence module holds by default a publish
|
|
|
cache that says if a certain publication exists in database. This is
|
|
@@ -401,12 +444,12 @@ modparam("presence", "subs_db_mode", 1)
|
|
|
|
|
|
Default value is “1”.
|
|
|
|
|
|
- Example 1.12. Set publ_cache parameter
|
|
|
+ Example 1.14. Set publ_cache parameter
|
|
|
...
|
|
|
modparam("presence", "publ_cache", 0)
|
|
|
...
|
|
|
|
|
|
-3.13. subs_htable_size (int)
|
|
|
+3.15. subs_htable_size (int)
|
|
|
|
|
|
The size of the in-memory hash table to store subscription dialogs.
|
|
|
This parameter will be used as the power of 2 when computing table
|
|
@@ -414,24 +457,24 @@ modparam("presence", "publ_cache", 0)
|
|
|
|
|
|
Default value is “9 (512)”.
|
|
|
|
|
|
- Example 1.13. Set subs_htable_size parameter
|
|
|
+ Example 1.15. Set subs_htable_size parameter
|
|
|
...
|
|
|
modparam("presence", "subs_htable_size", 11)
|
|
|
...
|
|
|
|
|
|
-3.14. pres_htable_size (int)
|
|
|
+3.16. pres_htable_size (int)
|
|
|
|
|
|
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)”.
|
|
|
|
|
|
- Example 1.14. Set pres_htable_size parameter
|
|
|
+ Example 1.16. Set pres_htable_size parameter
|
|
|
...
|
|
|
modparam("presence", "pres_htable_size", 11)
|
|
|
...
|
|
|
|
|
|
-3.15. send_fast_notify (int)
|
|
|
+3.17. send_fast_notify (int)
|
|
|
|
|
|
This parameter enables or disables the sending of an initial empty
|
|
|
NOTIFY after a SUBSCRIBE/reSUBSCRIBE. This caused problems for MWI
|
|
@@ -441,12 +484,12 @@ modparam("presence", "pres_htable_size", 11)
|
|
|
|
|
|
Default value is “1 ”.
|
|
|
|
|
|
- Example 1.15. Set send_fast_notify parameter
|
|
|
+ Example 1.17. Set send_fast_notify parameter
|
|
|
...
|
|
|
modparam("presence", "send_fast_notify", 0)
|
|
|
...
|
|
|
|
|
|
-3.16. enable_sphere_check (int)
|
|
|
+3.18. enable_sphere_check (int)
|
|
|
|
|
|
This parameter is a flag that should be set if permission rules include
|
|
|
sphere checking. The sphere information is expected to be present in
|
|
@@ -456,12 +499,12 @@ modparam("presence", "send_fast_notify", 0)
|
|
|
|
|
|
Default value is “0 ”.
|
|
|
|
|
|
- Example 1.16. Set enable_sphere_check parameter
|
|
|
+ Example 1.18. Set enable_sphere_check parameter
|
|
|
...
|
|
|
modparam("presence", "enable_sphere_check", 1)
|
|
|
...
|
|
|
|
|
|
-3.17. timeout_rm_subs (int)
|
|
|
+3.19. timeout_rm_subs (int)
|
|
|
|
|
|
This parameter is a flag that should be set if subscriptions should be
|
|
|
removed from the active_watchers when a NOTIFY times out. RFC3265
|
|
@@ -471,22 +514,36 @@ modparam("presence", "enable_sphere_check", 1)
|
|
|
|
|
|
Default value is “1”.
|
|
|
|
|
|
- Example 1.17. Set timeout_rm_subs parameter
|
|
|
+ Example 1.19. Set timeout_rm_subs parameter
|
|
|
...
|
|
|
modparam("presence", "timeout_rm_subs", 0)
|
|
|
...
|
|
|
|
|
|
-3.18. fetch_rows (integer)
|
|
|
+3.20. fetch_rows (integer)
|
|
|
|
|
|
Number of rows to be loaded in one step from database.
|
|
|
|
|
|
Default value is 500.
|
|
|
|
|
|
- Example 1.18. Set fetch_rows parameter
|
|
|
+ Example 1.20. Set fetch_rows parameter
|
|
|
...
|
|
|
modparam("presence", "fetch_rows", 1000)
|
|
|
...
|
|
|
|
|
|
+3.21. integrated_xcap_server (integer)
|
|
|
+
|
|
|
+ Enable the integrated XCAP server connection. This is only required if
|
|
|
+ you want to use the pres_update_presentity() function. Setting to 0
|
|
|
+ means no integrated XCAP server, setting to 1 means enable integrated
|
|
|
+ XCAP server.
|
|
|
+
|
|
|
+ Default value is 0.
|
|
|
+
|
|
|
+ Example 1.21. Set integrated_xcap_server parameter
|
|
|
+...
|
|
|
+modparam("presence", "integrated_xcap_server", 1)
|
|
|
+...
|
|
|
+
|
|
|
4. Functions
|
|
|
|
|
|
4.1. handle_publish(char* sender_uri)
|
|
@@ -494,6 +551,7 @@ modparam("presence", "fetch_rows", 1000)
|
|
|
4.3. pres_auth_status(watcher_uri, presentity_uri)
|
|
|
4.4. pres_refresh_watchers(uri, event, type)
|
|
|
4.5. pres_update_watchers(uri, event)
|
|
|
+ 4.6. pres_update_presentity(uri, file_uri, filename)
|
|
|
|
|
|
4.1. handle_publish(char* sender_uri)
|
|
|
|
|
@@ -515,7 +573,7 @@ modparam("presence", "fetch_rows", 1000)
|
|
|
|
|
|
The module sends an appropriate stateless reply in all cases.
|
|
|
|
|
|
- Example 1.19. handle_publish usage
|
|
|
+ Example 1.22. handle_publish usage
|
|
|
...
|
|
|
if(is_method("PUBLISH"))
|
|
|
{
|
|
@@ -541,7 +599,7 @@ modparam("presence", "fetch_rows", 1000)
|
|
|
|
|
|
The module sends an appropriate stateless reply in all cases.
|
|
|
|
|
|
- Example 1.20. handle_subscribe usage
|
|
|
+ Example 1.23. handle_subscribe usage
|
|
|
...
|
|
|
if(method=="SUBSCRIBE")
|
|
|
handle_subscribe();
|
|
@@ -558,7 +616,7 @@ if(method=="SUBSCRIBE")
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE.
|
|
|
|
|
|
- Example 1.21. pres_auth_status usage
|
|
|
+ Example 1.24. pres_auth_status usage
|
|
|
...
|
|
|
if (method=="MESSAGE") {
|
|
|
pres_auth_status("$fu", $ru");
|
|
@@ -589,7 +647,7 @@ if (method=="MESSAGE") {
|
|
|
|
|
|
This function can be used from ANY_ROUTE.
|
|
|
|
|
|
- Example 1.22. pres_refresh_watchers usage
|
|
|
+ Example 1.25. pres_refresh_watchers usage
|
|
|
...
|
|
|
pres_refresh_watchers("sip:[email protected]", "presence", 1);
|
|
|
...
|
|
@@ -607,11 +665,31 @@ pres_refresh_watchers("sip:[email protected]", "presence", 1);
|
|
|
|
|
|
This function can be used from ANY_ROUTE.
|
|
|
|
|
|
- Example 1.23. pres_update_watchers usage
|
|
|
+ Example 1.26. pres_update_watchers usage
|
|
|
...
|
|
|
pres_update_watchers("sip:[email protected]", "presence");
|
|
|
...
|
|
|
|
|
|
+4.6. pres_update_presentity(uri, file_uri, filename)
|
|
|
+
|
|
|
+ The function can be used in configuration to triger updates to
|
|
|
+ presentities based on the content of pidf-manipulation documents stored
|
|
|
+ in the xcap db table. This enables "hard-state" presence to be set.
|
|
|
+
|
|
|
+ Parameters:
|
|
|
+ * uri - the uri of the presentity
|
|
|
+ * file_uri - the uri of the document on the XCAP server
|
|
|
+ * filename - the filename part of the uri of the document this is
|
|
|
+ used as the presentity ETag
|
|
|
+
|
|
|
+ This function can be used from ANY_ROUTE.
|
|
|
+
|
|
|
+ Example 1.27. pres_update_presentity usage
|
|
|
+...
|
|
|
+pres_update_presentity("$xcapuri(u=>xuid)", "$xcapuri(u=>uri_adoc)", "$xcapuri(u
|
|
|
+=>file)");
|
|
|
+...
|
|
|
+
|
|
|
5. MI Commands
|
|
|
|
|
|
5.1. refreshWatchers
|