Jelajahi Sumber

acc: time_format parameter documentation

- eclosed exaples in dotted lines like in most modules to highlight them
  on text output
Daniel-Constantin Mierla 12 tahun lalu
induk
melakukan
88e2da3c54
2 mengubah file dengan 264 tambahan dan 10 penghapusan
  1. 130 9
      modules/acc/README
  2. 134 1
      modules/acc/doc/acc_admin.xml

+ 130 - 9
modules/acc/README

@@ -130,6 +130,7 @@ Sven Knoblich
               6.47. time_mode (int)
               6.47. time_mode (int)
               6.48. time_attr (str)
               6.48. time_attr (str)
               6.49. time_exten (str)
               6.49. time_exten (str)
+              6.50. time_format (str)
 
 
         7. Functions
         7. Functions
 
 
@@ -191,10 +192,11 @@ Sven Knoblich
    1.47. time_mode example
    1.47. time_mode example
    1.48. time_attr example
    1.48. time_attr example
    1.49. time_exten example
    1.49. time_exten example
-   1.50. acc_log_request usage
-   1.51. acc_db_request usage
-   1.52. acc_rad_request usage
-   1.53. acc_diam_request usage
+   1.50. time_format example
+   1.51. acc_log_request usage
+   1.52. acc_db_request usage
+   1.53. acc_rad_request usage
+   1.54. acc_diam_request usage
 
 
 Chapter 1. Admin Guide
 Chapter 1. Admin Guide
 
 
@@ -288,6 +290,7 @@ Chapter 1. Admin Guide
         6.47. time_mode (int)
         6.47. time_mode (int)
         6.48. time_attr (str)
         6.48. time_attr (str)
         6.49. time_exten (str)
         6.49. time_exten (str)
+        6.50. time_format (str)
 
 
    7. Functions
    7. Functions
 
 
@@ -601,6 +604,7 @@ Note
 
 
 4.3.2.1. Example for a spiraled Proxy
 4.3.2.1. Example for a spiraled Proxy
 
 
+...
 # A calls B (transaction 1)
 # A calls B (transaction 1)
 $avp(caller)='A'
 $avp(caller)='A'
 $avp(callee)='B';
 $avp(callee)='B';
@@ -619,6 +623,7 @@ $dlg_var(chain)=$dlg_var(chain) + "|" + "C;cfnr;D";
 # C confirms call (200 reply of transaction 2)
 # C confirms call (200 reply of transaction 2)
 $dlg_var(caller) = $avp(caller); #caller='B'
 $dlg_var(caller) = $avp(caller); #caller='B'
 $dlg_var(callee) = $avp(callee); #callee='C'
 $dlg_var(callee) = $avp(callee); #callee='C'
+...
 
 
 4.3.3. Logged data
 4.3.3. Logged data
 
 
@@ -699,6 +704,7 @@ $dlg_var(callee) = $avp(callee); #callee='C'
    6.47. time_mode (int)
    6.47. time_mode (int)
    6.48. time_attr (str)
    6.48. time_attr (str)
    6.49. time_exten (str)
    6.49. time_exten (str)
+   6.50. time_format (str)
 
 
 6.1. early_media (integer)
 6.1. early_media (integer)
 
 
@@ -707,7 +713,9 @@ $dlg_var(callee) = $avp(callee); #callee='C'
    Default value is 0 (no).
    Default value is 0 (no).
 
 
    Example 1.1. early_media example
    Example 1.1. early_media example
+...
 modparam("acc", "early_media", 1)
 modparam("acc", "early_media", 1)
+...
 
 
 6.2. failed_transaction_flag (integer)
 6.2. failed_transaction_flag (integer)
 
 
@@ -717,7 +725,9 @@ modparam("acc", "early_media", 1)
    Default value is not-set (no flag).
    Default value is not-set (no flag).
 
 
    Example 1.2. failed_transaction_flag example
    Example 1.2. failed_transaction_flag example
+...
 modparam("acc", "failed_transaction_flag", 4)
 modparam("acc", "failed_transaction_flag", 4)
+...
 
 
 6.3. failed_filter (string)
 6.3. failed_filter (string)
 
 
@@ -728,7 +738,9 @@ modparam("acc", "failed_transaction_flag", 4)
    Default value is not-set (failure filtering is off).
    Default value is not-set (failure filtering is off).
 
 
    Example 1.3. failed_filter example
    Example 1.3. failed_filter example
+...
 modparam("acc", "failed_filter", "404,407")
 modparam("acc", "failed_filter", "404,407")
+...
 
 
 6.4. report_ack (integer)
 6.4. report_ack (integer)
 
 
@@ -740,7 +752,9 @@ modparam("acc", "failed_filter", "404,407")
    Default value is 0 (no).
    Default value is 0 (no).
 
 
    Example 1.4. report_ack example
    Example 1.4. report_ack example
+...
 modparam("acc", "report_ack", 1)
 modparam("acc", "report_ack", 1)
+...
 
 
 6.5. report_cancels (integer)
 6.5. report_cancels (integer)
 
 
@@ -751,7 +765,9 @@ modparam("acc", "report_ack", 1)
    Default value is 0 (no).
    Default value is 0 (no).
 
 
    Example 1.5. report_cancels example
    Example 1.5. report_cancels example
+...
 modparam("acc", "report_cancels", 1)
 modparam("acc", "report_cancels", 1)
+...
 
 
 6.6. detect_direction (integer)
 6.6. detect_direction (integer)
 
 
@@ -766,7 +782,9 @@ modparam("acc", "report_cancels", 1)
    Default value is 0 (disabled).
    Default value is 0 (disabled).
 
 
    Example 1.6. detect_direction example
    Example 1.6. detect_direction example
+...
 modparam("acc", "detect_direction", 1)
 modparam("acc", "detect_direction", 1)
+...
 
 
 6.7. acc_prepare_flag (integer)
 6.7. acc_prepare_flag (integer)
 
 
