I'm trying to write an additional column to the CDR database, both the mysql
cdr, and the built-in cdr.
I would like to be able to set CDR(ratecenter) and have it show up on the text
log, and also be inserted into the database as another column, much like
CDR(userfield), but I'm already using that for something else.
I'm not a C programmer, but I thought I would take a stab at it. Eventually,
I got it to work, but it only works properly when there is a single call (the
most recently dialed call works, the rest don't have any info).
Interestingly enough, the record is not NULL, it's blank.
Is there any way to do this in Asterisk 1.4.17 without re-inventing the wheel?
If not, is there anyone who would be able to help me out on this?
Posted: Thu Apr 17, 2008 11:39 am Post subject: [Asterisk-bsd] CDR-MYSQL additional columns
There is a cdr_adaptive_odbc module out there you can use for just
that purpose. It takes any variable you add to the table and inserts
in the database. However, it doesn't write to the file, just the
database.
I am successfully using it on 1.4.x
-Chris
On Wed, Apr 16, 2008 at 4:49 PM, Tim St. Pierre
<tim@communicatefreely.net> wrote:
Quote:
I'm trying to write an additional column to the CDR database, both the mysql
cdr, and the built-in cdr.
I would like to be able to set CDR(ratecenter) and have it show up on the text
log, and also be inserted into the database as another column, much like
CDR(userfield), but I'm already using that for something else.
I'm not a C programmer, but I thought I would take a stab at it. Eventually,
I got it to work, but it only works properly when there is a single call (the
most recently dialed call works, the rest don't have any info).
Interestingly enough, the record is not NULL, it's blank.
Is there any way to do this in Asterisk 1.4.17 without re-inventing the wheel?
If not, is there anyone who would be able to help me out on this?
It doesn't appear to be in the default distro, or the asterisk-addons port.
Thanks
-Tim
On Thursday 17 April 2008 08:26, Chris Coleman wrote:
Quote:
There is a cdr_adaptive_odbc module out there you can use for just
that purpose. It takes any variable you add to the table and inserts
in the database. However, it doesn't write to the file, just the
database.
I am successfully using it on 1.4.x
-Chris
On Wed, Apr 16, 2008 at 4:49 PM, Tim St. Pierre
<tim@communicatefreely.net> wrote:
> I'm trying to write an additional column to the CDR database, both the
> mysql cdr, and the built-in cdr.
>
> I would like to be able to set CDR(ratecenter) and have it show up on
> the text log, and also be inserted into the database as another column,
> much like CDR(userfield), but I'm already using that for something else.
>
> I'm not a C programmer, but I thought I would take a stab at it.
> Eventually, I got it to work, but it only works properly when there is a
> single call (the most recently dialed call works, the rest don't have any
> info).
>
> Interestingly enough, the record is not NULL, it's blank.
>
> Is there any way to do this in Asterisk 1.4.17 without re-inventing the
> wheel?
>
> If not, is there anyone who would be able to help me out on this?
>
> Currently, I had to modify:
>
> main/cdr.c
> funcs/func_cdr.c
> cdr/cdr_csv.c
> asterisk-addons/cdr/cdr_addon_mysql.c
>
> If you are up for it, I'll send my versions of these files, and you can
> have a look.
>
> I wish I were better at this, but C is 4th down the list of programming
> / scripting languages I have to learn in the next few months.
>
> Thanks for any help at all
>
> -Tim
> --
> Tim St. Pierre
>
> IP telephony specialist
> sip://5101@communicatefreely.net
> Toronto: 647 722 6930
> Toll-Free 1 888 488 6940
> tim@communicatefreely.net
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> Asterisk-BSD mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-bsd
On Fri, Apr 18, 2008 at 9:47 AM, Tim St. Pierre
<tim@communicatefreely.net> wrote:
Quote:
Thanks Chris!
Do you know where I would get such a module?
It doesn't appear to be in the default distro, or the asterisk-addons port.
Thanks
-Tim
On Thursday 17 April 2008 08:26, Chris Coleman wrote:
> There is a cdr_adaptive_odbc module out there you can use for just
> that purpose. It takes any variable you add to the table and inserts
> in the database. However, it doesn't write to the file, just the
> database.
>
> I am successfully using it on 1.4.x
>
> -Chris
>
> On Wed, Apr 16, 2008 at 4:49 PM, Tim St. Pierre
>
> <tim@communicatefreely.net> wrote:
> > I'm trying to write an additional column to the CDR database, both the
> > mysql cdr, and the built-in cdr.
> >
> > I would like to be able to set CDR(ratecenter) and have it show up on
> > the text log, and also be inserted into the database as another column,
> > much like CDR(userfield), but I'm already using that for something else.
> >
> > I'm not a C programmer, but I thought I would take a stab at it.
> > Eventually, I got it to work, but it only works properly when there is a
> > single call (the most recently dialed call works, the rest don't have any
> > info).
> >
> > Interestingly enough, the record is not NULL, it's blank.
> >
> > Is there any way to do this in Asterisk 1.4.17 without re-inventing the
> > wheel?
> >
> > If not, is there anyone who would be able to help me out on this?
> >
> > Currently, I had to modify:
> >
> > main/cdr.c
> > funcs/func_cdr.c
> > cdr/cdr_csv.c
> > asterisk-addons/cdr/cdr_addon_mysql.c
> >
> > If you are up for it, I'll send my versions of these files, and you can
> > have a look.
> >
> > I wish I were better at this, but C is 4th down the list of programming
> > / scripting languages I have to learn in the next few months.
> >
> > Thanks for any help at all
> >
> > -Tim
> > --
> > Tim St. Pierre
> >
> > IP telephony specialist
> > sip://5101@communicatefreely.net
> > Toronto: 647 722 6930
> > Toll-Free 1 888 488 6940
> > tim@communicatefreely.net
> >
> > _______________________________________________
> > --Bandwidth and Colocation Provided by http://www.api-digital.com--
> >
> > Asterisk-BSD mailing list
> > To UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-bsd
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum