The Presence module implements the core functionality of SIP event notification. It handles PUBLISH and SUBSCRIBE messages and generates NOTIFY messages in a general, event independent way. It is extensible and allows registering events to it from other Kamailio modules. Supported SIP event packages are presence, presence.winfo, dialog;sla from the presence_xml module and message-summary from the presence_mwi module. The module can use database and memory storage (to improve performance). For subscriptions it supports the 4 storage modes: Memory Only, Write Back, Write Through and DB Only. For publishes, it stores the state documents in database only (because of the large size) and it can store a publish cache in memory to avoid unnecessary database queries. Read the subs_db_mode and publ_cache parameter sections to decide which is the best storage configuration for you. The module implements several API functions, that can be used by other modules. In fact, it can be used only as a resource module, or "library". This mode of operation is enabled if the db_url parameter is not set to any value. The Kamailio Presence module implements the specifications in: RFC3265, RFC3856, RFC3857, RFC3858.
| Parámetro | Tipo | Descripción |
|---|---|---|
| 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. cseq_offset (int) 3.7. db_update_period (int) 3.8. waitn_time (int) 3.9. notifier_poll_ |
| presentity_table | str | 3.3. active_watchers_table(str) 3.4. watchers_table(str) 3.5. clean_period (int) 3.6. cseq_offset (int) 3.7. db_update_period (int) 3.8. waitn_time (int) 3.9. notifier_poll_rate (int) 3.10. notifier_p |
| active_watchers_table | str | 3.4. watchers_table(str) 3.5. clean_period (int) 3.6. cseq_offset (int) 3.7. db_update_period (int) 3.8. waitn_time (int) 3.9. notifier_poll_rate (int) 3.10. notifier_processes (int) 3.11. force_delet |
| watchers_table | str | 3.5. clean_period (int) 3.6. cseq_offset (int) 3.7. db_update_period (int) 3.8. waitn_time (int) 3.9. notifier_poll_rate (int) 3.10. notifier_processes (int) 3.11. force_delete (int) 3.12. startup_mod |
| clean_period | int | 3.6. cseq_offset (int) 3.7. db_update_period (int) 3.8. waitn_time (int) 3.9. notifier_poll_rate (int) 3.10. notifier_processes (int) 3.11. force_delete (int) 3.12. startup_mode (int) 3.13. expires_of |
| cseq_offset | int | 3.7. db_update_period (int) 3.8. waitn_time (int) 3.9. notifier_poll_rate (int) 3.10. notifier_processes (int) 3.11. force_delete (int) 3.12. startup_mode (int) 3.13. expires_offset (int) 3.14. max_ex |
| db_update_period | int | 3.8. waitn_time (int) 3.9. notifier_poll_rate (int) 3.10. notifier_processes (int) 3.11. force_delete (int) 3.12. startup_mode (int) 3.13. expires_offset (int) 3.14. max_expires (int) 3.15. min_expire |
| waitn_time | int | 3.9. notifier_poll_rate (int) 3.10. notifier_processes (int) 3.11. force_delete (int) 3.12. startup_mode (int) 3.13. expires_offset (int) 3.14. max_expires (int) 3.15. min_expires (int) 3.16. min_expi |
| notifier_poll_rate | int | 3.10. notifier_processes (int) 3.11. force_delete (int) 3.12. startup_mode (int) 3.13. expires_offset (int) 3.14. max_expires (int) 3.15. min_expires (int) 3.16. min_expires_action (int) 3.17. server_ |
| notifier_processes | int | 3.11. force_delete (int) 3.12. startup_mode (int) 3.13. expires_offset (int) 3.14. max_expires (int) 3.15. min_expires (int) 3.16. min_expires_action (int) 3.17. server_address (str) 3.18. subs_db_mod |
| force_delete | int | 3.12. startup_mode (int) 3.13. expires_offset (int) 3.14. max_expires (int) 3.15. min_expires (int) 3.16. min_expires_action (int) 3.17. server_address (str) 3.18. subs_db_mode (int) 3.19. publ_cache |
| startup_mode | int | 3.13. expires_offset (int) 3.14. max_expires (int) 3.15. min_expires (int) 3.16. min_expires_action (int) 3.17. server_address (str) 3.18. subs_db_mode (int) 3.19. publ_cache (int) 3.20. subs_htable_s |
| expires_offset | int | 3.14. max_expires (int) 3.15. min_expires (int) 3.16. min_expires_action (int) 3.17. server_address (str) 3.18. subs_db_mode (int) 3.19. publ_cache (int) 3.20. subs_htable_size (int) 3.21. pres_htable |
| max_expires | int | 3.15. min_expires (int) 3.16. min_expires_action (int) 3.17. server_address (str) 3.18. subs_db_mode (int) 3.19. publ_cache (int) 3.20. subs_htable_size (int) 3.21. pres_htable_size (int) 3.22. send_f |
| min_expires | int | 3.16. min_expires_action (int) 3.17. server_address (str) 3.18. subs_db_mode (int) 3.19. publ_cache (int) 3.20. subs_htable_size (int) 3.21. pres_htable_size (int) 3.22. send_fast_notify (int) 3.23. e |
| min_expires_action | int | 3.17. server_address (str) 3.18. subs_db_mode (int) 3.19. publ_cache (int) 3.20. subs_htable_size (int) 3.21. pres_htable_size (int) 3.22. send_fast_notify (int) 3.23. enable_sphere_check (int) 3.24. |
| server_address | str | 3.18. subs_db_mode (int) 3.19. publ_cache (int) 3.20. subs_htable_size (int) 3.21. pres_htable_size (int) 3.22. send_fast_notify (int) 3.23. enable_sphere_check (int) 3.24. timeout_rm_subs (int) 3.25. |
| subs_db_mode | int | 3.19. publ_cache (int) 3.20. subs_htable_size (int) 3.21. pres_htable_size (int) 3.22. send_fast_notify (int) 3.23. enable_sphere_check (int) 3.24. timeout_rm_subs (int) 3.25. fetch_rows (integer) 3.2 |
| publ_cache | int | 3.20. subs_htable_size (int) 3.21. pres_htable_size (int) 3.22. send_fast_notify (int) 3.23. enable_sphere_check (int) 3.24. timeout_rm_subs (int) 3.25. fetch_rows (integer) 3.26. db_table_lock_type ( |
| subs_htable_size | int | 3.21. pres_htable_size (int) 3.22. send_fast_notify (int) 3.23. enable_sphere_check (int) 3.24. timeout_rm_subs (int) 3.25. fetch_rows (integer) 3.26. db_table_lock_type (integer) 3.27. local_log_leve |
| pres_htable_size | int | 3.22. send_fast_notify (int) 3.23. enable_sphere_check (int) 3.24. timeout_rm_subs (int) 3.25. fetch_rows (integer) 3.26. db_table_lock_type (integer) 3.27. local_log_level (int) 3.28. local_log_facil |
| send_fast_notify | int | 3.23. enable_sphere_check (int) 3.24. timeout_rm_subs (int) 3.25. fetch_rows (integer) 3.26. db_table_lock_type (integer) 3.27. local_log_level (int) 3.28. local_log_facility (int) 3.29. subs_remove_m |
| enable_sphere_check | int | 3.24. timeout_rm_subs (int) 3.25. fetch_rows (integer) 3.26. db_table_lock_type (integer) 3.27. local_log_level (int) 3.28. local_log_facility (int) 3.29. subs_remove_match (int) 3.30. xavp_cfg (str) |
| timeout_rm_subs | int | 3.25. fetch_rows (integer) 3.26. db_table_lock_type (integer) 3.27. local_log_level (int) 3.28. local_log_facility (int) 3.29. subs_remove_match (int) 3.30. xavp_cfg (str) 3.31. retrieve_order (int) 3 |
| fetch_rows | integer | 3.26. db_table_lock_type (integer) 3.27. local_log_level (int) 3.28. local_log_facility (int) 3.29. subs_remove_match (int) 3.30. xavp_cfg (str) 3.31. retrieve_order (int) 3.32. retrieve_order_by (str |
| db_table_lock_type | integer | 3.27. local_log_level (int) 3.28. local_log_facility (int) 3.29. subs_remove_match (int) 3.30. xavp_cfg (str) 3.31. retrieve_order (int) 3.32. retrieve_order_by (str) 3.33. sip_uri_match (int) 3.34. e |
| local_log_level | int | 3.28. local_log_facility (int) 3.29. subs_remove_match (int) 3.30. xavp_cfg (str) 3.31. retrieve_order (int) 3.32. retrieve_order_by (str) 3.33. sip_uri_match (int) 3.34. enable_dmq (integer) 3.35. en |
| local_log_facility | int | 3.29. subs_remove_match (int) 3.30. xavp_cfg (str) 3.31. retrieve_order (int) 3.32. retrieve_order_by (str) 3.33. sip_uri_match (int) 3.34. enable_dmq (integer) 3.35. enable_pres_dmq (integer) 3.36. e |
| subs_remove_match | int | 3.30. xavp_cfg (str) 3.31. retrieve_order (int) 3.32. retrieve_order_by (str) 3.33. sip_uri_match (int) 3.34. enable_dmq (integer) 3.35. enable_pres_dmq (integer) 3.36. enable_pres_sync_dmq (integer) |
| xavp_cfg | str | 3.31. retrieve_order (int) 3.32. retrieve_order_by (str) 3.33. sip_uri_match (int) 3.34. enable_dmq (integer) 3.35. enable_pres_dmq (integer) 3.36. enable_pres_sync_dmq (integer) 3.37. enable_subs_dmq |
4.2. handle_subscribe([watcher_uri]) 4.3. pres_auth_status(watcher_uri, presentity_uri) 4.4. pres_has_subscribers(presentity_uri, event) 4.5. pres_refresh_watchers(uri, event, type[, file_uri, filename]) 4.6. pres_update_watchers(uri, event)
4.3. pres_auth_status(watcher_uri, presentity_uri) 4.4. pres_has_subscribers(presentity_uri, event) 4.5. pres_refresh_watchers(uri, event, type[, file_uri, filename]) 4.6. pres_update_watchers(uri, event)
4.4. pres_has_subscribers(presentity_uri, event) 4.5. pres_refresh_watchers(uri, event, type[, file_uri, filename]) 4.6. pres_update_watchers(uri, event)
4.5. pres_refresh_watchers(uri, event, type[, file_uri, filename]) 4.6. pres_update_watchers(uri, event)
4.6. pres_update_watchers(uri, event)
4.1. handle_publish([sender_uri])
Handles PUBLISH requests by storing and updating published information in memory cache and database, then calls functions to send NOTIFY messages when changes in the published information occur. It takes one argument -> sender_uri. The parameter was
The function which handles SUBSCRIBE requests. It stores or updates information in memory and database and calls functions to send NOTIFY messages when a SUBSCRIBE which initiate a dialog is received.
The function checks if watcher URI is authorized to subscribe event 'presence' of presentity URI. Both watcher_uri and presentity_uri can be static strings or contain pseudo variables.
Allows to check if presentity has any subscribers of event.
The function can be used in configuration to trigger notifies to watchers if a change in watchers authorization or in published state occurred (i.e., updates of xcap documents).
The function can be used in configuration to trigger updates to watchers status if a change in watchers authorization state occurred (i.e., updates of xcap documents change state from pending to active).
Copyright © 2006 Voice Sistem SRL
Copyright © 2009 Juha Heinanen