aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-18 19:38:09 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-18 19:38:09 +0000
commit5ebe591d75e18cfd3e6799cd47d5bd494c52101a (patch)
treec85c2e26b5dfa91e41e3071cc93c5e98d9935055 /res
parentffd146ffe648bf5c62fcbfdcefcd3ad175279795 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@247651 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 7deb0a985..fa938087a 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -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? */