浏览代码

msilo Minor edits to the README

- Move the database field definitions close to the table definition
- Fix typos, rewrite some parts
Olle E. Johansson 9 年之前
父节点
当前提交
ceccf4b9d1
共有 3 个文件被更改,包括 406 次插入405 次删除
  1. 240 239
      modules/msilo/README
  2. 0 1
      modules/msilo/doc/msilo.cfg
  3. 166 165
      modules/msilo/doc/msilo_admin.xml

+ 240 - 239
modules/msilo/README

@@ -39,28 +39,28 @@ Juha Heinanen
 
 
               3.1. db_url (string)
               3.1. db_url (string)
               3.2. db_table (string)
               3.2. db_table (string)
-              3.3. from_address (string)
-              3.4. contact_hdr (string)
-              3.5. extra_hdrs (string)
-              3.6. offline_message (string)
-              3.7. content_type_hdr (string)
-              3.8. reminder (string)
-              3.9. outbound_proxy (string)
-              3.10. expire_time (int)
-              3.11. check_time (int)
-              3.12. send_time (int)
-              3.13. clean_period (int)
-              3.14. use_contact (int)
-              3.15. sc_mid (string)
-              3.16. sc_from (string)
-              3.17. sc_to (string)
-              3.18. sc_uri_user (string)
-              3.19. sc_uri_host (string)
-              3.20. sc_body (string)
-              3.21. sc_ctype (string)
-              3.22. sc_exp_time (string)
-              3.23. sc_inc_time (string)
-              3.24. sc_snd_time (string)
+              3.3. sc_mid (string)
+              3.4. sc_from (string)
+              3.5. sc_to (string)
+              3.6. sc_uri_user (string)
+              3.7. sc_uri_host (string)
+              3.8. sc_body (string)
+              3.9. sc_ctype (string)
+              3.10. sc_exp_time (string)
+              3.11. sc_inc_time (string)
+              3.12. sc_snd_time (string)
+              3.13. from_address (string)
+              3.14. contact_hdr (string)
+              3.15. extra_hdrs (string)
+              3.16. offline_message (string)
+              3.17. content_type_hdr (string)
+              3.18. reminder (string)
+              3.19. outbound_proxy (string)
+              3.20. expire_time (int)
+              3.21. check_time (int)
+              3.22. send_time (int)
+              3.23. clean_period (int)
+              3.24. use_contact (int)
               3.25. snd_time_avp (str)
               3.25. snd_time_avp (str)
               3.26. add_date (int)
               3.26. add_date (int)
               3.27. max_messages (int)
               3.27. max_messages (int)
@@ -89,28 +89,28 @@ Juha Heinanen
 
 
    1.1. Set the "db_url" parameter
    1.1. Set the "db_url" parameter
    1.2. Set the "db_table" parameter
    1.2. Set the "db_table" parameter
-   1.3. Set the "from_address" parameter
-   1.4. Set the "contact_hdr" parameter
-   1.5. Set the "extra_hdrs" parameter
-   1.6. Set the "offline_message" parameter
-   1.7. Set the "content_type_hdr" parameter
-   1.8. Set the "reminder" parameter
-   1.9. Set the "outbound_proxy" parameter
-   1.10. Set the "expire_time" parameter
-   1.11. Set the "check_time" parameter
-   1.12. Set the "send_time" parameter
-   1.13. Set the "clean_period" parameter
-   1.14. Set the "use_contact" parameter
-   1.15. Set the "sc_mid" parameter
-   1.16. Set the "sc_from" parameter
-   1.17. Set the "sc_to" parameter
-   1.18. Set the "sc_uri_user" parameter
-   1.19. Set the "sc_uri_host" parameter
-   1.20. Set the "sc_body" parameter
-   1.21. Set the "sc_ctype" parameter
-   1.22. Set the "sc_exp_time" parameter
-   1.23. Set the "sc_inc_time" parameter
-   1.24. Set the "sc_snd_time" parameter
+   1.3. Set the "sc_mid" parameter
+   1.4. Set the "sc_from" parameter
+   1.5. Set the "sc_to" parameter
+   1.6. Set the "sc_uri_user" parameter
+   1.7. Set the "sc_uri_host" parameter
+   1.8. Set the "sc_body" parameter
+   1.9. Set the "sc_ctype" parameter
+   1.10. Set the "sc_exp_time" parameter
+   1.11. Set the "sc_inc_time" parameter
+   1.12. Set the "sc_snd_time" parameter
+   1.13. Set the "from_address" parameter
+   1.14. Set the "contact_hdr" parameter
+   1.15. Set the "extra_hdrs" parameter
+   1.16. Set the "offline_message" parameter
+   1.17. Set the "content_type_hdr" parameter
+   1.18. Set the "reminder" parameter
+   1.19. Set the "outbound_proxy" parameter
+   1.20. Set the "expire_time" parameter
+   1.21. Set the "check_time" parameter
+   1.22. Set the "send_time" parameter
+   1.23. Set the "clean_period" parameter
+   1.24. Set the "use_contact" parameter
    1.25. Set the "snd_time_avp" parameter
    1.25. Set the "snd_time_avp" parameter
    1.26. Set the "add_date" parameter
    1.26. Set the "add_date" parameter
    1.27. Set the "max_messages" parameter
    1.27. Set the "max_messages" parameter
@@ -135,28 +135,28 @@ Chapter 1. Admin Guide
 
 
         3.1. db_url (string)
         3.1. db_url (string)
         3.2. db_table (string)
         3.2. db_table (string)
