over the channel-set musicclass. This allows separate hold-music from
application (e.g. Queue or Dial) specified music.
+
+CEL Backends
+------------------
+
+cel_pgsql
+------------------
+* Added a new option, 'usegmtime', which causes timestamps in CEL events
+ to be logged in GMT.
+
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 13.3.0 to Asterisk 13.4.0 ------------
------------------------------------------------------------------------------
static int connected = 0;
static int maxsize = 512, maxsize2 = 512;
+static int usegmtime = 0;
/*! \brief show_user_def is off by default */
#define CEL_SHOW_USERDEF_DEFAULT 0
ast_mutex_lock(&pgsql_lock);
- ast_localtime(&record.event_time, &tm, NULL);
+ ast_localtime(&record.event_time, &tm, usegmtime ? "GMT" : NULL);
ast_strftime(timestr, sizeof(timestr), DATE_FORMAT, &tm);
if ((!connected) && pghostname && pgdbuser && pgpassword && pgdbname) {
} else {
/* char, hopefully */
LENGTHEN_BUF2(31);
- ast_localtime(&record.event_time, &tm, NULL);
+ ast_localtime(&record.event_time, &tm, usegmtime ? "GMT" : NULL);
ast_strftime(buf, sizeof(buf), DATE_FORMAT, &tm);
ast_str_append(&sql2, 0, "%s'%s'", SEP, buf);
}
if ((tmp = ast_variable_retrieve(cfg, "global", "show_user_defined"))) {
cel_show_user_def = ast_true(tmp) ? 1 : 0;
}
+ if ((tmp = ast_variable_retrieve(cfg, "global", "usegmtime"))) {
+ usegmtime = ast_true(tmp);
+ } else {
+ usegmtime = 0;
+ }
if (option_debug) {
if (ast_strlen_zero(pghostname)) {
ast_debug(3, "cel_pgsql: using default unix socket\n");
;
;show_user_defined=yes
+; Log date/time in GMT. The default of this option is 'no'.
+;usegmtime=yes
+
;hostname=localhost
;port=5432
;dbname=asterisk
;password=password
;user=postgres
;table=cel ;SQL table where CEL's will be inserted
-;appname=asterisk ; Postgres application_name support (optional). Whitespace not allowed.
\ No newline at end of file
+;appname=asterisk ; Postgres application_name support (optional). Whitespace not allowed.