[asterisk-dev] CDR fixes--- Wait a minute!! (LONG)

Stephen Davies stephen.l.davies at gmail.com
Tue Jun 12 14:05:14 MST 2007


On 12/06/07, Stephen Davies <stephen.l.davies at gmail.com> wrote:
> 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.


Excuse me for talking to myself, but this does do the job.

Here's a patch:

Index: cdr.c
===================================================================
--- cdr.c       (revision 67303)
+++ cdr.c       (working copy)
@@ -776,8 +776,8 @@
                        cdr->amaflags = c->amaflags ? c->amaflags :
ast_default_amaflags;
                        ast_copy_string(cdr->accountcode,
c->accountcode, sizeof(cdr->accountcode));
                        /* Destination information */
-                       ast_copy_string(cdr->dst, c->exten, sizeof(cdr->dst));
-                       ast_copy_string(cdr->dcontext, c->context,
sizeof(cdr->dcontext));
+                       ast_copy_string(cdr->dst, S_OR(c->macroexten,
c->exten), sizeof(cdr->dst));
+                       ast_copy_string(cdr->dcontext,
S_OR(c->macrocontext, c->context), sizeof(cdr->dcontext));
                        /* Unique call identifier */
                        ast_copy_string(cdr->uniqueid, c->uniqueid,
sizeof(cdr->uniqueid));
                }

Do you need it on the bug tracker?

Steve


More information about the asterisk-dev mailing list