-        3.3. from_address (string)
-        3.4. contact_hdr (string)
-        3.5. extra_hdrs (string)
-        3.6. offline_message (string)
-        3.7. content_type_hdr (string)
-        3.8. reminder (string)
-        3.9. outbound_proxy (string)
-        3.10. expire_time (int)
-        3.11. check_time (int)
-        3.12. send_time (int)
-        3.13. clean_period (int)
-        3.14. use_contact (int)
-        3.15. sc_mid (string)
-        3.16. sc_from (string)
-        3.17. sc_to (string)
-        3.18. sc_uri_user (string)
-        3.19. sc_uri_host (string)
-        3.20. sc_body (string)
-        3.21. sc_ctype (string)
-        3.22. sc_exp_time (string)
-        3.23. sc_inc_time (string)
-        3.24. sc_snd_time (string)
+        3.3. sc_mid (string)
+        3.4. sc_from (string)
+        3.5. sc_to (string)
+        3.6. sc_uri_user (string)
+        3.7. sc_uri_host (string)
+        3.8. sc_body (string)
+        3.9. sc_ctype (string)
+        3.10. sc_exp_time (string)
+        3.11. sc_inc_time (string)
+        3.12. sc_snd_time (string)
+        3.13. from_address (string)
+        3.14. contact_hdr (string)
+        3.15. extra_hdrs (string)
+        3.16. offline_message (string)
+        3.17. content_type_hdr (string)
+        3.18. reminder (string)
+        3.19. outbound_proxy (string)
+        3.20. expire_time (int)
+        3.21. check_time (int)
+        3.22. send_time (int)
+        3.23. clean_period (int)
+        3.24. use_contact (int)
         3.25. snd_time_avp (str)
         3.25. snd_time_avp (str)
         3.26. add_date (int)
         3.26. add_date (int)
         3.27. max_messages (int)
         3.27. max_messages (int)
@@ -183,9 +183,10 @@ Chapter 1. Admin Guide
 
 
 1. Overview
 1. Overview
 
 
-   This modules provides offline message storage for the Kamailio SIP
-   Server Platform. It stores received messages for an offline user and
-   sends them when the user becomes online.
+   This module provides offline message storage for Kamailio SIP Server
+   Platform. It stores received messages for an offline user and sends
+   them when the user comes back online. It can also send reminders and
+   auto-expire messages.
 
 
    For each message, the modules stores "Request-URI" ("R-URI") only if it
    For each message, the modules stores "Request-URI" ("R-URI") only if it
    is a complete address of record ("username@hostname"), URI from "To"
    is a complete address of record ("username@hostname"), URI from "To"
@@ -194,20 +195,21 @@ Chapter 1. Admin Guide
    (it might be the contact address for current SIP session) the URI from
    (it might be the contact address for current SIP session) the URI from
    "To" header will be used as R-URI.
    "To" header will be used as R-URI.
 
 
-   When the expiration time passed, the message is discarded from
+   When the expiration time is passed, the message is discarded from
    database. Expiration time is computed based on incoming time and one of
    database. Expiration time is computed based on incoming time and one of
    the module's parameters.
    the module's parameters.
 
 
    Every time when a user registers with Kamailio, the module is looking
    Every time when a user registers with Kamailio, the module is looking
    in database for offline messages intended for that user. All of them
    in database for offline messages intended for that user. All of them
-   will be sent to contact address provided in REGISTER request.
+   will be sent to contact address provided in REGISTER request and then
+   be deleted.
 
 
-   It may happen that the SIP user to be registered use a SIP User Agent
-   that has no support for MESSAGE requests. In this case the
-   "failure_route" should be used to re-store the undelivered requests.
+   It may happen that the SIP user registering use a SIP User Agent that
+   has no support for MESSAGE requests. In this case the "failure_route"
+   should be used to re-store the undelivered requests.
 
 
-   Another functionality provided by the module is to send messages at a
-   certain time -- the reminder functionality. Using config logic, a
+   Another functionality provided by the MSILO module is to send messages
+   at a certain time -- the reminder functionality. Using config logic, a
    received message can be stored and delivered at a time specified while
    received message can be stored and delivered at a time specified while
    storing with the 'snd_time_avp'.
    storing with the 'snd_time_avp'.
 
 
@@ -234,28 +236,28 @@ Chapter 1. Admin Guide
 
 
    3.1. db_url (string)
    3.1. db_url (string)
    3.2. db_table (string)
    3.2. db_table (string)
-   3.3. from_address (string)
-   3.4. contact_hdr (string)
-   3.5. extra_hdrs (string)
-   3.6. offline_message (string)
-   3.7. content_type_hdr (string)
-   3.8. reminder (string)
-   3.9. outbound_proxy (string)
-   3.10. expire_time (int)
-   3.11. check_time (int)
-   3.12. send_time (int)
-   3.13. clean_period (int)
-   3.14. use_contact (int)
-   3.15. sc_mid (string)
-   3.16. sc_from (string)
-   3.17. sc_to (string)
-   3.18. sc_uri_user (string)
-   3.19. sc_uri_host (string)
-   3.20. sc_body (string)
-   3.21. sc_ctype (string)
-   3.22. sc_exp_time (string)
-   3.23. sc_inc_time (string)
-   3.24. sc_snd_time (string)
+   3.3. sc_mid (string)
+   3.4. sc_from (string)
+   3.5. sc_to (string)
+   3.6. sc_uri_user (string)
+   3.7. sc_uri_host (string)
+   3.8. sc_body (string)
+   3.9. sc_ctype (string)
+   3.10. sc_exp_time (string)
+   3.11. sc_inc_time (string)
+   3.12. sc_snd_time (string)
+   3.13. from_address (string)
+   3.14. contact_hdr (string)
+   3.15. extra_hdrs (string)
+   3.16. offline_message (string)
+   3.17. content_type_hdr (string)
+   3.18. reminder (string)
+   3.19. outbound_proxy (string)
+   3.20. expire_time (int)
+   3.21. check_time (int)
+   3.22. send_time (int)
+   3.23. clean_period (int)
+   3.24. use_contact (int)
    3.25. snd_time_avp (str)
    3.25. snd_time_avp (str)
    3.26. add_date (int)
    3.26. add_date (int)
    3.27. max_messages (int)
    3.27. max_messages (int)
