mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-05 12:42:49 +00:00
cdr_mysql.c: Apply cdrzone to start and answer
Change-Id: I7de0a5adc89824a5f2b696fc22c80fc22dff36b0
This commit is contained in:
@@ -265,9 +265,7 @@ db_reconnect:
|
|||||||
/* Need the type and value to determine if we want the raw value or not */
|
/* Need the type and value to determine if we want the raw value or not */
|
||||||
if (entry->staticvalue) {
|
if (entry->staticvalue) {
|
||||||
value = ast_strdupa(entry->staticvalue);
|
value = ast_strdupa(entry->staticvalue);
|
||||||
} else if ((!strcmp(cdrname, "answer") ||
|
} else if ((!strcmp(cdrname, "disposition") ||
|
||||||
!strcmp(cdrname, "end") ||
|
|
||||||
!strcmp(cdrname, "disposition") ||
|
|
||||||
!strcmp(cdrname, "amaflags")) &&
|
!strcmp(cdrname, "amaflags")) &&
|
||||||
(strstr(entry->type, "int") ||
|
(strstr(entry->type, "int") ||
|
||||||
strstr(entry->type, "dec") ||
|
strstr(entry->type, "dec") ||
|
||||||
@@ -277,7 +275,8 @@ db_reconnect:
|
|||||||
strstr(entry->type, "numeric") ||
|
strstr(entry->type, "numeric") ||
|
||||||
strstr(entry->type, "fixed"))) {
|
strstr(entry->type, "fixed"))) {
|
||||||
ast_cdr_format_var(cdr, cdrname, &value, workspace, sizeof(workspace), 1);
|
ast_cdr_format_var(cdr, cdrname, &value, workspace, sizeof(workspace), 1);
|
||||||
} else if (!strcmp(cdrname, "start")) {
|
} else if (!strcmp(cdrname, "start") || !strcmp(cdrname, "answer") ||
|
||||||
|
!strcmp(cdrname, "end")) {
|
||||||
struct ast_tm tm;
|
struct ast_tm tm;
|
||||||
char timestr[128];
|
char timestr[128];
|
||||||
ast_localtime(&cdr->start, &tm, ast_str_strlen(cdrzone) ? ast_str_buffer(cdrzone) : NULL);
|
ast_localtime(&cdr->start, &tm, ast_str_strlen(cdrzone) ? ast_str_buffer(cdrzone) : NULL);
|
||||||
|
Reference in New Issue
Block a user