mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@241581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user