@@ -780,7 +798,9 @@ modparam("acc", "detect_direction", 1)
    Default value is not-set (no flag).
    Default value is not-set (no flag).
 
 
    Example 1.7. acc_prepare_flag example
    Example 1.7. acc_prepare_flag example
+...
 modparam("acc", "acc_prepare_flag", 5)
 modparam("acc", "acc_prepare_flag", 5)
+...
 
 
 6.8. multi_leg_info (string)
 6.8. multi_leg_info (string)
 
 
@@ -793,6 +813,7 @@ modparam("acc", "acc_prepare_flag", 5)
    Default value is 0 (disabled).
    Default value is 0 (disabled).
 
 
    Example 1.8. multi_leg_info example
    Example 1.8. multi_leg_info example
+...
 # for syslog-based accounting, use any text you want to be printed
 # for syslog-based accounting, use any text you want to be printed
 modparam("acc", "multi_leg_info",
 modparam("acc", "multi_leg_info",
     "text1=$avp(src);text2=$avp(dst)")
     "text1=$avp(src);text2=$avp(dst)")
@@ -805,6 +826,7 @@ modparam("acc", "multi_leg_info",
 # for DIAMETER-based accounting, use the DIAMETER AVP ID (as integer)
 # for DIAMETER-based accounting, use the DIAMETER AVP ID (as integer)
 modparam("acc", "multi_leg_info",
 modparam("acc", "multi_leg_info",
     "2345=$avp(src);2346=$avp(dst)")
     "2345=$avp(src);2346=$avp(dst)")
+...
 
 
 6.9. log_flag (integer)
 6.9. log_flag (integer)
 
 
@@ -813,7 +835,9 @@ modparam("acc", "multi_leg_info",
    Default value is not-set (no flag).
    Default value is not-set (no flag).
 
 
    Example 1.9. log_flag example
    Example 1.9. log_flag example
+...
 modparam("acc", "log_flag", 2)
 modparam("acc", "log_flag", 2)
+...
 
 
 6.10. log_missed_flag (integer)
 6.10. log_missed_flag (integer)
 
 
@@ -822,7 +846,9 @@ modparam("acc", "log_flag", 2)
    Default value is not-set (no flag).
    Default value is not-set (no flag).
 
 
    Example 1.10. log_missed_flag example
    Example 1.10. log_missed_flag example
+...
 modparam("acc", "log_missed_flag", 3)
 modparam("acc", "log_missed_flag", 3)
+...
 
 
 6.11. log_level (integer)
 6.11. log_level (integer)
 
 
@@ -831,7 +857,9 @@ modparam("acc", "log_missed_flag", 3)
    Default value is L_NOTICE.
    Default value is L_NOTICE.
 
 
    Example 1.11. log_level example
    Example 1.11. log_level example
+...
 modparam("acc", "log_level", 2)   # Set log_level to 2
 modparam("acc", "log_level", 2)   # Set log_level to 2
+...
 
 
 6.12. log_facility (string)
 6.12. log_facility (string)
 
 
@@ -842,7 +870,9 @@ modparam("acc", "log_level", 2)   # Set log_level to 2
    Default value is LOG_DAEMON.
    Default value is LOG_DAEMON.
 
 
    Example 1.12. log_facility example
    Example 1.12. log_facility example
+...
 modparam("acc", "log_facility", "LOG_DAEMON")
 modparam("acc", "log_facility", "LOG_DAEMON")
+...
 
 
 6.13. log_extra (string)
 6.13. log_extra (string)
 
 
@@ -852,7 +882,9 @@ modparam("acc", "log_facility", "LOG_DAEMON")
    Default value is NULL.
    Default value is NULL.
 
 
    Example 1.13. log_extra example
    Example 1.13. log_extra example
+...
 modparam("acc", "log_extra", "ua=$hdr(User-Agent);uuid=$avp(i:123)")
 modparam("acc", "log_extra", "ua=$hdr(User-Agent);uuid=$avp(i:123)")
+...
 
 
 6.14. radius_config (string)
 6.14. radius_config (string)
 
 
@@ -868,7 +900,9 @@ modparam("acc", "log_extra", "ua=$hdr(User-Agent);uuid=$avp(i:123)")
    Default value is "NULL".
    Default value is "NULL".
 
 
    Example 1.14. radius_config example
    Example 1.14. radius_config example
+...
 modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
 modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
+...
 
 
 6.15. radius_flag (integer)
 6.15. radius_flag (integer)
 
 
@@ -878,7 +912,9 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
    Default value is not-set (no flag).
    Default value is not-set (no flag).
 
 
    Example 1.15. radius_flag example
    Example 1.15. radius_flag example
+...
 modparam("acc", "radius_flag", 2)
 modparam("acc", "radius_flag", 2)
+...
 
 
 6.16. radius_missed_flag (integer)
 6.16. radius_missed_flag (integer)
 
 
@@ -888,7 +924,9 @@ modparam("acc", "radius_flag", 2)
    Default value is not-set (no flag).
    Default value is not-set (no flag).
 
 
    Example 1.16. radius_missed_flag example
    Example 1.16. radius_missed_flag example
+...
 modparam("acc", "radius_missed_flag", 3)
 modparam("acc", "radius_missed_flag", 3)
+...
 
 
 6.17. service_type (integer)
 6.17. service_type (integer)
 
 
@@ -897,7 +935,9 @@ modparam("acc", "radius_missed_flag", 3)
    Default value is 15 (SIP).
    Default value is 15 (SIP).
 
 
    Example 1.17. service_type example
    Example 1.17. service_type example
+...
 modparam("acc", "service_type", 16)
 modparam("acc", "service_type", 16)
+...
 
 
 6.18. radius_extra (string)
 6.18. radius_extra (string)
 
 
@@ -907,7 +947,9 @@ modparam("acc", "service_type", 16)
    Default value is NULL.
    Default value is NULL.
 
 
    Example 1.18. radius_extra example
    Example 1.18. radius_extra example
+...
 modparam("acc", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
 modparam("acc", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
+...
 
 
 6.19. db_flag (integer)
 6.19. db_flag (integer)
 
 
@@ -917,7 +959,9 @@ modparam("acc", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
    Default value is not-set (no flag).
    Default value is not-set (no flag).
 
 
    Example 1.19. db_flag example
    Example 1.19. db_flag example
+...
 modparam("acc", "db_flag", 2)
 modparam("acc", "db_flag", 2)
+...
 
 
 6.20. db_missed_flag (integer)
 6.20. db_missed_flag (integer)
 
 
@@ -927,7 +971,9 @@ modparam("acc", "db_flag", 2)
    Default value is not-set (no flag).
    Default value is not-set (no flag).
 
 
    Example 1.20. db_missed_flag example
    Example 1.20. db_missed_flag example
+...
 modparam("acc", "db_missed_flag", 3)
 modparam("acc", "db_missed_flag", 3)
+...
 
 
 6.21. db_table_acc (string)
 6.21. db_table_acc (string)
 
 
@@ -937,8 +983,10 @@ modparam("acc", "db_missed_flag", 3)
    Default value is "acc"
    Default value is "acc"
 
 
    Example 1.21. db_table_acc example
    Example 1.21. db_table_acc example
+...
 modparam("acc", "db_table_acc", "myacc_table")
 modparam("acc", "db_table_acc", "myacc_table")
 modparam("acc", "db_table_acc", "acc_$time(year)_$time(mon)")
 modparam("acc", "db_table_acc", "acc_$time(year)_$time(mon)")
+...
 
 
 6.22. db_table_missed_calls (string)
 6.22. db_table_missed_calls (string)
 
 
@@ -948,7 +996,9 @@ modparam("acc", "db_table_acc", "acc_$time(year)_$time(mon)")
    Default value is "missed_calls"
    Default value is "missed_calls"
 
 
    Example 1.22. db_table_missed_calls example
    Example 1.22. db_table_missed_calls example
+...
 modparam("acc", "db_table_missed_calls", "myMC_table")
 modparam("acc", "db_table_missed_calls", "myMC_table")
+...
 
 
 6.23. db_url (string)
 6.23. db_url (string)
 
 
@@ -958,7 +1008,9 @@ modparam("acc", "db_table_missed_calls", "myMC_table")
    Default value is "NULL" (SQL disabled).
    Default value is "NULL" (SQL disabled).
 
 
    Example 1.23. db_url example
    Example 1.23. db_url example
+...
 modparam("acc", "db_url", "mysql://user:password@localhost/kamailio")
 modparam("acc", "db_url", "mysql://user:password@localhost/kamailio")
+...
 
 
 6.24. acc_method_column (string)
 6.24. acc_method_column (string)
 
 
@@ -968,7 +1020,9 @@ modparam("acc", "db_url", "mysql://user:password@localhost/kamailio")
    Default value is "method".
    Default value is "method".
 
 
    Example 1.24. acc_method_column example
    Example 1.24. acc_method_column example
+...
 modparam("acc", "acc_method_column", "method")
 modparam("acc", "acc_method_column", "method")
+...
 
 
 6.25. acc_from_tag_column (string)
 6.25. acc_from_tag_column (string)
 
 
@@ -977,7 +1031,9 @@ modparam("acc", "acc_method_column", "method")
    Default value is "from_tag".
    Default value is "from_tag".
 
 
    Example 1.25. acc_from_tag_column example
    Example 1.25. acc_from_tag_column example
+...
 modparam("acc", "acc_from_tag_column", "from_tag")
 modparam("acc", "acc_from_tag_column", "from_tag")
+...
 
 
 6.26. acc_to_tag_column (string)
 6.26. acc_to_tag_column (string)
 
 
@@ -986,7 +1042,9 @@ modparam("acc", "acc_from_tag_column", "from_tag")
    Default value is "to_tag".
    Default value is "to_tag".
 
 
    Example 1.26. acc_to_tag_column example
    Example 1.26. acc_to_tag_column example
+...
 modparam("acc", "acc_to_tag_column", "to_tag")
 modparam("acc", "acc_to_tag_column", "to_tag")
+...
 
 
 6.27. acc_callid_column (string)
 6.27. acc_callid_column (string)
 
 
@@ -995,7 +1053,9 @@ modparam("acc", "acc_to_tag_column", "to_tag")
    Default value is "callid".
    Default value is "callid".
 
 
    Example 1.27. acc_callid_column example
    Example 1.27. acc_callid_column example
+...
 modparam("acc", "acc_callid_column", "callid")
 modparam("acc", "acc_callid_column", "callid")
+...
 
 
 6.28. acc_sip_code_column (string)
 6.28. acc_sip_code_column (string)
 
 
@@ -1005,7 +1065,9 @@ modparam("acc", "acc_callid_column", "callid")
    Default value is "sip_code".
    Default value is "sip_code".
 
 
    Example 1.28. acc_sip_code_column example
    Example 1.28. acc_sip_code_column example
+...
 modparam("acc", "acc_sip_code_column", "sip_code")
 modparam("acc", "acc_sip_code_column", "sip_code")
+...
 
 
 6.29. acc_sip_reason_column (string)
 6.29. acc_sip_reason_column (string)
 
 
@@ -1015,7 +1077,9 @@ modparam("acc", "acc_sip_code_column", "sip_code")
    Default value is "sip_reason".
    Default value is "sip_reason".
 
 
    Example 1.29. acc_sip_reason_column example
    Example 1.29. acc_sip_reason_column example
+...
 modparam("acc", "acc_sip_reason_column", "sip_reason")
 modparam("acc", "acc_sip_reason_column", "sip_reason")
+...
 
 
 6.30. acc_time_column (string)
 6.30. acc_time_column (string)
 
 
@@ -1025,7 +1089,9 @@ modparam("acc", "acc_sip_reason_column", "sip_reason")
    Default value is "time".
    Default value is "time".
 
 
    Example 1.30. acc_time_column example
    Example 1.30. acc_time_column example
+...
 modparam("acc", "acc_time_column", "time")
 modparam("acc", "acc_time_column", "time")
+...
 
 
 6.31. db_extra (string)
 6.31. db_extra (string)
 
 
@@ -1035,7 +1101,9 @@ modparam("acc", "acc_time_column", "time")
    Default value is NULL.
    Default value is NULL.
 
 
    Example 1.31. db_extra example
    Example 1.31. db_extra example
+...
 modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
 modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
+...
 
 
 6.32. db_insert_mode (integer)
 6.32. db_insert_mode (integer)
 
 
@@ -1046,7 +1114,9 @@ modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
    Default value is 0 (no INSERT DELAYED).
    Default value is 0 (no INSERT DELAYED).
 
 
    Example 1.32. db_insert_mode example
    Example 1.32. db_insert_mode example
+...
 modparam("acc", "db_insert_mode", 1)
 modparam("acc", "db_insert_mode", 1)
+...
 
 
 6.33. diameter_flag (integer)
 6.33. diameter_flag (integer)
 
 
@@ -1056,7 +1126,9 @@ modparam("acc", "db_insert_mode", 1)
    Default value is not-set (no flag).
    Default value is not-set (no flag).
 
 
    Example 1.33. diameter_flag example
    Example 1.33. diameter_flag example
+...
 modparam("acc", "diameter_flag", 2)
 modparam("acc", "diameter_flag", 2)
+...
 
 
 6.34. diameter_missed_flag (integer)
 6.34. diameter_missed_flag (integer)
 
 
@@ -1066,7 +1138,9 @@ modparam("acc", "diameter_flag", 2)
    Default value is not-set (no flag).
    Default value is not-set (no flag).
 
 
    Example 1.34. diameter_missed_flag example
    Example 1.34. diameter_missed_flag example
+...
 modparam("acc", "diameter_missed_flag", 3)
 modparam("acc", "diameter_missed_flag", 3)
+...
 
 
 6.35. diameter_client_host (string)
 6.35. diameter_client_host (string)
 
 
@@ -1076,7 +1150,9 @@ modparam("acc", "diameter_missed_flag", 3)
    Default value is "localhost".
    Default value is "localhost".
 
 
    Example 1.35. diameter_client_host example
    Example 1.35. diameter_client_host example
+...
 modparam("acc", "diameter_client_host", "3a_server.net")
 modparam("acc", "diameter_client_host", "3a_server.net")
+...
 
 
 6.36. diameter_client_port (int)
 6.36. diameter_client_port (int)
 
 
@@ -1086,7 +1162,9 @@ modparam("acc", "diameter_client_host", "3a_server.net")
    Default value is 3000.
    Default value is 3000.
 
 
    Example 1.36. diameter_client_host example
    Example 1.36. diameter_client_host example
+...
 modparam("acc", "diameter_client_port", 3000)
 modparam("acc", "diameter_client_port", 3000)
+...
 
 
 6.37. diameter_extra (string)
 6.37. diameter_extra (string)
 
 
@@ -1096,7 +1174,9 @@ modparam("acc", "diameter_client_port", 3000)
    Default value is NULL.
    Default value is NULL.
 
 
    Example 1.37. diameter_extra example
    Example 1.37. diameter_extra example
+...
 modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
 modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
+...
 
 
 6.38. cdr_enable (integer)
 6.38. cdr_enable (integer)
 
 
@@ -1105,7 +1185,9 @@ modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
    0 - off (default). 1 - on.
    0 - off (default). 1 - on.
 
 
    Example 1.38. cdr_enable example
    Example 1.38. cdr_enable example
+...
 modparam("acc", "cdr_enable", 1)
 modparam("acc", "cdr_enable", 1)
+...
 
 
 6.39. cdr_start_on_confirmed (integer)
 6.39. cdr_start_on_confirmed (integer)
 
 
@@ -1116,7 +1198,9 @@ modparam("acc", "cdr_enable", 1)
    confirmation.
    confirmation.
 
 
    Example 1.39. cdr_start_on_confirmed example
    Example 1.39. cdr_start_on_confirmed example
+...
 modparam("acc", "cdr_start_on_confirmed", 1)
 modparam("acc", "cdr_start_on_confirmed", 1)
+...
 
 
 6.40. cdr_facility (integer)
 6.40. cdr_facility (integer)
 
 
@@ -1126,7 +1210,9 @@ modparam("acc", "cdr_start_on_confirmed", 1)
    Default value is LOG_DAEMON.
    Default value is LOG_DAEMON.
 
 
    Example 1.40. cdr_facility example
    Example 1.40. cdr_facility example
+...
 modparam("acc", "cdr_facility", "LOG_DAEMON")
 modparam("acc", "cdr_facility", "LOG_DAEMON")
+...
 
 
 6.41. cdr_extra (string)
 6.41. cdr_extra (string)
 
 
@@ -1136,7 +1222,9 @@ modparam("acc", "cdr_facility", "LOG_DAEMON")
    Default value is NULL.
    Default value is NULL.
 
 
    Example 1.41. cdr_extra example
    Example 1.41. cdr_extra example
+...
 modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)"
 modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)"
+...
 
 
 6.42. cdr_start_id (string)
 6.42. cdr_start_id (string)
 
 
@@ -1145,7 +1233,9 @@ modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)"
    Default value is 'start_time'
    Default value is 'start_time'
 
 
    Example 1.42. cdr_start_id example
    Example 1.42. cdr_start_id example
+...
 modparam("acc", "cdr_start_id", "start")
 modparam("acc", "cdr_start_id", "start")
+...
 
 
 6.43. cdr_end_id (string)
 6.43. cdr_end_id (string)
 
 
@@ -1154,7 +1244,9 @@ modparam("acc", "cdr_start_id", "start")
    Default value is 'end_time'
    Default value is 'end_time'
 
 
    Example 1.43. cdr_end_id example
    Example 1.43. cdr_end_id example
+...
 modparam("acc", "cdr_end_id", "end")
 modparam("acc", "cdr_end_id", "end")
+...
 
 
 6.44. cdr_duration_id (string)
 6.44. cdr_duration_id (string)
 
 
@@ -1163,7 +1255,9 @@ modparam("acc", "cdr_end_id", "end")
    Default value is 'duration'
    Default value is 'duration'
 
 
    Example 1.44. cdr_duration_id example
    Example 1.44. cdr_duration_id example
+...
 modparam("acc", "cdr_duration_id", "d")
 modparam("acc", "cdr_duration_id", "d")
+...
 
 
 6.45. cdr_log_enable (int)
 6.45. cdr_log_enable (int)
 
 
@@ -1172,7 +1266,9 @@ modparam("acc", "cdr_duration_id", "d")
    0 - off. 1 - on (default).
    0 - off. 1 - on (default).
 
 
    Example 1.45. cdr_log_enable example
    Example 1.45. cdr_log_enable example
+...
 modparam("acc", "cdr_log_enable", 0)
 modparam("acc", "cdr_log_enable", 0)
+...
 
 
 6.46. cdrs_table (str)
 6.46. cdrs_table (str)
 
 
@@ -1181,7 +1277,9 @@ modparam("acc", "cdr_log_enable", 0)
    Default value is "" (no db storage for dialog-based CDRs).
    Default value is "" (no db storage for dialog-based CDRs).
 
 
    Example 1.46. cdrs_table example
    Example 1.46. cdrs_table example
+...
 modparam("acc", "cdrs_table", "acc_cdrs")
 modparam("acc", "cdrs_table", "acc_cdrs")
+...
 
 
 6.47. time_mode (int)
 6.47. time_mode (int)
 
 
@@ -1191,10 +1289,16 @@ modparam("acc", "cdrs_table", "acc_cdrs")
      * 0 - (default), save only unix timestamp for syslog and datetime for
      * 0 - (default), save only unix timestamp for syslog and datetime for
        database.
        database.
      * 1 - save seconds in time_attr and microseconds in time_exten.
      * 1 - save seconds in time_attr and microseconds in time_exten.
-     * 3 - save seconds.miliseconds in time_attr.
+     * 2 - save seconds.miliseconds in time_attr.
+     * 3 - save formatted time according to time_format parameter, using
+       the output of localtime().
+     * 4 - save formatted time according to time_format parameter, using
+       the output of gmtime().
 
 
    Example 1.47. time_mode example
    Example 1.47. time_mode example
+...
 modparam("acc", "time_mode", 1)
 modparam("acc", "time_mode", 1)
+...
 
 
 6.48. time_attr (str)
 6.48. time_attr (str)
 
 
@@ -1205,13 +1309,17 @@ modparam("acc", "time_mode", 1)
    on time_mode value. When time_mode is:
    on time_mode value. When time_mode is:
      * 1 - time_attr column has to be int.
      * 1 - time_attr column has to be int.
      * 2 - time_attr column has to be double.
      * 2 - time_attr column has to be double.
+     * 3 - time_attr column has to be varchar(128).
+     * 4 - time_attr column has to be varchar(128).
 
 
    For time_mode=1, this attribute is not written in syslog, because time
    For time_mode=1, this attribute is not written in syslog, because time
    value is already unix timestamp, but in db accounting time value is
    value is already unix timestamp, but in db accounting time value is
    datetime and requires a function to get the timestamp.
    datetime and requires a function to get the timestamp.
 
 
    Example 1.48. time_attr example
    Example 1.48. time_attr example
+...
 modparam("acc", "time_attr", "seconds")
 modparam("acc", "time_attr", "seconds")
+...
 
 
 6.49. time_exten (str)
 6.49. time_exten (str)
 
 
@@ -1221,7 +1329,20 @@ modparam("acc", "time_attr", "seconds")
    It is used now only for time_mode=1 and database column has to be int:
    It is used now only for time_mode=1 and database column has to be int:
 
 
    Example 1.49. time_exten example
    Example 1.49. time_exten example
+...
 modparam("acc", "time_exten", "micorsecs")
 modparam("acc", "time_exten", "micorsecs")
+...
+
+6.50. time_format (str)
+
+   Specify the format to print the time for time_mode 3 or 4.
+
+   Default value is %Y-%m-%d %H:%M:%S".
+
+   Example 1.50. time_format example
+...
+modparam("acc", "time_format", "%Y/%m/%d %H:%M:%S")
+...
 
 
 7. Functions
 7. Functions
 
 
@@ -1242,7 +1363,7 @@ modparam("acc", "time_exten", "micorsecs")
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.50. acc_log_request usage
+   Example 1.51. acc_log_request usage
 ...
 ...
 acc_log_request("Some comment");
 acc_log_request("Some comment");
 ...
 ...
@@ -1260,7 +1381,7 @@ acc_log_request("Some comment");
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.51. acc_db_request usage
+   Example 1.52. acc_db_request usage
 ...
 ...
 acc_db_request("Some comment", "SomeTable");
 acc_db_request("Some comment", "SomeTable");
 acc_db_request("Some comment", "acc_$time(year)_$time(mon)");
 acc_db_request("Some comment", "acc_$time(year)_$time(mon)");
@@ -1276,7 +1397,7 @@ acc_db_request("Some comment", "acc_$time(year)_$time(mon)");
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.52. acc_rad_request usage
+   Example 1.53. acc_rad_request usage
 ...
 ...
 acc_rad_request("Some comment");
 acc_rad_request("Some comment");
 ...
 ...
@@ -1291,7 +1412,7 @@ acc_rad_request("Some comment");
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.53. acc_diam_request usage
+   Example 1.54. acc_diam_request usage
 ...
 ...
 acc_diam_request("Some comment");
 acc_diam_request("Some comment");
 ...
 ...

+ 134 - 1
modules/acc/doc/acc_admin.xml

@@ -415,6 +415,7 @@ if (uri=~"sip:+40") /* calls to Romania */ {
 				<section>
 				<section>
 					<title>Example for a spiraled Proxy</title>
 					<title>Example for a spiraled Proxy</title>
 					<programlisting format="linespecific">
 					<programlisting format="linespecific">
+...
 # A calls B (transaction 1)
 # A calls B (transaction 1)
 $avp(caller)='A'
 $avp(caller)='A'
 $avp(callee)='B';
 $avp(callee)='B';
@@ -433,6 +434,7 @@ $dlg_var(chain)=$dlg_var(chain) + "|" + "C;cfnr;D";
 # C confirms call (200 reply of transaction 2)
 # C confirms call (200 reply of transaction 2)
 $dlg_var(caller) = $avp(caller); #caller='B'
 $dlg_var(caller) = $avp(caller); #caller='B'
 $dlg_var(callee) = $avp(callee); #callee='C'
 $dlg_var(callee) = $avp(callee); #callee='C'
+...
 					</programlisting>
 					</programlisting>
 				</section>
 				</section>
 			</section>
 			</section>
@@ -504,7 +506,9 @@ $dlg_var(callee) = $avp(callee); #callee='C'
 		<example>
 		<example>
 		<title>early_media example</title>
 		<title>early_media example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "early_media", 1)
 modparam("acc", "early_media", 1)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -520,7 +524,9 @@ modparam("acc", "early_media", 1)
 		<example>
 		<example>
 		<title>failed_transaction_flag example</title>
 		<title>failed_transaction_flag example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "failed_transaction_flag", 4)
 modparam("acc", "failed_transaction_flag", 4)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -538,7 +544,9 @@ modparam("acc", "failed_transaction_flag", 4)
 		<example>
 		<example>
 		<title>failed_filter example</title>
 		<title>failed_filter example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "failed_filter", "404,407")
 modparam("acc", "failed_filter", "404,407")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -556,7 +564,9 @@ modparam("acc", "failed_filter", "404,407")
 		<example>
 		<example>
 		<title>report_ack example</title>
 		<title>report_ack example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "report_ack", 1)
 modparam("acc", "report_ack", 1)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -573,7 +583,9 @@ modparam("acc", "report_ack", 1)
 		<example>
 		<example>
 		<title>report_cancels example</title>
 		<title>report_cancels example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "report_cancels", 1)
 modparam("acc", "report_cancels", 1)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -595,7 +607,9 @@ modparam("acc", "report_cancels", 1)
 		<example>
 		<example>
 		<title>detect_direction example</title>
 		<title>detect_direction example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "detect_direction", 1)
 modparam("acc", "detect_direction", 1)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -615,7 +629,9 @@ modparam("acc", "detect_direction", 1)
 		<example>
 		<example>
 		<title>acc_prepare_flag example</title>
 		<title>acc_prepare_flag example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "acc_prepare_flag", 5)
 modparam("acc", "acc_prepare_flag", 5)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -635,6 +651,7 @@ modparam("acc", "acc_prepare_flag", 5)
 		<example>
 		<example>
 		<title>multi_leg_info example</title>
 		<title>multi_leg_info example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 # for syslog-based accounting, use any text you want to be printed
 # for syslog-based accounting, use any text you want to be printed
 modparam("acc", "multi_leg_info",
 modparam("acc", "multi_leg_info",
     "text1=$avp(src);text2=$avp(dst)")
     "text1=$avp(src);text2=$avp(dst)")
