On 12/06/07, Stephen Davies <[EMAIL PROTECTED]> 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
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to