[asterisk-users] realtime queue_log to mySQL backport to 1.4
Atis Lezdins
atis at iq-labs.net
Wed Oct 15 06:37:52 CDT 2008
Hi John,
this is getting quite strange, and i'm becoming quite curios why it's
not working :)
Could you try first setting up realtime for SIP or queues? This should
work out-of-the-box on 1.4.
http://www.voip-info.org/wiki/view/Asterisk+RealTime+Sip
http://www.voip-info.org/wiki/view/Asterisk+RealTime+Queue
For beginning you can just add queues=>.. in extconfig.conf to see
that SQLs go trough and return errors.
You should see SELECT's in your log whenever accessing.
For example, entering into CLI:
ast-dev14*CLI> queue show myqueue
would write into log:
[Oct 15 04:04:09] DEBUG[9935] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Oct 15 04:04:09] DEBUG[9935] res_config_mysql.c: MySQL RealTime:
Retrieve SQL: SELECT * FROM queue_table WHERE name = 'myqueue'
Also i would suggest enabling full log, as it's one place you can see
everything. Then use grep to search for realtime messages. Your
logger.conf should already have commented line:
full => notice,warning,error,debug,verbose
Then you can do:
# tail -fn0 /var/log/asterisk/full | grep -F "res_config_mysql"
to see every message about realtime driver.
After this you can unload and load module or restart asterisk
completely (if restarting, make sure it's started with "-vvvd").
To reload module, use:
ast-dev14*CLI> module unload res_config_mysql.so
MySQL RealTime unloaded.
ast-dev14*CLI> module load res_config_mysql.so
== Parsing '/etc/asterisk/res_mysql.conf': Found
MySQL RealTime driver loaded.
Loaded res_config_mysql.so => (MySQL RealTime Configuration Driver)
On Wed, Oct 15, 2008 at 9:05 AM, Lee, John (Sydney)
<John.Lee at compuware.com> wrote:
> Hi Atis,
>
>> queue_log => mysql,asteriskcdrdb,queue_log
>> that is <engine>,<database>,<table>
>> If it's wrong, you should see some warnings when asterisk is starting
> up.
>>
> Thanks for the suggestion. I did not put in queue_log for <table> and
> it has just taken the default which is queue_log.
> In the console startup, you can see below that it has successfully bound
> queue_log to /mysql/db1/queue_log.
>
> # asterisk -rvvv
> Asterisk 1.4.21.2, Copyright (C) 1999 - 2008 Digium, Inc. and others.
> [...]
> == Parsing '/etc/asterisk/extconfig.conf': Found
> == Binding queue_log to mysql/db1/queue_log
> Connected to Asterisk 1.4.21.2 currently running on machine
> Verbosity is at least 3
This seems somehow strange. If you connect to running asterisk with
-r, you shouldn't see "parsing extconfig.conf", as it should be parsed
on startup time. You could also add -d to enable "debug 1".
>
> In /var/log/asterisk/messages, I saw:
> [Oct 15 15:31:48] NOTICE[20941] config.c: Registered Config Engine mysql
>
>> Another idea that came into my mind is, that (if this config doesn't
>> still work) you might have to do "make dist-clean" within
>> asterisk-addons after reinstalling asterisk, and then configure, make,
>> make install. It's because addons do use headers from installed
>> version of asterisk, and they might not have correct declarations.
>>
>
> Basically, I did:
> -> Asterisk-1.4.21.2
> "make clean"
> "./configure"
> "make"
> "make install"
>
> -> Asterisk-addons-1.4.7
> "make dist-clean"
> "./configure"
> "make"
> "make install"
Yes, this is completely correct (assuming you restarted asterisk after :)
>
>> Also, you mentioned that you checked /var/log/asterisk/messages,
>> however i think debug is written into file called "debug". Anyway you
>> can enable "full" in logger.conf and get everything there. To debug
>> this you shouldn't need more than "core set verbose 3" and "core set
>> debug 1".
>
> I turned on debug mode and tried an agent login and logoff.
> However, when I looked into debug and messages, there are lots of
> chan_sip.c and a few cdr_addon_mysql.c but no occurrence at all of
> res_config_mysql.c
>
> What is happening? Do I have to explicitly load it?
>
> *CLI> module show like res_config_mysql
> Module Description Use
> Count
> res_config_mysql.so MySQL RealTime Configuration Driver 0
> 1 modules loaded
This should also be fine.
You could also try catching me on irc, just look for atis_work or
atis_home in #asterisk.
Regards,
Atis
--
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835
More information about the asterisk-users
mailing list