[asterisk-dev] Proposed changes to accountcode in CDRs

Brian Degenhardt at Switchvox bmd at digium.com
Thu May 1 17:12:13 CDT 2008

I've noticed some unexpected behavior of how a channel's accountcode
propagates in Asterisk, and I'd like to propose some changes I'm
considering before implementing them.

Currently, accountcode is copied verbatim across a bridge when a call
is placed.  For example, when account 100 calls account 200, both
channels have accountcode set to 100.  When a blind transfer occurs so
that 200 and 300 are now talking, both channels still have the
accountcode of 100.  From here, the call can be blind transferred
repeatedly, each leg causing a cdr to be posted with the accountcode
of 100.

I propose changing accountcode to not propagate across the bridge:
In the above example, the accountcode for 100 is 100, 200 is 200, 300
is 300.  For simple calls with no transfers, there will be no
noticeable change in behavior because the calling party is always the
one with the cdr to post, and their accountcode will not change.  The
only change here is that the recipient of the call will have the
correct account code for their channel, therefore if they participate
in a future leg of a call that results in a CDR post, their
accountcode will be used, not the originator of the first leg.

I'd love to get some feedback from those who are involved in CDRs and
billing on systems that actually do perform fancy operations such as
blind and assisted transfers.  Would this behavior cause any problems
for anybody?


Brian Degenhardt
Switchvox Engineer
Digium, Inc.

More information about the asterisk-dev mailing list