@@ -647,6 +664,7 @@ modparam("acc", "multi_leg_info",
 # for DIAMETER-based accounting, use the DIAMETER AVP ID (as integer)
 # for DIAMETER-based accounting, use the DIAMETER AVP ID (as integer)
 modparam("acc", "multi_leg_info",
 modparam("acc", "multi_leg_info",
     "2345=$avp(src);2346=$avp(dst)")
     "2345=$avp(src);2346=$avp(dst)")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -662,7 +680,9 @@ modparam("acc", "multi_leg_info",
 		<example>
 		<example>
 		<title>log_flag example</title>
 		<title>log_flag example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "log_flag", 2)
 modparam("acc", "log_flag", 2)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -677,7 +697,9 @@ modparam("acc", "log_flag", 2)
 		<example>
 		<example>
 		<title>log_missed_flag example</title>
 		<title>log_missed_flag example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "log_missed_flag", 3)
 modparam("acc", "log_missed_flag", 3)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -692,7 +714,9 @@ modparam("acc", "log_missed_flag", 3)
 		<example>
 		<example>
 		<title>log_level example</title>
 		<title>log_level example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "log_level", 2)   # Set log_level to 2
 modparam("acc", "log_level", 2)   # Set log_level to 2
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -709,7 +733,9 @@ modparam("acc", "log_level", 2)   # Set log_level to 2
 		<example>
 		<example>
 		<title>log_facility example</title>
 		<title>log_facility example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "log_facility", "LOG_DAEMON")
 modparam("acc", "log_facility", "LOG_DAEMON")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -725,7 +751,9 @@ modparam("acc", "log_facility", "LOG_DAEMON")
 		<example>
 		<example>
 		<title>log_extra example</title>
 		<title>log_extra example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "log_extra", "ua=$hdr(User-Agent);uuid=$avp(i:123)")
 modparam("acc", "log_extra", "ua=$hdr(User-Agent);uuid=$avp(i:123)")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -750,7 +778,9 @@ modparam("acc", "log_extra", "ua=$hdr(User-Agent);uuid=$avp(i:123)")
 		<example>
 		<example>
 		<title>radius_config example</title>
 		<title>radius_config example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
 modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -766,7 +796,9 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
 		<example>
 		<example>
 		<title>radius_flag example</title>
 		<title>radius_flag example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "radius_flag", 2)
 modparam("acc", "radius_flag", 2)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -782,7 +814,9 @@ modparam("acc", "radius_flag", 2)
 		<example>
 		<example>
 		<title>radius_missed_flag example</title>
 		<title>radius_missed_flag example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "radius_missed_flag", 3)
 modparam("acc", "radius_missed_flag", 3)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -797,7 +831,9 @@ modparam("acc", "radius_missed_flag", 3)
 		<example>
 		<example>
 		<title>service_type example</title>
 		<title>service_type example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "service_type", 16)
 modparam("acc", "service_type", 16)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -813,7 +849,9 @@ modparam("acc", "service_type", 16)
 		<example>
 		<example>
 		<title>radius_extra example</title>
 		<title>radius_extra example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
 modparam("acc", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -830,7 +868,9 @@ modparam("acc", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
 		<example>
 		<example>
 		<title>db_flag example</title>
 		<title>db_flag example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "db_flag", 2)
 modparam("acc", "db_flag", 2)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -846,7 +886,9 @@ modparam("acc", "db_flag", 2)
 		<example>
 		<example>
 		<title>db_missed_flag example</title>
 		<title>db_missed_flag example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "db_missed_flag", 3)
 modparam("acc", "db_missed_flag", 3)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -862,8 +904,10 @@ modparam("acc", "db_missed_flag", 3)
 		<example>
 		<example>
 		<title>db_table_acc example</title>
 		<title>db_table_acc example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "db_table_acc", "myacc_table")
 modparam("acc", "db_table_acc", "myacc_table")
 modparam("acc", "db_table_acc", "acc_$time(year)_$time(mon)")
 modparam("acc", "db_table_acc", "acc_$time(year)_$time(mon)")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -879,7 +923,9 @@ modparam("acc", "db_table_acc", "acc_$time(year)_$time(mon)")
 		<example>
 		<example>
 		<title>db_table_missed_calls example</title>
 		<title>db_table_missed_calls example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "db_table_missed_calls", "myMC_table")
 modparam("acc", "db_table_missed_calls", "myMC_table")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -895,7 +941,9 @@ modparam("acc", "db_table_missed_calls", "myMC_table")
 		<example>
 		<example>
 		<title>db_url example</title>
 		<title>db_url example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "db_url", "mysql://user:password@localhost/kamailio")
 modparam("acc", "db_url", "mysql://user:password@localhost/kamailio")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -911,7 +959,9 @@ modparam("acc", "db_url", "mysql://user:password@localhost/kamailio")
 		<example>
 		<example>
 		<title>acc_method_column example</title>
 		<title>acc_method_column example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "acc_method_column", "method")
 modparam("acc", "acc_method_column", "method")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -926,7 +976,9 @@ modparam("acc", "acc_method_column", "method")
 		<example>
 		<example>
 		<title>acc_from_tag_column example</title>
 		<title>acc_from_tag_column example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "acc_from_tag_column", "from_tag")
 modparam("acc", "acc_from_tag_column", "from_tag")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -941,7 +993,9 @@ modparam("acc", "acc_from_tag_column", "from_tag")
 		<example>
 		<example>
 		<title>acc_to_tag_column example</title>
 		<title>acc_to_tag_column example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "acc_to_tag_column", "to_tag")
 modparam("acc", "acc_to_tag_column", "to_tag")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -956,7 +1010,9 @@ modparam("acc", "acc_to_tag_column", "to_tag")
 		<example>
 		<example>
 		<title>acc_callid_column example</title>
 		<title>acc_callid_column example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "acc_callid_column", "callid")
 modparam("acc", "acc_callid_column", "callid")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -972,7 +1028,9 @@ modparam("acc", "acc_callid_column", "callid")
 		<example>
 		<example>
 		<title>acc_sip_code_column example</title>
 		<title>acc_sip_code_column example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "acc_sip_code_column", "sip_code")
 modparam("acc", "acc_sip_code_column", "sip_code")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -988,7 +1046,9 @@ modparam("acc", "acc_sip_code_column", "sip_code")
 		<example>
 		<example>
 		<title>acc_sip_reason_column example</title>
 		<title>acc_sip_reason_column example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "acc_sip_reason_column", "sip_reason")
 modparam("acc", "acc_sip_reason_column", "sip_reason")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1004,7 +1064,9 @@ modparam("acc", "acc_sip_reason_column", "sip_reason")
 		<example>
 		<example>
 		<title>acc_time_column example</title>
 		<title>acc_time_column example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "acc_time_column", "time")
 modparam("acc", "acc_time_column", "time")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1020,7 +1082,9 @@ modparam("acc", "acc_time_column", "time")
 		<example>
 		<example>
 		<title>db_extra example</title>
 		<title>db_extra example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
 modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1037,7 +1101,9 @@ modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
 		<example>
 		<example>
 		<title>db_insert_mode example</title>
 		<title>db_insert_mode example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "db_insert_mode", 1)
 modparam("acc", "db_insert_mode", 1)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1054,7 +1120,9 @@ modparam("acc", "db_insert_mode", 1)
 		<example>
 		<example>
 		<title>diameter_flag example</title>
 		<title>diameter_flag example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "diameter_flag", 2)
 modparam("acc", "diameter_flag", 2)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1070,7 +1138,9 @@ modparam("acc", "diameter_flag", 2)
 		<example>
 		<example>
 		<title>diameter_missed_flag example</title>
 		<title>diameter_missed_flag example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "diameter_missed_flag", 3)
 modparam("acc", "diameter_missed_flag", 3)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1086,7 +1156,9 @@ modparam("acc", "diameter_missed_flag", 3)
 		<example>
 		<example>
 		<title>diameter_client_host example</title>
 		<title>diameter_client_host example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "diameter_client_host", "3a_server.net")
 modparam("acc", "diameter_client_host", "3a_server.net")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1102,7 +1174,9 @@ modparam("acc", "diameter_client_host", "3a_server.net")
 		<example>
 		<example>
 		<title>diameter_client_host example</title>
 		<title>diameter_client_host example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "diameter_client_port", 3000)
 modparam("acc", "diameter_client_port", 3000)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1118,7 +1192,9 @@ modparam("acc", "diameter_client_port", 3000)
 		<example>
 		<example>
 		<title>diameter_extra example</title>
 		<title>diameter_extra example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
 modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1134,7 +1210,9 @@ modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
 		<example>
 		<example>
 		<title>cdr_enable example</title>
 		<title>cdr_enable example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "cdr_enable", 1)
 modparam("acc", "cdr_enable", 1)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1151,7 +1229,9 @@ modparam("acc", "cdr_enable", 1)
 		<example>
 		<example>
 		<title>cdr_start_on_confirmed example</title>
 		<title>cdr_start_on_confirmed example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "cdr_start_on_confirmed", 1)
 modparam("acc", "cdr_start_on_confirmed", 1)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1168,7 +1248,9 @@ modparam("acc", "cdr_start_on_confirmed", 1)
 		<example>
 		<example>
 		<title>cdr_facility example</title>
 		<title>cdr_facility example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "cdr_facility", "LOG_DAEMON")
 modparam("acc", "cdr_facility", "LOG_DAEMON")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1184,7 +1266,9 @@ modparam("acc", "cdr_facility", "LOG_DAEMON")
 		<example>
 		<example>
 		<title>cdr_extra example</title>
 		<title>cdr_extra example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)"
 modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)"
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1199,7 +1283,9 @@ modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)"
 		<example>
 		<example>
 		<title>cdr_start_id example</title>
 		<title>cdr_start_id example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "cdr_start_id", "start")
 modparam("acc", "cdr_start_id", "start")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1214,7 +1300,9 @@ modparam("acc", "cdr_start_id", "start")
 		<example>
 		<example>
 		<title>cdr_end_id example</title>
 		<title>cdr_end_id example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "cdr_end_id", "end")
 modparam("acc", "cdr_end_id", "end")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1229,7 +1317,9 @@ modparam("acc", "cdr_end_id", "end")
 		<example>
 		<example>
 		<title>cdr_duration_id example</title>
 		<title>cdr_duration_id example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "cdr_duration_id", "d")
 modparam("acc", "cdr_duration_id", "d")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1245,7 +1335,9 @@ modparam("acc", "cdr_duration_id", "d")
 		<example>
 		<example>
 		<title>cdr_log_enable example</title>
 		<title>cdr_log_enable example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "cdr_log_enable", 0)
 modparam("acc", "cdr_log_enable", 0)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1260,7 +1352,9 @@ modparam("acc", "cdr_log_enable", 0)
 		<example>
 		<example>
 		<title>cdrs_table example</title>
 		<title>cdrs_table example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "cdrs_table", "acc_cdrs")
 modparam("acc", "cdrs_table", "acc_cdrs")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1282,15 +1376,27 @@ modparam("acc", "cdrs_table", "acc_cdrs")
 				microseconds in time_exten.</para>
 				microseconds in time_exten.</para>
 		</listitem>
 		</listitem>
 		<listitem>
 		<listitem>
