CDR MYSQL missing field data

Home » Asterisk Users » CDR MYSQL missing field data
Asterisk Users 6 Comments


I have Asterisk-, dahdi-linux-complete-2.4.1+2.4.1, and
libpri- installed and running on a Ubuntu 10.04 server all built
from source.

Everything is working nicely except one small issue.

The CDR records are stored in the CSV file correctly and complete.

The MySQL storage is working as it should and is automatically updating
all the fields except the CLID field.

I have compared and constructed and destructed the system 3 times since
Thursday and I cannot figure out why the field does not get populated.

If I run the import from csv script it correctly populates the CLID so I
believe that tables are setup correct.

Has any one seen this and could possibly point me at the offending conf

I am more familiar than I want to be with cdr_xxxx.conf files and I
cannot find where the problem is.

I have browsed all the wiki’s, blogs, and emails looking for a hint and
I did not find anything.

Anything would be appreciated.

Thank you,


6 thoughts on - CDR MYSQL missing field data

  • Thanks Tilghman for your response.

    I have the following in my cdr_mysql.conf

    I put it in sometime yesterday and did not have it till then.

    However, it did not make any difference.

    static “” => alias => alias start => calldate
    alias callerid => clid
    alias src => src
    alias dst => dst
    alias dcontext => dcontext
    alias channel => channel
    alias dstchannel => dstchannel
    alias lastapp => lastapp
    alias lastdata => lastdata
    alias duration => duration
    alias billsec => billsec
    alias disposition => disposition
    alias amaflags => amaflags
    alias accountcode => accountcode
    alias userfield => userfield
    alias uniqueid => uniqueid

    Thanks again


  • Did you reload after making the change to the config file?

    These are bogus and should never have been uncommented.

    These are fine.

    There is no reason to have any of these uncommented, unless the column
    specified after the arrow is different from the field specified before.

  • I was incorrect, here, and there’s nobody to blame but myself. The
    field is ACTUALLY named “clid” internally, so when I, by default, set
    ANOTHER field to the “clid” column, I shut out the default logic which
    would have put the callerid into the “clid” column. This has now been fixed
    in 1.8 SVN, as a default configuration file fix. If you comment out the line
    marked “alias callerid => clid”, it should work fine.

  • I can confirm this – I just tested it on my system and the clid column is
    properly filled in now. Thanks for the quick fix Tilghman!

  • I can confirm this – I just tested it on my system and the clid column is
    properly filled in now. Thanks for the quick fix Tilghman!