[svn-commits] murf: trunk r65203 - in /trunk: ./ main/cdr.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Fri May 18 15:35:49 MST 2007
Author: murf
Date: Fri May 18 17:35:48 2007
New Revision: 65203
URL: http://svn.digium.com/view/asterisk?view=rev&rev=65203
Log:
Merged revisions 65201 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r65201 | murf | 2007-05-18 16:26:51 -0600 (Fri, 18 May 2007) | 1 line
Ugh. The svnmerge didn't catch the shift from cdr.c to main/cdr.c, and neither did I. This is the remainder of the 9717 patch, the fix for the run-away FAIL status for a call
........
Modified:
trunk/ (props changed)
trunk/main/cdr.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/cdr.c
URL: http://svn.digium.com/view/asterisk/trunk/main/cdr.c?view=diff&rev=65203&r1=65202&r2=65203
==============================================================================
--- trunk/main/cdr.c (original)
+++ trunk/main/cdr.c Fri May 18 17:35:48 2007
@@ -665,6 +665,22 @@
}
}
+void ast_cdr_noanswer(struct ast_cdr *cdr)
+{
+ char *chan;
+
+ while (cdr) {
+ chan = !ast_strlen_zero(cdr->channel) ? cdr->channel : "<unknown>";
+ if (ast_test_flag(cdr, AST_CDR_FLAG_POSTED))
+ ast_log(LOG_WARNING, "CDR on channel '%s' already posted\n", chan);
+ if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) {
+ if (cdr->disposition < AST_CDR_NOANSWER)
+ cdr->disposition = AST_CDR_NOANSWER;
+ }
+ cdr = cdr->next;
+ }
+}
+
int ast_cdr_disposition(struct ast_cdr *cdr, int cause)
{
int res = 0;
@@ -756,7 +772,7 @@
ast_copy_string(cdr->channel, c->name, sizeof(cdr->channel));
set_one_cid(cdr, c);
- cdr->disposition = (c->_state == AST_STATE_UP) ? AST_CDR_ANSWERED : AST_CDR_NOANSWER;
+ cdr->disposition = (c->_state == AST_STATE_UP) ? AST_CDR_ANSWERED : AST_CDR_NULL;
cdr->amaflags = c->amaflags ? c->amaflags : ast_default_amaflags;
ast_copy_string(cdr->accountcode, c->accountcode, sizeof(cdr->accountcode));
/* Destination information */
@@ -787,6 +803,8 @@
char *ast_cdr_disp2str(int disposition)
{
switch (disposition) {
+ case AST_CDR_NULL:
+ return "NO ANSWER"; /* by default, for backward compatibility */
case AST_CDR_NOANSWER:
return "NO ANSWER";
case AST_CDR_FAILED:
@@ -953,7 +971,7 @@
cdr->billsec = 0;
cdr->duration = 0;
ast_cdr_start(cdr);
- cdr->disposition = AST_CDR_NOANSWER;
+ cdr->disposition = AST_CDR_NULL;
}
}
}
More information about the svn-commits
mailing list