aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-20 20:53:06 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-20 20:53:06 +0000
commit870bd608af786a986f2c6d160ef72af4fd4946c7 (patch)
tree13e5aa440eb647a888ace43d663804de55a73c94 /res
parenta911718923b7e5468638138d90654f9f014e792c (diff)
Copy the peer CDR's userfield to the bridge CDR if it exists. This is necessary for the recordagentcalls option in chan_agent to store the recorded file name in the bridge CDR.
(closes issue #14590) Reported by: msetim Patches: queue_agent_userfield.patch uploaded by Laureano (license 265) Tested by: Laureano, mnicholson git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@230627 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_features.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_features.c b/res/res_features.c
index 1893b9df0..42ddfa4b5 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -1744,6 +1744,9 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
chan_cdr->next = NULL;
ast_copy_string(bridge_cdr->lastapp, S_OR(chan->appl, ""), sizeof(bridge_cdr->lastapp));
ast_copy_string(bridge_cdr->lastdata, S_OR(chan->data, ""), sizeof(bridge_cdr->lastdata));
+ if (peer_cdr && !ast_strlen_zero(peer_cdr->userfield)) {
+ ast_copy_string(bridge_cdr->userfield, peer_cdr->userfield, sizeof(bridge_cdr->userfield));
+ }
} else {
/* better yet, in a xfer situation, find out why the chan cdr got zapped (pun unintentional) */
bridge_cdr = ast_cdr_alloc(); /* this should be really, really rare/impossible? */