@@ -285,273 +287,273 @@ modparam("msilo", "db_url", "mysql://user:[email protected]/dbname")
 modparam("msilo", "db_table", "silo")
 modparam("msilo", "db_table", "silo")
 ...
 ...
 
 
-3.3. from_address (string)
+3.3. sc_mid (string)
 
 
-   The SIP address used to inform users that destination of their message
-   is not online and the message will be delivered next time when that
-   user goes online. If the parameter is not set, the module will not send
-   any notification. It can contain pseudo-variables.
+   The name of the column in silo table used to store the message id.
 
 
-   Default value is "NULL".
+   Default value is "mid".
 
 
-   Example 1.3. Set the "from_address" parameter
+   Example 1.3. Set the "sc_mid" parameter
 ...
 ...
-modparam("msilo", "from_address", "sip:[email protected]")
-modparam("msilo", "from_address", "sip:[email protected]")
+modparam("msilo", "sc_mid", "other_mid")
 ...
 ...
 
 
-3.4. contact_hdr (string)
+3.4. sc_from (string)
 
 
-   The value of the "Contact" header (including header name and ending
-   \r\n) to be added in notification messages. It can contain
-   pseudo-variables.
+   The name of the column in silo table, storing the source address.
 
 
-   Default value is "NULL".
+   Default value is "src_addr".
 
 
-   Example 1.4. Set the "contact_hdr" parameter
+   Example 1.4. Set the "sc_from" parameter
 ...
 ...
-modparam("msilo", "contact_hdr", "Contact: <sip:[email protected]>\r\n")
+modparam("msilo", "sc_from", "source_address")
 ...
 ...
 
 
-3.5. extra_hdrs (string)
+3.5. sc_to (string)
 
 
-   Extra headers (each ending with \r\n) to be added in messages sent from
-   silo by m_dump. It can contain pseudo-variables.
+   The name of the column in silo table, storing the destination address.
 
 
-   Default value is "NULL".
+   Default value is "dst_addr".
 
 
-   Example 1.5. Set the "extra_hdrs" parameter
+   Example 1.5. Set the "sc_to" parameter
 ...
 ...
-modparam("msilo", "extra_hdrs", "X-Extra: $tu\r\nY-Extra: foo\r\n")
+modparam("msilo", "sc_to", "destination_address")
 ...
 ...
 
 
-3.6. offline_message (string)
+3.6. sc_uri_user (string)
 
 
-   The body of the notification message. It can contain pseudo-variables.
+   The name of the column in silo table, storing the user name.
 
 
-   Default value is "NULL".
+   Default value is "username".
 
 
-   Example 1.6. Set the "offline_message" parameter
+   Example 1.6. Set the "sc_uri_user" parameter
 ...
 ...
-modparam("msilo", "offline_message", "*** User $rU is offline!")
-modparam("msilo", "offline_message", "<em>I am offline!</em>")
+modparam("msilo", "sc_uri_user", "user")
 ...
 ...
 
 
-3.7. content_type_hdr (string)
+3.7. sc_uri_host (string)
 
 
-   The value of the Content-Type header (including header name and ending
-   \r\n) to be added in notification messages. It must reflect what the
-   'offline_message' contains. It can contain pseudo-variables.
+   The name of the column in silo table, storing the domain.
 
 
-   Default value is "NULL".
+   Default value is "domain".
 
 
-   Example 1.7. Set the "content_type_hdr" parameter
+   Example 1.7. Set the "sc_uri_host" parameter
 ...
 ...
-modparam("msilo", "content_type_hdr", "Content-Type: text/plain\r\n")
-modparam("msilo", "content_type_hdr", "Content-Type: text/html\r\n")
+modparam("msilo", "sc_uri_host", "domain")
 ...
 ...
 
 
-3.8. reminder (string)
+3.8. sc_body (string)
 
 
-   The SIP address used to send reminder messages. If this value is not
-   set, the reminder feature is disabled.
+   The name of the column storing the message body in silo table.
 
 
-   Default value is "NULL".
+   Default value is "body".
 
 
-   Example 1.8. Set the "reminder" parameter
+   Example 1.8. Set the "sc_body" parameter
 ...
 ...
-modparam("msilo", "reminder", "sip:[email protected]")
+modparam("msilo", "sc_body", "message_body")
 ...
 ...
 
 
-3.9. outbound_proxy (string)
+3.9. sc_ctype (string)
 
 
-   The SIP address used as next hop when sending the message. Very useful
-   when using Kamailio with a domain name not in DNS, or when using a
-   separate Kamailio instance for msilo processing. If not set, the
-   message will be sent to the address in destination URI.
+   The name of the column in silo table, storing content type.
 
 
-   Default value is "NULL".
+   Default value is "ctype".
 
 
-   Example 1.9. Set the "outbound_proxy" parameter
+   Example 1.9. Set the "sc_ctype" parameter
 ...
 ...
