dect
/
asterisk
Archived
13
0
Fork 0

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/



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@241581 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
alecdavis 2010-01-20 17:49:30 +00:00
parent b4d98df550
commit 70b5021da1
1 changed files with 7 additions and 0 deletions

View File

@ -865,7 +865,14 @@ static void set_one_cid(struct ast_cdr *cdr, struct ast_channel *c)
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) {