From: Walter Doekes Date: Wed, 29 Feb 2012 19:41:32 +0000 (+0000) Subject: Fix copying of CDR(accountcode) to local channels. X-Git-Tag: 1.8.10.1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99a080671dd65b79cd0962e83af0225ed183a60b;p=thirdparty%2Fasterisk.git 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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357575 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_dial.c b/apps/app_dial.c index 4fe19d7a0a..3a0e9482f2 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -2307,7 +2307,7 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast tc->dialed.transit_network_select = chan->dialed.transit_network_select; if (!ast_strlen_zero(chan->accountcode)) { - ast_string_field_set(tc, peeraccount, chan->accountcode); + ast_string_field_set(tc, accountcode, chan->accountcode); } if (ast_strlen_zero(tc->musicclass)) ast_string_field_set(tc, musicclass, chan->musicclass);