-			<para><emphasis>3</emphasis> - save seconds.miliseconds
+			<para><emphasis>2</emphasis> - save seconds.miliseconds
 				in time_attr.</para>
 				in time_attr.</para>
 		</listitem>
 		</listitem>
+		<listitem>
+			<para><emphasis>3</emphasis> - save formatted time according
+				to time_format parameter, using the output of localtime().
+			</para>
+		</listitem>
+		<listitem>
+			<para><emphasis>4</emphasis> - save formatted time according
+				to time_format parameter, using the output of gmtime().
+			</para>
+		</listitem>
 		</itemizedlist>
 		</itemizedlist>
 
 
 		<example>
 		<example>
 		<title>time_mode example</title>
 		<title>time_mode example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "time_mode", 1)
 modparam("acc", "time_mode", 1)
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1311,6 +1417,12 @@ modparam("acc", "time_mode", 1)
 		<listitem>
 		<listitem>
 			<para><emphasis>2</emphasis> - time_attr column has to be double.</para>
 			<para><emphasis>2</emphasis> - time_attr column has to be double.</para>
 		</listitem>
 		</listitem>
+		<listitem>
+			<para><emphasis>3</emphasis> - time_attr column has to be varchar(128).</para>
+		</listitem>
+		<listitem>
+			<para><emphasis>4</emphasis> - time_attr column has to be varchar(128).</para>
+		</listitem>
 		</itemizedlist>
 		</itemizedlist>
 		<para>
 		<para>
 		For time_mode=1, this attribute is not written in syslog, because time
 		For time_mode=1, this attribute is not written in syslog, because time
@@ -1320,7 +1432,9 @@ modparam("acc", "time_mode", 1)
 		<example>
 		<example>
 		<title>time_attr example</title>
 		<title>time_attr example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "time_attr", "seconds")
 modparam("acc", "time_attr", "seconds")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>
@@ -1336,7 +1450,26 @@ modparam("acc", "time_attr", "seconds")
 		<example>
 		<example>
 		<title>time_exten example</title>
 		<title>time_exten example</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
+...
 modparam("acc", "time_exten", "micorsecs")
 modparam("acc", "time_exten", "micorsecs")
+...
+</programlisting>
+		</example>
+	</section>
+	<section id="acc.p.time_format">
+		<title><varname>time_format</varname> (str)</title>
+		<para>
+		Specify the format to print the time for time_mode 3 or 4.
+		</para>
+		<para>
+		Default value is %Y-%m-%d %H:%M:%S".
+		</para>
+		<example>
+		<title>time_format example</title>
+		<programlisting format="linespecific">
+...
+modparam("acc", "time_format", "%Y/%m/%d %H:%M:%S")
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>