-modparam("msilo", "outbound_proxy", "sip:kamailio.org;transport=tcp")
+modparam("msilo", "sc_ctype", "content_type")
 ...
 ...
 
 
-3.10. expire_time (int)
+3.10. sc_exp_time (string)
 
 
-   Expire time of stored messages - seconds. When this time passed, the
-   message is silently discarded from database.
+   The name of the column in silo table, storing the expire time of the
+   message.
 
 
-   Default value is "259200 (72 hours = 3 days)".
+   Default value is "exp_time".
 
 
-   Example 1.10. Set the "expire_time" parameter
+   Example 1.10. Set the "sc_exp_time" parameter
 ...
 ...
-modparam("msilo", "expire_time", 36000)
+modparam("msilo", "sc_exp_time", "expire_time")
 ...
 ...
 
 
-3.11. check_time (int)
+3.11. sc_inc_time (string)
 
 
-   Timer interval to check if dumped messages are sent OK - seconds. The
-   module keeps each request send by itself for a new online user and if
-   the reply is 2xx then the message is deleted from database.
+   The name of the column in silo table, storing the incoming time of the
+   message.
 
 
-   Default value is "30".
+   Default value is "inc_time".
 
 
-   Example 1.11. Set the "check_time" parameter
+   Example 1.11. Set the "sc_inc_time" parameter
 ...
 ...
-modparam("msilo", "check_time", 10)
+modparam("msilo", "sc_inc_time", "incoming_time")
 ...
 ...
 
 
-3.12. send_time (int)
+3.12. sc_snd_time (string)
 
 
-   Timer interval in seconds to check if there are reminder messages. The
-   module takes all reminder messages that must be sent at that moment or
-   before that moment.
-
-   If the value is 0, the reminder feature is disabled.
+   The name of the column in silo table, storing the send time for the
+   reminder.
 
 
-   Default value is "0".
+   Default value is "snd_time".
 
 
-   Example 1.12. Set the "send_time" parameter
+   Example 1.12. Set the "sc_snd_time" parameter
 ...
 ...
-modparam("msilo", "send_time", 60)
+modparam("msilo", "sc_snd_time", "send_reminder_time")
 ...
 ...
 
 
-3.13. clean_period (int)
+3.13. from_address (string)
 
 
-   Number of "check_time" cycles when to check if there are expired
-   messages in database.
+   The SIP address used to inform users that destination of their message
+   is not online and the message will be delivered next time when that
+   user goes online. If the parameter is not set, the module will not send
+   any notification. This parameter may contain pseudo-variables.
 
 
-   Default value is "5".
+   Default value is "NULL".
 
 
-   Example 1.13. Set the "clean_period" parameter
+   Example 1.13. Set the "from_address" parameter
 ...
 ...
-modparam("msilo", "clean_period", 3)
+modparam("msilo", "from_address", "sip:[email protected]")
+modparam("msilo", "from_address", "sip:[email protected]")
 ...
 ...
 
 
-3.14. use_contact (int)
+3.14. contact_hdr (string)
 
 
-   Turns on/off the usage of the "Contact" address to send notification
-   back to sender whose message is stored by MSILO.
+   The value of the "Contact" header (including header name and ending
+   \r\n) to be added in notification messages. It can contain
+   pseudo-variables.
 
 
-   Default value is "1 (0 = off, 1 = on)".
+   Default value is "NULL".
 
 
-   Example 1.14. Set the "use_contact" parameter
+   Example 1.14. Set the "contact_hdr" parameter
 ...
 ...
-modparam("msilo", "use_contact", 0)
+modparam("msilo", "contact_hdr", "Contact: <sip:[email protected]>\r\n")
 ...
 ...
 
 
-3.15. sc_mid (string)
+3.15. extra_hdrs (string)
 
 
-   The name of the column in silo table, storing message id.
+   Extra headers (each ending with \r\n) to be added in messages sent from
+   silo by m_dump. It can contain pseudo-variables.
 
 
-   Default value is "mid".
+   Default value is "NULL".
 
 
-   Example 1.15. Set the "sc_mid" parameter
+   Example 1.15. Set the "extra_hdrs" parameter
 ...
 ...
-modparam("msilo", "sc_mid", "other_mid")
+modparam("msilo", "extra_hdrs", "X-Extra: $tu\r\nY-Extra: foo\r\n")
 ...
 ...
 
 
-3.16. sc_from (string)
+3.16. offline_message (string)
 
 
-   The name of the column in silo table, storing the source address.
+   The body of the notification message. It can contain pseudo-variables.
 
 
-   Default value is "src_addr".
+   Default value is "NULL".
 
 
-   Example 1.16. Set the "sc_from" parameter
+   Example 1.16. Set the "offline_message" parameter
 ...
 ...
-modparam("msilo", "sc_from", "source_address")
+modparam("msilo", "offline_message", "*** User $rU is offline!")
+modparam("msilo", "offline_message", "<em>I am offline!</em>")
 ...
 ...
 
 
-3.17. sc_to (string)
+3.17. content_type_hdr (string)
 
 
-   The name of the column in silo table, storing the destination address.
+   The value of the Content-Type header (including header name and ending
+   \r\n) to be added in notification messages. It must reflect what the
+   'offline_message' contains. It can contain pseudo-variables.
 
 
-   Default value is "dst_addr".
+   Default value is "NULL".
 
 
-   Example 1.17. Set the "sc_to" parameter
+   Example 1.17. Set the "content_type_hdr" parameter
 ...
 ...
