[asterisk-dev] Proposed changes to accountcode in CDRs

Atis Lezdins atis at iq-labs.net
Wed May 7 16:32:12 CDT 2008


On Fri, May 2, 2008 at 1:12 AM, Brian Degenhardt at Switchvox
<bmd at digium.com> wrote:
> 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?
>

As long as it remains possible to change accountcode in
TRANSFER_CONTEXT, i think this really won't break anything. My
accountcode actually isn't extension, but global unique id, so i keep
it across the call, and I'm updating accountode anywhere where channel
is uninitialized, so I suppose this really won't break anything, but
if You could provide patch, I could test that.

Anyway, I'm just curios, is there such a big need to change this
behavior, or it's just to make it correct, because it "feels so"?

Regards,
Atis



-- 
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835



More information about the asterisk-dev mailing list