[Asterisk-bsd] CDR-MYSQL additional columns

Chris Coleman chrisc at vmunix.com
Thu Apr 17 07:26:30 CDT 2008


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



More information about the Asterisk-BSD mailing list