]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Copy the calling party's account code to the called party if they don't already have...
authorMatthew Nicholson <mnicholson@digium.com>
Thu, 18 Feb 2010 19:38:09 +0000 (19:38 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Thu, 18 Feb 2010 19:38:09 +0000 (19:38 +0000)
(closes issue #16331)
Reported by: bluefox
Tested by: mnicholson

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

res/res_features.c

index 7deb0a9852260df1d66a5018a8a169956b58641d..fa938087acb44e14f7ac85ceb81272020b44abdc 100644 (file)
@@ -1787,6 +1787,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) */
                        bridge_cdr = ast_cdr_alloc(); /* this should be really, really rare/impossible? */