add Dialed Number Identifier (DNID) field to cdr records.
authorAlec L Davis <sivad.a@paradise.net.nz>
Tue, 12 Jan 2010 18:55:54 +0000 (18:55 +0000)
committerAlec L Davis <sivad.a@paradise.net.nz>
Tue, 12 Jan 2010 18:55:54 +0000 (18:55 +0000)
reviewboard link: https://reviewboard.asterisk.org/r/455/

  Reported by: alecdavis
  Tested by: alecdavis
  Patch
 cdr_dnid.diff2.txt uploaded by alecdavis (license 585)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@239525 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/cdr.c

index 2cd11bb..8cac4ed 100644 (file)
@@ -863,6 +863,7 @@ static void set_one_cid(struct ast_cdr *cdr, struct ast_channel *c)
                cdr->clid[0] = '\0';
        }
        ast_copy_string(cdr->src, S_OR(num, ""), sizeof(cdr->src));
+       ast_cdr_setvar(cdr, "dnid", S_OR(c->cid.cid_dnid, ""), 0);
 
 }
 int ast_cdr_setcid(struct ast_cdr *cdr, struct ast_channel *c)