-modparam("msilo", "sc_to", "destination_address")
+modparam("msilo", "content_type_hdr", "Content-Type: text/plain\r\n")
+modparam("msilo", "content_type_hdr", "Content-Type: text/html\r\n")
 ...
 ...
 
 
-3.18. sc_uri_user (string)
+3.18. reminder (string)
 
 
-   The name of the column in silo table, storing the user name.
+   The SIP address used to send reminder messages. If this value is not
+   set, the reminder feature is disabled.
 
 
-   Default value is "username".
+   Default value is "NULL".
 
 
-   Example 1.18. Set the "sc_uri_user" parameter
+   Example 1.18. Set the "reminder" parameter
 ...
 ...
-modparam("msilo", "sc_uri_user", "user")
+modparam("msilo", "reminder", "sip:[email protected]")
 ...
 ...
 
 
-3.19. sc_uri_host (string)
+3.19. outbound_proxy (string)
 
 
-   The name of the column in silo table, storing the domain.
+   The SIP address used as next hop when sending the message. Very useful
+   when using Kamailio with a domain name not in DNS, or when using a
+   separate Kamailio instance for msilo processing. If not set, the
+   message will be sent to the address in destination URI.
 
 
-   Default value is "domain".
+   Default value is "NULL".
 
 
-   Example 1.19. Set the "sc_uri_host" parameter
+   Example 1.19. Set the "outbound_proxy" parameter
 ...
 ...
-modparam("msilo", "sc_uri_host", "domain")
+modparam("msilo", "outbound_proxy", "sip:kamailio.org;transport=tcp")
 ...
 ...
 
 
-3.20. sc_body (string)
+3.20. expire_time (int)
 
 
-   The name of the column storing the message body in silo table.
+   Expire time of stored messages - seconds. When this time passed, the
+   message is silently discarded from database.
 
 
-   Default value is "body".
+   Default value is "259200 (72 hours = 3 days)".
 
 
-   Example 1.20. Set the "sc_body" parameter
+   Example 1.20. Set the "expire_time" parameter
 ...
 ...
-modparam("msilo", "sc_body", "message_body")
+modparam("msilo", "expire_time", 36000)
 ...
 ...
 
 
-3.21. sc_ctype (string)
+3.21. check_time (int)
 
 
-   The name of the column in silo table, storing content type.
+   Timer interval to check if dumped messages are sent OK - seconds. The
+   module keeps each request send by itself for a new online user and if
+   the reply is 2xx then the message is deleted from database.
 
 
-   Default value is "ctype".
+   Default value is "30".
 
 
-   Example 1.21. Set the "sc_ctype" parameter
+   Example 1.21. Set the "check_time" parameter
 ...
 ...
-modparam("msilo", "sc_ctype", "content_type")
+modparam("msilo", "check_time", 10)
 ...
 ...
 
 
-3.22. sc_exp_time (string)
+3.22. send_time (int)
 
 
-   The name of the column in silo table, storing the expire time of the
-   message.
+   Timer interval in seconds to check if there are reminder messages. The
+   module takes all reminder messages that must be sent at that moment or
+   before that moment.
 
 
-   Default value is "exp_time".
+   If the value is 0, the reminder feature is disabled.
+
+   Default value is "0".
 
 
-   Example 1.22. Set the "sc_exp_time" parameter
+   Example 1.22. Set the "send_time" parameter
 ...
 ...
-modparam("msilo", "sc_exp_time", "expire_time")
+modparam("msilo", "send_time", 60)
 ...
 ...
 
 
-3.23. sc_inc_time (string)
+3.23. clean_period (int)
 
 
-   The name of the column in silo table, storing the incoming time of the
-   message.
+   Number of "check_time" cycles when to check if there are expired
+   messages in database.
 
 
-   Default value is "inc_time".
+   Default value is "5".
 
 
-   Example 1.23. Set the "sc_inc_time" parameter
+   Example 1.23. Set the "clean_period" parameter
 ...
 ...
-modparam("msilo", "sc_inc_time", "incoming_time")
+modparam("msilo", "clean_period", 3)
 ...
 ...
 
 
-3.24. sc_snd_time (string)
+3.24. use_contact (int)
 
 
-   The name of the column in silo table, storing the send time for the
-   reminder.
+   Turns on/off the usage of the "Contact" address to send notification
+   back to sender whose message is stored by MSILO.
 
 
-   Default value is "snd_time".
+   Default value is "1 (0 = off, 1 = on)".
 
 
-   Example 1.24. Set the "sc_snd_time" parameter
+   Example 1.24. Set the "use_contact" parameter
 ...
 ...
-modparam("msilo", "sc_snd_time", "send_reminder_time")
+modparam("msilo", "use_contact", 0)
 ...
 ...
 
 
 3.25. snd_time_avp (str)
 3.25. snd_time_avp (str)
@@ -573,7 +575,7 @@ modparam("msilo", "snd_time_avp", "$avp(i:123)")
 
 
 3.26. add_date (int)
 3.26. add_date (int)
 
 
-   Wheter to add as prefix the date when the message was stored.
+   Whether to add as prefix the date when the message was stored.
 
 
    Default value is "1" (1==on/0==off).
    Default value is "1" (1==on/0==off).
 
 
@@ -666,8 +668,8 @@ m_store("$tu");
 
 
 4.2. m_dump([owner])
 4.2. m_dump([owner])
 
 
-   The method sends stored messages for the SIP user that is going to
-   register to his actual contact address. The method should be called
+   The method sends stored messages for the SIP user that has registerered
+   to the contact address in the registration. The method should be called
    when a REGISTER request is received and the "Expire" header has a value
    when a REGISTER request is received and the "Expire" header has a value
    greater than zero.
    greater than zero.
 
 
