From 571cef491f18be173da3a0dae0cfda4416155e28 Mon Sep 17 00:00:00 2001 From: Walter Doekes Date: Wed, 29 Feb 2012 19:48:33 +0000 Subject: [PATCH] Fix copying of CDR(accountcode) to local channels. In r203638, during the addition of the Channel Event Logging, in mid-2009, this got broken in trunk and ended up in asterisk 1.8 and higher. This fixes so the CDR(accountcode) from the calling channel is available to dialed channels again as well as showing up properly in the CDR's. (closes issue ASTERISK-19384) Reported by: jamicque Patches: accountcode.patch (License #6033) by jamicque Review: https://reviewboard.asterisk.org/r/1775/ Reviewed by: Richard Mudgett ........ Merged revisions 357575 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357576 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357577 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_dial.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/app_dial.c b/apps/app_dial.c index d12ea9c583..d2e9e6f3d1 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -2313,10 +2313,11 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast ast_channel_dialed(tc)->transit_network_select = ast_channel_dialed(chan)->transit_network_select; if (!ast_strlen_zero(ast_channel_accountcode(chan))) { - ast_channel_peeraccount_set(tc, ast_channel_accountcode(chan)); + ast_channel_accountcode_set(tc, ast_channel_accountcode(chan)); } - if (ast_strlen_zero(ast_channel_musicclass(tc))) + if (ast_strlen_zero(ast_channel_musicclass(tc))) { ast_channel_musicclass_set(tc, ast_channel_musicclass(chan)); + } /* Pass ADSI CPE and transfer capability */ ast_channel_adsicpe_set(tc, ast_channel_adsicpe(chan));