[asterisk-users] Enabling MySQL UNIQUE from cdr.conf

James FitzGibbon james.fitzgibbon at gmail.com
Tue Sep 18 09:11:04 CDT 2007


On 9/17/07, Luís Palma <lpalma at gmail.com> wrote:

> Is there a way to enable the usage of UNIQUEID CDR field using a MySQL
> database backend for storing CDRs without having to recompile
> asterisk-addons as stated here
> http://www.voip-info.org/wiki-Asterisk+cdr+mysql ?
>
> After version 1.4 it is said in release that it can be done (not sure if
> it applies to mysql backend)


In addons v1.4.2,  it's not possible without recompilation.  You get one of
two versions of code depending on the definition of a compile time
constant.  If that constant isn't defined, the text of the SQL INSERT
statement in the shared module will be:

INSERT INTO %s
(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,userfield)

instead of

INSERT INTO %s
(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield)

In the -trunk version of cdr_addon_mysql.c, the behaviour of loguniqueid was
changed from a compile-time to runtime option, just like userfield already
was.

The changes to make loguniqueid a runtime option are pretty small, and
trivial to backport to the 1.4 branch on their own.  You'd have to do more
research to see if you can just build the trunk version against 1.4, given
that trunk also has added MySQL SSL support.

Of course, if your question stems from the fact that you are unable to
recompile anything in your installation, none of this is much help.  :(

-- 
j.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070918/8e7d4d5c/attachment.htm 


More information about the asterisk-users mailing list