@@ -722,7 +724,6 @@ m_dump("$fu");
 
 
    Example 1.33. Kamailio config script - sample msilo usage
    Example 1.33. Kamailio config script - sample msilo usage
 ...
 ...
-# $Id$
 #
 #
 # MSILO usage example
 # MSILO usage example
 #
 #

+ 0 - 1
modules/msilo/doc/msilo.cfg

@@ -1,4 +1,3 @@
-# $Id$
 #
 #
 # MSILO usage example
 # MSILO usage example
 #
 #

+ 166 - 165
modules/msilo/doc/msilo_admin.xml

@@ -16,9 +16,10 @@
 	<section>
 	<section>
 	<title>Overview</title>
 	<title>Overview</title>
 	<para>
 	<para>
-		This modules provides offline message storage for the &kamailioname;. It 
+		This module provides offline message storage for &kamailioname;. It 
 		stores received messages for an offline user and sends them when the 
 		stores received messages for an offline user and sends them when the 
-		user becomes online.
+		user comes back online. It can also send reminders and auto-expire
+		messages.
 	</para>
 	</para>
 	<para>
 	<para>
 		For each message, the modules stores <quote>Request-URI</quote> 
 		For each message, the modules stores <quote>Request-URI</quote> 
@@ -31,22 +32,22 @@
 		from <quote>To</quote> header will be used as <abbrev>R-URI</abbrev>.
 		from <quote>To</quote> header will be used as <abbrev>R-URI</abbrev>.
 	</para>
 	</para>
 	<para>
 	<para>
-		When the expiration time passed, the message is discarded from 
+		When the expiration time is passed, the message is discarded from 
 		database.  Expiration time is computed based on incoming time and 
 		database.  Expiration time is computed based on incoming time and 
 		one of the module's parameters.
 		one of the module's parameters.
 	</para>
 	</para>
 	<para>
 	<para>
 		Every time when a user registers with &kamailio;, the module is looking in 
 		Every time when a user registers with &kamailio;, the module is looking in 
 		database for offline messages intended for that user. All of them will 
 		database for offline messages intended for that user. All of them will 
-		be sent to contact address provided in REGISTER request.
+		be sent to contact address provided in REGISTER request and then be deleted.
 	</para>
 	</para>
 	<para>
 	<para>
-		It may happen that the &sip; user to be registered use a  &sip; User Agent 
+		It may happen that the &sip; user registering use a &sip; User Agent 
 		that has no support for MESSAGE requests. In this case the <quote>failure_route</quote>
 		that has no support for MESSAGE requests. In this case the <quote>failure_route</quote>
 		should be used to re-store the undelivered requests.
 		should be used to re-store the undelivered requests.
 	</para>
 	</para>
 	<para>
 	<para>
-		Another functionality provided by the module is to send messages at
+		Another functionality provided by the MSILO module is to send messages at
 		a certain time -- the reminder functionality. Using config logic, a
 		a certain time -- the reminder functionality. Using config logic, a
 		received message can be stored and delivered at a time specified while
 		received message can be stored and delivered at a time specified while
 		storing with the 'snd_time_avp'.
 		storing with the 'snd_time_avp'.
