[svn-commits] alecdavis: trunk r241581 - /trunk/main/cdr.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jan 20 11:49:34 CST 2010
Author: alecdavis
Date: Wed Jan 20 11:49:30 2010
New Revision: 241581
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=241581
Log:
Add Calling and Called Subaddress to CDR record
Requires 'callingsubaddr' and 'calledsubaddr' fields in backend cdr.
(closes issue #16600)
Reported by: alecdavis
Patches:
cdr_subaddr.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis
Review: https://reviewboard.asterisk.org/r/460/
Modified:
trunk/main/cdr.c
Modified: trunk/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/cdr.c?view=diff&rev=241581&r1=241580&r2=241581
==============================================================================
--- trunk/main/cdr.c (original)
+++ trunk/main/cdr.c Wed Jan 20 11:49:30 2010
@@ -865,7 +865,14 @@
ast_copy_string(cdr->src, S_OR(num, ""), sizeof(cdr->src));
ast_cdr_setvar(cdr, "dnid", S_OR(c->cid.cid_dnid, ""), 0);
-}
+ if (c->cid.subaddress.valid) {
+ ast_cdr_setvar(cdr, "callingsubaddr", S_OR(c->cid.subaddress.str, ""), 0);
+ }
+ if (c->cid.dialed_subaddress.valid) {
+ ast_cdr_setvar(cdr, "calledsubaddr", S_OR(c->cid.dialed_subaddress.str, ""), 0);
+ }
+}
+
int ast_cdr_setcid(struct ast_cdr *cdr, struct ast_channel *c)
{
for (; cdr; cdr = cdr->next) {
More information about the svn-commits
mailing list