mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
(closes issue #12982)
Reported by: bcnit Tested by: murf I discovered that also, in the previous bug fixes and changes, the cdr.conf 'unanswered' option is not being obeyed, so I fixed this. And, yes, there are two 'answer' times involved in this scenario, and I would agree with you, that the first answer time is the time that should appear in the CDR. (the second 'answer' time is the time that the bridge was begun). I made the necessary adjustments, recording the first answer time into the peer cdr, and then using that to override the bridge cdr's value. To get the 'unanswered' CDRs to appear, I purposely output them, using the dial cmd to mark them as DIALED (with a new flag), and outputting them if they bear that flag, and you are in the right mode. I also corrected one small mention of the Zap device to equally consider the dahdi device. I heavily tested 10-sec-wait macros in dial, and without the macro call; I tested hangups while the macro was running vs. letting the macro complete and the bridge form. Looks OK. Removed all the instrumentation and debug. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -578,6 +578,10 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
|
||||
if (option_verbose > 2)
|
||||
ast_verbose( VERBOSE_PREFIX_3 "%s answered %s\n", c->name, in->name);
|
||||
peer = c;
|
||||
if (peer->cdr) {
|
||||
peer->cdr->answer = ast_tvnow();
|
||||
peer->cdr->disposition = AST_CDR_ANSWERED;
|
||||
}
|
||||
ast_copy_flags(peerflags, o,
|
||||
OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |
|
||||
OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |
|
||||
@@ -1761,8 +1765,9 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
||||
res = -1;
|
||||
goto done;
|
||||
}
|
||||
if (opermode && (!strncmp(chan->name,"Zap",3)) &&
|
||||
(!strncmp(peer->name,"Zap",3)))
|
||||
if (opermode &&
|
||||
(((!strncasecmp(chan->name,"Zap",3)) && (!strncasecmp(peer->name,"Zap",3))) ||
|
||||
((!strncasecmp(chan->name,"Dahdi",5)) && (!strncasecmp(peer->name,"Dahdi",5)))))
|
||||
{
|
||||
struct oprmode oprmode;
|
||||
|
||||
|
Reference in New Issue
Block a user