[asterisk-bugs] [JIRA] (ASTERISK-23770) calldate missing from contrib/ast-db-manage/cdr
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Wed May 21 12:48:43 CDT 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-23770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=218352#comment-218352 ]
Matt Jordan commented on ASTERISK-23770:
----------------------------------------
I should amend my previous comment that "no other module uses {{calldate}}" - {{cdr_mysql}} does, but it at least is smart enough to provide an escape option:
{code}
if (!strcmp(entry->name, "calldate")) {
/*!\note
* For some dumb reason, "calldate" used to be formulated using
* the datetime the record was posted, rather than the start
* time of the call. If someone really wants the old compatible
* behavior, it's provided here.
*/
if (calldate_compat) {
struct timeval tv = ast_tvnow();
struct ast_tm tm;
char timestr[128];
ast_localtime(&tv, &tm, ast_str_strlen(cdrzone) ? ast_str_buffer(cdrzone) : NULL);
ast_strftime(timestr, sizeof(timestr), "%Y-%m-%d %T", &tm);
value = ast_strdupa(timestr);
cdrname = "calldate";
} else {
cdrname = "start";
}
{code}
> calldate missing from contrib/ast-db-manage/cdr
> -----------------------------------------------
>
> Key: ASTERISK-23770
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-23770
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Contrib/General
> Affects Versions: 12.2.0
> Reporter: Stephen More
>
> cdr/cdr_odbc.c shows:
> "INSERT INTO %s "
> "(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,"
> "lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) "
> "VALUES ({ts '%s'},?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", table, timestr);
> There is no calldate defined in contrib/ast-db-manage/cdr
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list