@@ -132,13 +133,165 @@ modparam("msilo", "db_table", "silo")
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
+
+	<section id="msilo.p.sc_mid">
+		<title><varname>sc_mid</varname> (string)</title>
+		<para>
+		The name of the column in silo table used to store the message id. 
+		</para>
+		<para>Default value is <quote>mid</quote>.</para>
+		<example>
+		<title>Set the <quote>sc_mid</quote> parameter</title>
+<programlisting format="linespecific">
+...
+modparam("msilo", "sc_mid", "other_mid")
+...
+</programlisting>
+		</example>
+    </section>
+
+	<section id="msilo.p.sc_from">
+		<title><varname>sc_from</varname> (string)</title>
+		<para>
+		The name of the column in silo table, storing the source address. 
+		</para>
+		<para>Default value is <quote>src_addr</quote>.</para>
+		<example>
+		<title>Set the <quote>sc_from</quote> parameter</title>
+<programlisting format="linespecific">
+...
+modparam("msilo", "sc_from", "source_address")
+...
+</programlisting>
+		</example>
+    </section>
+	<section id="msilo.p.sc_to">
+		<title><varname>sc_to</varname> (string)</title>
+		<para>
+		The name of the column in silo table, storing the destination address. 
+		</para>
+		<para>Default value is <quote>dst_addr</quote>.</para>
+		<example>
+		<title>Set the <quote>sc_to</quote> parameter</title>
+<programlisting format="linespecific">
+...
+modparam("msilo", "sc_to", "destination_address")
+...
+</programlisting>
+		</example>
+    </section>
+	<section id="msilo.p.sc_uri_user">
+		<title><varname>sc_uri_user</varname> (string)</title>
+		<para>
+		The name of the column in silo table, storing the user name.
+		</para>
+		<para>Default value is <quote>username</quote>.</para>
+		<example>
+		<title>Set the <quote>sc_uri_user</quote> parameter</title>
+<programlisting format="linespecific">
+...
+modparam("msilo", "sc_uri_user", "user")
+...
+</programlisting>
+		</example>
+    </section>
+	<section id="msilo.p.sc_uri_host">
+		<title><varname>sc_uri_host</varname> (string)</title>
+		<para>
+		The name of the column in silo table, storing the domain. 
+		</para>
+		<para>Default value is <quote>domain</quote>.</para>
+		<example>
+		<title>Set the <quote>sc_uri_host</quote> parameter</title>
+         <programlisting format="linespecific">
+...
+modparam("msilo", "sc_uri_host", "domain")
+...
+</programlisting>
+		</example>
+    </section>
+	<section id="msilo.p.sc_body">
+		<title><varname>sc_body</varname> (string)</title>
+		<para>
+		The name of the column storing the message body in silo table. 
+		</para>
+		<para>Default value is <quote>body</quote>.</para>
+        <example>
+		<title>Set the <quote>sc_body</quote> parameter</title>
+        <programlisting format="linespecific">
+...
+modparam("msilo", "sc_body", "message_body")
+...
+</programlisting>
+		</example>
+    </section>
+	<section id="msilo.p.sc_ctype">
+		<title><varname>sc_ctype</varname> (string)</title>
+		<para>
+		The name of the column in silo table, storing content type.
+		</para>
+		<para>Default value is <quote>ctype</quote>.</para>
+        <example>
+		<title>Set the <quote>sc_ctype</quote> parameter</title>
+        <programlisting format="linespecific">
+...
+modparam("msilo", "sc_ctype", "content_type")
+...
+</programlisting>
+		</example>
+    </section>
+	<section id="msilo.p.sc_exp_time">
+		<title><varname>sc_exp_time</varname> (string)</title>
+		<para>
+		The name of the column in silo table, storing the expire time of the message. 
+		</para>
+		<para>Default value is <quote>exp_time</quote>.</para>
+        <example>
+		<title>Set the <quote>sc_exp_time</quote> parameter</title>
+        <programlisting format="linespecific">
+...
+modparam("msilo", "sc_exp_time", "expire_time")
+...
+</programlisting>
+		</example>
+    </section>
+	<section id="msilo.p.sc_inc_time">
+		<title><varname>sc_inc_time</varname> (string)</title>
+		<para>
+		The name of the column in silo table, storing the incoming time of the message. 
+		</para>
+		<para>Default value is <quote>inc_time</quote>.</para>
+        <example>
+		<title>Set the <quote>sc_inc_time</quote> parameter</title>
+        <programlisting format="linespecific">
+...
+modparam("msilo", "sc_inc_time", "incoming_time")
+...
+</programlisting>
+		</example>
+    </section>
+	<section id="msilo.p.sc_snd_time">
+		<title><varname>sc_snd_time</varname> (string)</title>
+		<para>
+		The name of the column in silo table, storing the send time for the reminder. 
+		</para>
+		<para>Default value is <quote>snd_time</quote>.</para>
+        <example>
+		<title>Set the <quote>sc_snd_time</quote> parameter</title>
+        <programlisting format="linespecific">
+...
+modparam("msilo", "sc_snd_time", "send_reminder_time")
+...
+</programlisting>
+		</example>
+    </section>
 	<section id="msilo.p.from_address">
 	<section id="msilo.p.from_address">
 		<title><varname>from_address</varname> (string)</title>
 		<title><varname>from_address</varname> (string)</title>
 		<para>
 		<para>
 		The &sip; address used to inform users that destination of their 
 		The &sip; address used to inform users that destination of their 
 		message is not online and the message will be delivered next time 
 		message is not online and the message will be delivered next time 
 		when that user goes online. If the parameter is not set, the module 
 		when that user goes online. If the parameter is not set, the module 
-		will not send any notification. It can contain pseudo-variables.
+		will not send any notification. This parameter may contain pseudo-variables.
 		</para>
 		</para>
 		<para>
 		<para>
 		<emphasis>
 		<emphasis>
@@ -180,7 +333,7 @@ modparam("msilo", "contact_hdr", "Contact: &lt;sip:[email protected]&gt;\r\n")
 		<title><varname>extra_hdrs</varname> (string)</title>
 		<title><varname>extra_hdrs</varname> (string)</title>
 		<para>
 		<para>
 		Extra headers (each ending with	\r\n) to be added in
 		Extra headers (each ending with	\r\n) to be added in
-	messages sent from silo by m_dump.
+		messages sent from silo by m_dump.
 		It can contain pseudo-variables.
 		It can contain pseudo-variables.
 		</para>
 		</para>
 		<para>
 		<para>
@@ -389,158 +542,6 @@ modparam("msilo", "use_contact", 0)
 		</example>
 		</example>
 	</section>
 	</section>
 
 
