[Freeswitch-users] mod_callcenter, ODBC, mysql

Evgeniy Kozhuhovskiy e.kozhuhovskiy at gmail.com
Sun Aug 25 19:26:48 MSD 2013


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.

-- 
With best regards, Evgeniy Kozhuhovskiy



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