[Freeswitch-users] mod_callcenter, ODBC, mysql

Evgeniy Kozhuhovskiy e.kozhuhovskiy at gmail.com
Mon Aug 26 02:40:19 MSD 2013


Thanks, I've already solved.

This behavior can be enabled in odbc.ini by adding OPTION=67108864

On Mon, Aug 26, 2013 at 1:09 AM, Ken Rice <krice at freeswitch.org> wrote:
> That's a thing in ODBC that only allows 1 query at a time... You need to
> look at your ODBC/MySQL settings to force it to enable > 1 SQL query per
> statement
>
> K
>
>
>
> On 8/25/13 10:26 AM, "Evgeniy Kozhuhovskiy" <e.kozhuhovskiy at gmail.com>
> wrote:
>
>> I've switched from sqlite to mysql in mod_callcenter, and in fs log I
>> see a lot of SQL errors
>>
>> On start of mod_callcenter
>>
>> 2013-08-25 18:19:06.739653 [ERR] switch_odbc.c:514 ERR: [update agents
>> set state = 'Waiting', uuid = '' where system = 'single_box';update
>> tiers set state = 'Ready' where agent IN (select name from agents
>> where system = 'single_box');update members set state = 'Abandoned',
>> session_uuid = '' where system = 'single_box';]
>> [STATE: 42000 CODE 1064 ERROR: [unixODBC][MySQL][ODBC 5.1
>> Driver][mysqld-5.1.66-0+squeeze1]You have an error in your SQL syntax;
>> check the manual that corresponds to your MySQL server version for the
>> right syntax to use near 'update tiers set state = 'Ready' where agent
>> IN (select name from agents where s' at line 1
>> ]
>> 2013-08-25 18:19:06.739653 [ERR] switch_core_sqldb.c:585 ODBC SQL ERR
>> [STATE: 42000 CODE 1064 ERROR: [unixODBC][MySQL][ODBC 5.1
>> Driver][mysqld-5.1.66-0+squeeze1]You have an error in your SQL syntax;
>> check the manual that corresponds to your MySQL server version for the
>> right syntax to use near 'update tiers set state = 'Ready' where agent
>> IN (select name from agents where s' at line 1
>> ]
>> update agents set state = 'Waiting', uuid = '' where system =
>> 'single_box';update tiers set state = 'Ready' where agent IN (select
>> name from agents where system = 'single_box');update members set state
>> = 'Abandoned', session_uuid = '' where system = 'single_box';
>>
>> And during work:
>>
>> 2013-08-25 18:18:22.059648 [ERR] switch_odbc.c:514 ERR: [UPDATE tiers
>> SET state = 'Ready' WHERE agent = '715' AND queue = 'nal at default' AND
>> (state = 'Active Inbound' OR state = 'Standby' OR state =
>> 'Offering');UPDATE tiers SET state = 'Ready' WHERE agent = '715' AND
>> NOT queue = 'nal at default' AND state = 'Standby']
>> [STATE: 42000 CODE 1064 ERROR: [unixODBC][MySQL][ODBC 5.1
>> Driver][mysqld-5.1.66-0+squeeze1]You have an error in your SQL syntax;
>> check the manual that corresponds to your MySQL server version for the
>> right syntax to use near 'UPDATE tiers SET state = 'Ready' WHERE agent
>> = '715' AND NOT queue = 'nal at defaul' at line 1
>> ]
>> 2013-08-25 18:18:22.059648 [ERR] switch_core_sqldb.c:585 ODBC SQL ERR
>> [STATE: 42000 CODE 1064 ERROR: [unixODBC][MySQL][ODBC 5.1
>> Driver][mysqld-5.1.66-0+squeeze1]You have an error in your SQL syntax;
>> check the manual that corresponds to your MySQL server version for the
>> right syntax to use near 'UPDATE tiers SET state = 'Ready' WHERE agent
>> = '715' AND NOT queue = 'nal at defaul' at line 1
>> ]
>> UPDATE tiers SET state = 'Ready' WHERE agent = '715' AND queue =
>> 'nal at default' AND (state = 'Active Inbound' OR state = 'Standby' OR
>> state = 'Offering');UPDATE tiers SET state = 'Ready' WHERE agent =
>> '715' AND NOT queue = 'nal at default' AND state = 'Standby'
>> 2013-08-25 18:18:22.059648 [DEBUG] mod_callcenter.c:1046 Updated Agent
>> 715 set state = Waiting
>> 2013-08-25 18:18:27.099646 [DEBUG] mod_callcenter.c:1046 Updated Agent
>> 715 set state = Receiving
>> 2013-08-25 18:18:27.099646 [ERR] switch_odbc.c:514 ERR: [UPDATE tiers
>> SET state = 'Offering' WHERE agent = '715' AND queue =
>> 'nal at default';UPDATE tiers SET state = 'Standby' WHERE agent = '715'
>> AND NOT queue = 'nal at default' AND state = 'Ready';]
>> [STATE: 42000 CODE 1064 ERROR: [unixODBC][MySQL][ODBC 5.1
>> Driver][mysqld-5.1.66-0+squeeze1]You have an error in your SQL syntax;
>> check the manual that corresponds to your MySQL server version for the
>> right syntax to use near 'UPDATE tiers SET state = 'Standby' WHERE
>> agent = '715' AND NOT queue = 'nal at defa' at line 1
>> ]
>> 2013-08-25 18:18:27.099646 [ERR] switch_core_sqldb.c:585 ODBC SQL ERR
>> [STATE: 42000 CODE 1064 ERROR: [unixODBC][MySQL][ODBC 5.1
>> Driver][mysqld-5.1.66-0+squeeze1]You have an error in your SQL syntax;
>> check the manual that corresponds to your MySQL server version for the
>> right syntax to use near 'UPDATE tiers SET state = 'Standby' WHERE
>> agent = '715' AND NOT queue = 'nal at defa' at line 1
>> ]
>> UPDATE tiers SET state = 'Offering' WHERE agent = '715' AND queue =
>> 'nal at default';UPDATE tiers SET state = 'Standby' WHERE agent = '715'
>> AND NOT queue = 'nal at default' AND state = 'Ready';
>>
>>
>> But if I'm executing that queries directly at mysql client, everything
>> is ok. Is that a problem with ODBC drivers? Or what? May be someone
>> had the same expirience.
>>
>>
>> P.S
>>
>> root at callcenter:~# /usr/local/freeswitch/bin/freeswitch -version
>> FreeSWITCH version: 1.5.5b+git~20130809T135445Z~60e8ca1bcc (git
>> 60e8ca1 2013-08-09 13:54:45Z)
>> root at callcenter:~# cat /etc/debian_version
>> 6.0.6
>> Everything except fs installed from debian repo.
>
> --
> Ken
> http://www.FreeSWITCH.org
> http://www.ClueCon.com
> http://www.OSTAG.org
> irc.freenode.net #freeswitch
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org



-- 
With best regards, Evgeniy Kozhuhovskiy



Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list