[asterisk-dev] CDR fixes--- Wait a minute!! (LONG)
Stephen Davies
stephen.l.davies at gmail.com
Tue Jun 12 13:57:26 MST 2007
On 12/06/07, Stephen Davies <stephen.l.davies at gmail.com> wrote:
> Steve,
>
> I've just updated my SVN trunk install to Revision: 67303
>
> I was previously running SVN trunk Revision 62263.
>
> Since the update, my CDR records have a nasty change:
My (so far untested) hunch is that this has something to do with this
change in main/pbx.c:
@@ -5018,20 +5100,6 @@
ast_channel_lock(chan);
}
if (chan) {
- if (chan->cdr) { /* check if the channel
already has a cdr record, if not give it one */
- ast_log(LOG_WARNING, "%s already has a
call record??\n", chan->name);
- } else {
- chan->cdr = ast_cdr_alloc(); /*
allocate a cdr for the channel */
- if (!chan->cdr) {
- /* allocation of the cdr failed */
- free(chan->pbx);
- res = -1;
- goto outgoing_exten_cleanup;
- }
- /* allocation of the cdr was successful */
- ast_cdr_init(chan->cdr, chan); /*
initialize our channel's cdr */
- ast_cdr_start(chan->cdr);
- }
if (chan->_state == AST_STATE_UP) {
res = 0;
if (option_verbose > 3)
This code was removed in:
r64208 | murf | 2007-05-14 16:13:45 +0200 (Mon, 14 May 2007) | 9 lines
Merged revisions 64193 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
My hunch is that the CDR only gets initialised later when the dcontext
is in the macro and the dst is "s".
Maybe just maybe another fix is that ast_cdr_init should also do the
S_OR(s->macrocontext, s->context) stuff that ast_cdr_update does.
(Does macrocontext work right when macros are nested?)
More information about the asterisk-dev
mailing list