diff --git a/src/modules/msilo/README b/src/modules/msilo/README index 046a57ca068..649f0c71471 100644 --- a/src/modules/msilo/README +++ b/src/modules/msilo/README @@ -48,24 +48,27 @@ Juha Heinanen 3.11. sc_inc_time (string) 3.12. sc_snd_time (string) 3.13. sc_stored_hdrs (string) - 3.14. from_address (string) - 3.15. contact_hdr (string) - 3.16. extra_hdrs (string) - 3.17. offline_message (string) - 3.18. content_type_hdr (string) - 3.19. reminder (string) - 3.20. outbound_proxy (string) - 3.21. expire_time (int) - 3.22. check_time (int) - 3.23. send_time (int) - 3.24. clean_period (int) - 3.25. use_contact (int) - 3.26. snd_time_avp (str) - 3.27. add_date (int) - 3.28. max_messages (int) - 3.29. add_contact (int) - 3.30. extra_hdrs_avp (str) - 3.31. skip_notification_flag (int) + 3.14. sc_callid (string) + 3.15. sc_callid (string) + 3.16. from_address (string) + 3.17. contact_hdr (string) + 3.18. extra_hdrs (string) + 3.19. offline_message (string) + 3.20. content_type_hdr (string) + 3.21. reminder (string) + 3.22. outbound_proxy (string) + 3.23. expire_time (int) + 3.24. check_time (int) + 3.25. send_time (int) + 3.26. clean_period (int) + 3.27. use_contact (int) + 3.28. snd_time_avp (str) + 3.29. add_date (int) + 3.30. max_messages (int) + 3.31. add_contact (int) + 3.32. extra_hdrs_avp (str) + 3.33. skip_notification_flag (int) + 3.34. use_mode (int) 4. Functions @@ -100,28 +103,31 @@ Juha Heinanen 1.11. Set the “sc_inc_time” parameter 1.12. Set the “sc_snd_time” parameter 1.13. Set the “sc_stored_hdrs” parameter - 1.14. Set the “from_address” parameter - 1.15. Set the “contact_hdr” parameter - 1.16. Set the “extra_hdrs” parameter - 1.17. Set the “offline_message” parameter - 1.18. Set the “content_type_hdr” parameter - 1.19. Set the “reminder” parameter - 1.20. Set the “outbound_proxy” parameter - 1.21. Set the “expire_time” parameter - 1.22. Set the “check_time” parameter - 1.23. Set the “send_time” parameter - 1.24. Set the “clean_period” parameter - 1.25. Set the “use_contact” parameter - 1.26. Set the “snd_time_avp” parameter - 1.27. Set the “add_date” parameter - 1.28. Set the “max_messages” parameter - 1.29. Set the “add_contact” parameter - 1.30. Set the “extra_hdrs_avp” parameter - 1.31. Set the “skip_notification_flag” parameter - 1.32. m_store usage - 1.33. m_store_addrs usage - 1.34. m_dump usage - 1.35. Kamailio config script - sample msilo usage + 1.14. Set the “sc_callid” parameter + 1.15. Set the “sc_status” parameter + 1.16. Set the “from_address” parameter + 1.17. Set the “contact_hdr” parameter + 1.18. Set the “extra_hdrs” parameter + 1.19. Set the “offline_message” parameter + 1.20. Set the “content_type_hdr” parameter + 1.21. Set the “reminder” parameter + 1.22. Set the “outbound_proxy” parameter + 1.23. Set the “expire_time” parameter + 1.24. Set the “check_time” parameter + 1.25. Set the “send_time” parameter + 1.26. Set the “clean_period” parameter + 1.27. Set the “use_contact” parameter + 1.28. Set the “snd_time_avp” parameter + 1.29. Set the “add_date” parameter + 1.30. Set the “max_messages” parameter + 1.31. Set the “add_contact” parameter + 1.32. Set the “extra_hdrs_avp” parameter + 1.33. Set the “skip_notification_flag” parameter + 1.34. Set the “use_mode” parameter + 1.35. m_store usage + 1.36. m_store_addrs usage + 1.37. m_dump usage + 1.38. Kamailio config script - sample msilo usage Chapter 1. Admin Guide @@ -148,24 +154,27 @@ Chapter 1. Admin Guide 3.11. sc_inc_time (string) 3.12. sc_snd_time (string) 3.13. sc_stored_hdrs (string) - 3.14. from_address (string) - 3.15. contact_hdr (string) - 3.16. extra_hdrs (string) - 3.17. offline_message (string) - 3.18. content_type_hdr (string) - 3.19. reminder (string) - 3.20. outbound_proxy (string) - 3.21. expire_time (int) - 3.22. check_time (int) - 3.23. send_time (int) - 3.24. clean_period (int) - 3.25. use_contact (int) - 3.26. snd_time_avp (str) - 3.27. add_date (int) - 3.28. max_messages (int) - 3.29. add_contact (int) - 3.30. extra_hdrs_avp (str) - 3.31. skip_notification_flag (int) + 3.14. sc_callid (string) + 3.15. sc_callid (string) + 3.16. from_address (string) + 3.17. contact_hdr (string) + 3.18. extra_hdrs (string) + 3.19. offline_message (string) + 3.20. content_type_hdr (string) + 3.21. reminder (string) + 3.22. outbound_proxy (string) + 3.23. expire_time (int) + 3.24. check_time (int) + 3.25. send_time (int) + 3.26. clean_period (int) + 3.27. use_contact (int) + 3.28. snd_time_avp (str) + 3.29. add_date (int) + 3.30. max_messages (int) + 3.31. add_contact (int) + 3.32. extra_hdrs_avp (str) + 3.33. skip_notification_flag (int) + 3.34. use_mode (int) 4. Functions @@ -251,24 +260,27 @@ Chapter 1. Admin Guide 3.11. sc_inc_time (string) 3.12. sc_snd_time (string) 3.13. sc_stored_hdrs (string) - 3.14. from_address (string) - 3.15. contact_hdr (string) - 3.16. extra_hdrs (string) - 3.17. offline_message (string) - 3.18. content_type_hdr (string) - 3.19. reminder (string) - 3.20. outbound_proxy (string) - 3.21. expire_time (int) - 3.22. check_time (int) - 3.23. send_time (int) - 3.24. clean_period (int) - 3.25. use_contact (int) - 3.26. snd_time_avp (str) - 3.27. add_date (int) - 3.28. max_messages (int) - 3.29. add_contact (int) - 3.30. extra_hdrs_avp (str) - 3.31. skip_notification_flag (int) + 3.14. sc_callid (string) + 3.15. sc_callid (string) + 3.16. from_address (string) + 3.17. contact_hdr (string) + 3.18. extra_hdrs (string) + 3.19. offline_message (string) + 3.20. content_type_hdr (string) + 3.21. reminder (string) + 3.22. outbound_proxy (string) + 3.23. expire_time (int) + 3.24. check_time (int) + 3.25. send_time (int) + 3.26. clean_period (int) + 3.27. use_contact (int) + 3.28. snd_time_avp (str) + 3.29. add_date (int) + 3.30. max_messages (int) + 3.31. add_contact (int) + 3.32. extra_hdrs_avp (str) + 3.33. skip_notification_flag (int) + 3.34. use_mode (int) 3.1. db_url (string) @@ -416,7 +428,29 @@ modparam("msilo", "sc_snd_time", "send_reminder_time") modparam("msilo", "sc_stored_hdrs", "extra_headers") ... -3.14. from_address (string) +3.14. sc_callid (string) + + The name of the column in silo table, storing callid. + + Default value is “callid”. + + Example 1.14. Set the “sc_callid” parameter +... +modparam("msilo", "sc_callid", "call_id") +... + +3.15. sc_callid (string) + + The name of the column in silo table, storing status. + + Default value is “status”. + + Example 1.15. Set the “sc_status” parameter +... +modparam("msilo", "sc_status", "st") +... + +3.16. from_address (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 @@ -425,13 +459,13 @@ modparam("msilo", "sc_stored_hdrs", "extra_headers") Default value is “NULL”. - Example 1.14. Set the “from_address” parameter + Example 1.16. Set the “from_address” parameter ... modparam("msilo", "from_address", "sip:registrar@example.org") modparam("msilo", "from_address", "sip:$rU@example.org") ... -3.15. contact_hdr (string) +3.17. contact_hdr (string) The value of the “Contact” header (including header name and ending \r\n) to be added in notification messages. It can contain @@ -439,36 +473,36 @@ modparam("msilo", "from_address", "sip:$rU@example.org") Default value is “NULL”. - Example 1.15. Set the “contact_hdr” parameter + Example 1.17. Set the “contact_hdr” parameter ... modparam("msilo", "contact_hdr", "Contact: \r\n") ... -3.16. extra_hdrs (string) +3.18. extra_hdrs (string) 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 “NULL”. - Example 1.16. Set the “extra_hdrs” parameter + Example 1.18. Set the “extra_hdrs” parameter ... modparam("msilo", "extra_hdrs", "X-Extra: $tu\r\nY-Extra: foo\r\n") ... -3.17. offline_message (string) +3.19. offline_message (string) The body of the notification message. It can contain pseudo-variables. Default value is “NULL”. - Example 1.17. Set the “offline_message” parameter + Example 1.19. Set the “offline_message” parameter ... modparam("msilo", "offline_message", "*** User $rU is offline!") modparam("msilo", "offline_message", "I am offline!") ... -3.18. content_type_hdr (string) +3.20. content_type_hdr (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 @@ -476,25 +510,25 @@ modparam("msilo", "offline_message", "I am offline!") Default value is “NULL”. - Example 1.18. Set the “content_type_hdr” parameter + Example 1.20. Set the “content_type_hdr” parameter ... modparam("msilo", "content_type_hdr", "Content-Type: text/plain\r\n") modparam("msilo", "content_type_hdr", "Content-Type: text/html\r\n") ... -3.19. reminder (string) +3.21. reminder (string) The SIP address used to send reminder messages. If this value is not set, the reminder feature is disabled. Default value is “NULL”. - Example 1.19. Set the “reminder” parameter + Example 1.21. Set the “reminder” parameter ... modparam("msilo", "reminder", "sip:registrar@example.org") ... -3.20. outbound_proxy (string) +3.22. outbound_proxy (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 @@ -503,24 +537,24 @@ modparam("msilo", "reminder", "sip:registrar@example.org") Default value is “NULL”. - Example 1.20. Set the “outbound_proxy” parameter + Example 1.22. Set the “outbound_proxy” parameter ... modparam("msilo", "outbound_proxy", "sip:kamailio.org;transport=tcp") ... -3.21. expire_time (int) +3.23. expire_time (int) Expire time of stored messages - seconds. When this time passed, the message is silently discarded from database. Default value is “259200 (72 hours = 3 days)”. - Example 1.21. Set the “expire_time” parameter + Example 1.23. Set the “expire_time” parameter ... modparam("msilo", "expire_time", 36000) ... -3.22. check_time (int) +3.24. check_time (int) 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 @@ -528,12 +562,12 @@ modparam("msilo", "expire_time", 36000) Default value is “60”. - Example 1.22. Set the “check_time” parameter + Example 1.24. Set the “check_time” parameter ... modparam("msilo", "check_time", 10) ... -3.23. send_time (int) +3.25. send_time (int) 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 @@ -543,36 +577,36 @@ modparam("msilo", "check_time", 10) Default value is “0”. - Example 1.23. Set the “send_time” parameter + Example 1.25. Set the “send_time” parameter ... modparam("msilo", "send_time", 60) ... -3.24. clean_period (int) +3.26. clean_period (int) Number of “check_time” cycles when to check if there are expired messages in database. Default value is “10”. - Example 1.24. Set the “clean_period” parameter + Example 1.26. Set the “clean_period” parameter ... modparam("msilo", "clean_period", 3) ... -3.25. use_contact (int) +3.27. use_contact (int) Turns on/off the usage of the “Contact” address to send notification back to sender whose message is stored by MSILO. Default value is “1 (0 = off, 1 = on)”. - Example 1.25. Set the “use_contact” parameter + Example 1.27. Set the “use_contact” parameter ... modparam("msilo", "use_contact", 0) ... -3.26. snd_time_avp (str) +3.28. snd_time_avp (str) The name of an AVP which may contain the time when to send the received message as reminder. The AVP is used only by m_store(). @@ -584,47 +618,47 @@ modparam("msilo", "use_contact", 0) Default value is “null”. - Example 1.26. Set the “snd_time_avp” parameter + Example 1.28. Set the “snd_time_avp” parameter ... modparam("msilo", "snd_time_avp", "$avp(i:123)") ... -3.27. add_date (int) +3.29. add_date (int) Whether to add as prefix the date when the message was stored. Default value is “1” (1==on/0==off). - Example 1.27. Set the “add_date” parameter + Example 1.29. Set the “add_date” parameter ... modparam("msilo", "add_date", 0) ... -3.28. max_messages (int) +3.30. max_messages (int) Maximum number of stored message for an AoR. Value 0 equals to no limit. Default value is 0. - Example 1.28. Set the “max_messages” parameter + Example 1.30. Set the “max_messages” parameter ... modparam("msilo", "max_messages", 0) ... -3.29. add_contact (int) +3.31. add_contact (int) Whether to add contact header to generated messages. The contact address is the From URI. Default value is “0” (1==on; 0==off as per RFC3428). - Example 1.29. Set the “add_contact” parameter + Example 1.31. Set the “add_contact” parameter ... modparam("msilo", "add_contact", 1) ... -3.30. extra_hdrs_avp (str) +3.32. extra_hdrs_avp (str) Name of an AVP which may contain extra headers that are stored with the message when m_store() is called. These extra headers (if any) are then @@ -635,19 +669,19 @@ modparam("msilo", "add_contact", 1) Default value is “null”. - Example 1.30. Set the “extra_hdrs_avp” parameter + Example 1.32. Set the “extra_hdrs_avp” parameter ... modparam("msilo", "extra_hdrs_avp", "$avp(msilo_extra_hdrs)") ... -3.31. skip_notification_flag (int) +3.33. skip_notification_flag (int) Flag to mark the message for which no notification should be sent back to sender when storing in msilo. Valid value is in between 0 and 31. Default value is “-1” (feature disabled). - Example 1.31. Set the “skip_notification_flag” parameter + Example 1.33. Set the “skip_notification_flag” parameter ... modparam("msilo", "skip_notification_flag", 18) ... @@ -655,6 +689,18 @@ setflag(18); m_store(...); ... +3.34. use_mode (int) + + If set to 1, the call-id header of incoming MESSAGE is stored and + reused later for delivery MESSAGE. + + Default value is “0”. + + Example 1.34. Set the “use_mode” parameter +... +modparam("msilo", "use_mode", 1) +... + 4. Functions 4.1. m_store([owner]) @@ -677,7 +723,7 @@ m_store(...); This function can be used from REQUEST_ROUTE, FAILURE_ROUTE. - Example 1.32. m_store usage + Example 1.35. m_store usage ... m_store(); m_store("$tu"); @@ -699,7 +745,7 @@ m_store("$tu"); This function can be used from REQUEST_ROUTE, FAILURE_ROUTE. - Example 1.33. m_store_addrs usage + Example 1.36. m_store_addrs usage ... m_store_addrs("sip:$rU@a.com", "sip:$fU@a.com", "sip:$tU@a.com"); ... @@ -718,7 +764,7 @@ m_store_addrs("sip:$rU@a.com", "sip:$fU@a.com", "sip:$tU@a.com"); This function can be used from REQUEST_ROUTE. - Example 1.34. m_dump usage + Example 1.37. m_dump usage ... m_dump(); m_dump("$fu"); @@ -760,7 +806,7 @@ m_dump("$fu"); Next picture displays a sample usage of msilo. - Example 1.35. Kamailio config script - sample msilo usage + Example 1.38. Kamailio config script - sample msilo usage ... # # MSILO usage example