• News
  • Idefisk
  • Tools
  • Tutorials
  • Forum
  • Reviews
  • VoIP Providers
  • Archives
  • Gallery
ZOIPER softphone
AsteriskGuru Archives
Mailing List Archives
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Asterisk-bsd] CDR-MYSQL additional columns

 
   AsteriskGuru Archives Forum Index -> Asterisk-BSD
View previous topic :: View next topic  
Author Message
tim at communicatefreely.
Guest





PostPosted: Wed Apr 16, 2008 8:58 pm    Post subject: [Asterisk-bsd] CDR-MYSQL additional columns

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
Back to top
chrisc at vmunix.com
Guest





PostPosted: 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?

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




--
Chris Coleman -- http://songnumbers.com

_______________________________________________
--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
Back to top
tim at communicatefreely.
Guest





PostPosted: Fri Apr 18, 2008 1:55 pm    Post subject: [Asterisk-bsd] CDR-MYSQL additional columns

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:
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

--
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
Back to top
chrisc at vmunix.com
Guest





PostPosted: Fri Apr 18, 2008 2:39 pm    Post subject: [Asterisk-bsd] CDR-MYSQL additional columns

http://svncommunity.digium.com/view/tilghman/branches/1.4/cdr_adaptive_odbc.c

-Chris

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

--
Tim St. Pierre

IP telephony specialist
sip://5101@communicatefreely.net
Toronto: 647 722 6930
Toll-Free 1 888 488 6940
tim@communicatefreely.net




--
Chris Coleman -- http://songnumbers.com

_______________________________________________
--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
Back to top
Display posts from previous:   
   AsteriskGuru Archives Forum Index -> Asterisk-BSD All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™