--- asterisk-1.6.0-beta9.orig/cdr/cdr_pgsql.c 2008-05-10 17:22:11.000000000 +0300 +++ asterisk-1.6.0-beta9/cdr/cdr_pgsql.c 2008-06-29 12:15:23.000000000 +0300 @@ -158,7 +158,7 @@ LENGTHEN_BUF1(strlen(cur->name)); lensql += snprintf(sql + lensql, sizesql - lensql, "%s,", cur->name); - if (strcmp(cur->name, "start") == 0 || strcmp(cur->name, "calldate") == 0) { + if (strcmp(cur->name, "callstart") == 0 || strcmp(cur->name, "calldate") == 0) { if (strncmp(cur->type, "int", 3) == 0) { LENGTHEN_BUF2(12); lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", cdr->start.tv_sec); @@ -171,7 +171,7 @@ ast_localtime(&cdr->start, &tm, NULL); lensql2 += ast_strftime(sql2 + lensql2, sizesql2 - lensql2, DATE_FORMAT, &tm); } - } else if (strcmp(cur->name, "answer") == 0) { + } else if (strcmp(cur->name, "callanswer") == 0) { if (strncmp(cur->type, "int", 3) == 0) { LENGTHEN_BUF2(12); lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", cdr->answer.tv_sec); @@ -184,7 +184,7 @@ ast_localtime(&cdr->start, &tm, NULL); lensql2 += ast_strftime(sql2 + lensql2, sizesql2 - lensql2, DATE_FORMAT, &tm); } - } else if (strcmp(cur->name, "end") == 0) { + } else if (strcmp(cur->name, "callend") == 0) { if (strncmp(cur->type, "int", 3) == 0) { LENGTHEN_BUF2(12); lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", cdr->end.tv_sec);