]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 247652 via svnmerge from
authorMatthew Nicholson <mnicholson@digium.com>
Thu, 18 Feb 2010 19:45:23 +0000 (19:45 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Thu, 18 Feb 2010 19:45:23 +0000 (19:45 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r247652 | mnicholson | 2010-02-18 13:39:37 -0600 (Thu, 18 Feb 2010) | 13 lines

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

  ........
    r247651 | mnicholson | 2010-02-18 13:38:09 -0600 (Thu, 18 Feb 2010) | 6 lines

    Copy the calling party's account code to the called party if they don't already have one.

    (closes issue #16331)
    Reported by: bluefox
    Tested by: mnicholson
  ........
................

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

main/features.c

index 817016053555ad29762cb26030aab715ac5b92ab..ab376f9c72029ae2a821258cce5a2769046041cc 100644 (file)
@@ -2485,6 +2485,9 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
                        if (peer_cdr && !ast_strlen_zero(peer_cdr->userfield)) {
                                ast_copy_string(bridge_cdr->userfield, peer_cdr->userfield, sizeof(bridge_cdr->userfield));
                        }
+                       if (peer_cdr && ast_strlen_zero(peer->accountcode)) {
+                               ast_cdr_setaccount(peer, chan->accountcode);
+                       }
 
                } else {
                        /* better yet, in a xfer situation, find out why the chan cdr got zapped (pun unintentional) */