]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Copy the peer CDR's userfield to the bridge CDR if it exists. This is necessary...
authorMatthew Nicholson <mnicholson@digium.com>
Fri, 20 Nov 2009 20:53:06 +0000 (20:53 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Fri, 20 Nov 2009 20:53:06 +0000 (20:53 +0000)
(closes issue #14590)
Reported by: msetim
Patches:
      queue_agent_userfield.patch uploaded by Laureano (license 265)
Tested by: Laureano, mnicholson

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

res/res_features.c

index 1893b9df003540b5c6feeb3260f72030d8867dbe..42ddfa4b530764be602ecf9473ad3c0ad96d70a3 100644 (file)
@@ -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? */