]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 230628 via svnmerge from
authorMatthew Nicholson <mnicholson@digium.com>
Fri, 20 Nov 2009 21:09:45 +0000 (21:09 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Fri, 20 Nov 2009 21:09:45 +0000 (21:09 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r230628 | mnicholson | 2009-11-20 15:01:10 -0600 (Fri, 20 Nov 2009) | 15 lines

  Merged revisions 230627 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r230627 | mnicholson | 2009-11-20 14:53:06 -0600 (Fri, 20 Nov 2009) | 8 lines

    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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@230631 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/features.c

index 9782aae24d3884cddc97ec021b789107e57192b8..63af878c7d530b35fa3dd938dfac6e3ab6150876 100644 (file)
@@ -2268,6 +2268,10 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
                        bridge_cdr = ast_cdr_dup(chan_cdr);
                        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? */