[asterisk-users] problem with inserting records into cdr

GlenM glenmillard at gmail.com
Sat Jun 5 11:18:49 CDT 2010


I am sorry I did not get back to you last night - I was so tired!

I don't have such a file, instead I have cdr_mysql.conf which does
connect. <----same thing I think - perhaps a different flavour of the module.
If you type asterisk -rx "show modules" | grep mysql at the command prompt, not the CLI, do you see the module loaded?


Could you point out which line, I found no line with replic as a search
string.
<----try adding this to your /etc/mysql/my.cnf file and restart MySQL server. Tail the log and see if you see any messages about asterisk connecting or SQL statements.

general_log_file        = /var/log/mysql/mysql.log
general_log             = 1

I know that in the asterisk CLI, if asterisk cannot connect to your 
database, you *may* see a message. I know I did when mine could NOT connect.

I hope these help you out - I am fairly new to Asterisk, and digging for 
information can sometimes be frustrating.

covici at ccs.covici.com said the following on 6/4/2010 2:46 PM:
> See my comments below.
>
> GlenM <glenmillard at gmail.com> wrote:
>
>   
>> Interesting that you should mention this:
>>
>> I am using Asterisk 1.4x and had the same issue - but fixed it. My issue 
>> was a combination of permissions and configuration.
>>
>> 1. in your cdr_addon_mysql.conf , have you tried connecting to the 
>> database using the credentials within ? - start there
>>     
> I don't have such a file, instead I have cdr_mysql.conf which does
> connect.
>
>   
>> 2. in your /etc/mysql/my.cnf - there is a line 'Logging and Replication' 
>> - do you have that enabled so you can see the SQL queries in the log?
>>     
> Could you point out which line, I found no line with replic as a search
> string.
>
>   
>> 3. if you connect to the asterisk cli ( asterisk -rvvvvv) do you see any 
>> messages regarding the database?
>>     
> Only when first starting up, default port, etc.
>
>   
>> Glen
>>
>> covici at ccs.covici.com said the following on 6/4/2010 11:19 AM:
>>     
>>> Most of the time there is no error message at all.
>>>
>>> Tiago Geada <tiago.geada at gmail.com> wrote:
>>>
>>>   
>>>       
>>>> pasting the error would help
>>>>
>>>> On 3 June 2010 20:56, <covici at ccs.covici.com> wrote:
>>>>
>>>>     
>>>>         
>>>>> Hi.  For several months now asterisk will mysteriously stop inserting
>>>>> records into cdr database.  I am using mysql and the asterisk addons
>>>>> 1.6.2 to accomplish this.  Sometimes there is a strange error about
>>>>> column names, but often there is no error, it just stops.  I just have
>>>>> to restart asterisk to get things going again, so I am stumped as to
>>>>> what is happening, or even how to troubleshoot.  I usually run in
>>>>> verbosity 4, but am not seeing anything of interest.
>>>>>
>>>>> Any ideas would be appreciated.
>>>>>
>>>>> --
>>>>> Your life is like a penny.  You're going to lose it.  The question is:
>>>>> How do
>>>>> you spend it?
>>>>>
>>>>>         John Covici
>>>>>         covici at ccs.covici.com
>>>>>
>>>>> --
>>>>> _____________________________________________________________________
>>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>>>>               http://www.asterisk.org/hello
>>>>>
>>>>> asterisk-users mailing list
>>>>> To UNSUBSCRIBE or update options visit:
>>>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>>
>>>>>       
>>>>>           
>>>> ----------------------------------------------------
>>>> Alternatives:
>>>>
>>>> ----------------------------------------------------
>>>> -- 
>>>> _____________________________________________________________________
>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>>>                http://www.asterisk.org/hello
>>>>
>>>> asterisk-users mailing list
>>>> To UNSUBSCRIBE or update options visit:
>>>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>     
>>>>         
>> -- 
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>                http://www.asterisk.org/hello
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>     
>
>   



More information about the asterisk-users mailing list