]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix copying of CDR(accountcode) to local channels.
authorWalter Doekes <walter+asterisk@wjd.nu>
Wed, 29 Feb 2012 19:43:02 +0000 (19:43 +0000)
committerWalter Doekes <walter+asterisk@wjd.nu>
Wed, 29 Feb 2012 19:43:02 +0000 (19:43 +0000)
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

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

apps/app_dial.c

index 4fe19d7a0ad5f276fbf7083ed5e13096b50d9b8c..3a0e9482f2d0e135b629c24ed107fcf26ef756e8 100644 (file)
@@ -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);