[asterisk-dev] Proposed changes to accountcode in CDRs

Brian Degenhardt bmd at digium.com
Thu May 8 11:50:37 CDT 2008


Atis Lezdins <atis at iq-labs.net> wrote:
>On Fri, May 2, 2008 at 1:12 AM, Brian Degenhardt <bmd at digium.com> wrote:
>>
>> 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.

You'll still be able to set the accountcode in TRANSFER_CONTEXT, it's
just not going to implicitly cross across the bridge like underscore'd
channel variables.  Also note that in 99% of circumstances, there
isn't a CDR on the other end of the bridge, so this behavior didn't
really affect anything.

The primary change is pretty simple:

Index: app_dial.c
===================================================================
--- app_dial.c  (revision 115563)
+++ app_dial.c  (working copy)
@@ -1481,7 +1481,6 @@

                /* Copy language from incoming to outgoing */
                ast_string_field_set(tc, language, chan->language);
-               ast_string_field_set(tc, accountcode, chan->accountcode);
                tc->cdrflags = chan->cdrflags;
                if (ast_strlen_zero(tc->musicclass))
                        ast_string_field_set(tc, musicclass, chan->musicclass);


> 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"?

There's some logging functionality in Switchvox that we're trying to
get into asterisk open-source.  Right now it's very special-case to
the business rules of Switchvox, so I'm trying to explore ways of
doing it in a more general-purpose way.  The above changes to
accountcode help us do that.

Thanks again for your feedback

-bmd



More information about the asterisk-dev mailing list