-	<section id="msilo.p.sc_mid">
-		<title><varname>sc_mid</varname> (string)</title>
-		<para>
-		The name of the column in silo table, storing message id. 
-		</para>
-		<para>Default value is <quote>mid</quote>.</para>
-		<example>
-		<title>Set the <quote>sc_mid</quote> parameter</title>
-<programlisting format="linespecific">
-...
-modparam("msilo", "sc_mid", "other_mid")
-...
-</programlisting>
-		</example>
-    </section>
-
-	<section id="msilo.p.sc_from">
-		<title><varname>sc_from</varname> (string)</title>
-		<para>
-		The name of the column in silo table, storing the source address. 
-		</para>
-		<para>Default value is <quote>src_addr</quote>.</para>
-		<example>
-		<title>Set the <quote>sc_from</quote> parameter</title>
-<programlisting format="linespecific">
-...
-modparam("msilo", "sc_from", "source_address")
-...
-</programlisting>
-		</example>
-    </section>
-	<section id="msilo.p.sc_to">
-		<title><varname>sc_to</varname> (string)</title>
-		<para>
-		The name of the column in silo table, storing the destination address. 
-		</para>
-		<para>Default value is <quote>dst_addr</quote>.</para>
-		<example>
-		<title>Set the <quote>sc_to</quote> parameter</title>
-<programlisting format="linespecific">
-...
-modparam("msilo", "sc_to", "destination_address")
-...
-</programlisting>
-		</example>
-    </section>
-	<section id="msilo.p.sc_uri_user">
-		<title><varname>sc_uri_user</varname> (string)</title>
-		<para>
-		The name of the column in silo table, storing the user name.
-		</para>
-		<para>Default value is <quote>username</quote>.</para>
-		<example>
-		<title>Set the <quote>sc_uri_user</quote> parameter</title>
-<programlisting format="linespecific">
-...
-modparam("msilo", "sc_uri_user", "user")
-...
-</programlisting>
-		</example>
-    </section>
-	<section id="msilo.p.sc_uri_host">
-		<title><varname>sc_uri_host</varname> (string)</title>
-		<para>
-		The name of the column in silo table, storing the domain. 
-		</para>
-		<para>Default value is <quote>domain</quote>.</para>
-		<example>
-		<title>Set the <quote>sc_uri_host</quote> parameter</title>
-         <programlisting format="linespecific">
-...
-modparam("msilo", "sc_uri_host", "domain")
-...
-</programlisting>
-		</example>
-    </section>
-	<section id="msilo.p.sc_body">
-		<title><varname>sc_body</varname> (string)</title>
-		<para>
-		The name of the column storing the message body in silo table. 
-		</para>
-		<para>Default value is <quote>body</quote>.</para>
-        <example>
-		<title>Set the <quote>sc_body</quote> parameter</title>
-        <programlisting format="linespecific">
-...
-modparam("msilo", "sc_body", "message_body")
-...
-</programlisting>
-		</example>
-    </section>
-	<section id="msilo.p.sc_ctype">
-		<title><varname>sc_ctype</varname> (string)</title>
-		<para>
-		The name of the column in silo table, storing content type.
-		</para>
-		<para>Default value is <quote>ctype</quote>.</para>
-        <example>
-		<title>Set the <quote>sc_ctype</quote> parameter</title>
-        <programlisting format="linespecific">
-...
-modparam("msilo", "sc_ctype", "content_type")
-...
-</programlisting>
-		</example>
-    </section>
-	<section id="msilo.p.sc_exp_time">
-		<title><varname>sc_exp_time</varname> (string)</title>
-		<para>
-		The name of the column in silo table, storing the expire time of the message. 
-		</para>
-		<para>Default value is <quote>exp_time</quote>.</para>
-        <example>
-		<title>Set the <quote>sc_exp_time</quote> parameter</title>
-        <programlisting format="linespecific">
-...
-modparam("msilo", "sc_exp_time", "expire_time")
-...
-</programlisting>
-		</example>
-    </section>
-	<section id="msilo.p.sc_inc_time">
-		<title><varname>sc_inc_time</varname> (string)</title>
-		<para>
-		The name of the column in silo table, storing the incoming time of the message. 
-		</para>
-		<para>Default value is <quote>inc_time</quote>.</para>
-        <example>
-		<title>Set the <quote>sc_inc_time</quote> parameter</title>
-        <programlisting format="linespecific">
-...
-modparam("msilo", "sc_inc_time", "incoming_time")
-...
-</programlisting>
-		</example>
-    </section>
-	<section id="msilo.p.sc_snd_time">
-		<title><varname>sc_snd_time</varname> (string)</title>
-		<para>
-		The name of the column in silo table, storing the send time for the reminder. 
-		</para>
-		<para>Default value is <quote>snd_time</quote>.</para>
-        <example>
-		<title>Set the <quote>sc_snd_time</quote> parameter</title>
-        <programlisting format="linespecific">
-...
-modparam("msilo", "sc_snd_time", "send_reminder_time")
-...
-</programlisting>
-		</example>
-    </section>
-
 	<section id="msilo.p.snd_time_avp">
 	<section id="msilo.p.snd_time_avp">
 		<title><varname>snd_time_avp</varname> (str)</title>
 		<title><varname>snd_time_avp</varname> (str)</title>
 		<para>
 		<para>
@@ -570,7 +571,7 @@ modparam("msilo", "snd_time_avp", "$avp(i:123)")
 	<section id="msilo.p.add_date">
 	<section id="msilo.p.add_date">
 		<title><varname>add_date</varname> (int)</title>
 		<title><varname>add_date</varname> (int)</title>
 		<para>
 		<para>
-		Wheter to add as prefix the date when the message was stored.
+		Whether to add as prefix the date when the message was stored.
 		</para>
 		</para>
 		<para>
 		<para>
 		<emphasis>
 		<emphasis>
@@ -721,10 +722,10 @@ m_store("$tu");
 	<section id="msilo.f.m_dump">
 	<section id="msilo.f.m_dump">
 		<title><function moreinfo="none">m_dump([owner])</function></title>
 		<title><function moreinfo="none">m_dump([owner])</function></title>
 		<para>
 		<para>
-		The method sends stored messages for the &sip; user that is going to 
-		register to his actual contact address. The method should be called 
-		when a REGISTER request is received and the <quote>Expire</quote> 
-		header has a value greater than zero.
+		The method sends stored messages for the &sip; user that has
+		registerered to the contact address in the registration. 
+		The method should be called when a REGISTER request is received
+		and the <quote>Expire</quote> header has a value greater than zero.
 		</para>
 		</para>
 		<para>Meaning of the parameters is as follows:</para>
 		<para>Meaning of the parameters is as follows:</para>
 		<itemizedlist>
 		<itemizedlist>