[Freeswitch-users] ODBC error STATE: HY000 CODE 21 ERROR

curriegrad2004 curriegrad2004 at gmail.com
Mon Feb 21 00:34:23 MSK 2011


sqlite should be built in freeswitch without needing unixODBC. There's
no need to use unixODBC unless you're trying to use MySQL or MSSQL
with FreeSwitch, iirc.

On Sun, Feb 20, 2011 at 10:41 AM, Erik Dekkers <erik.dekkers at wvds.nl> wrote:
> Hi guys,
>
>
>
> At the moment I'm doing some testing with mod_cidlookup. My intention is to
> match the incoming numbers against a local database. Right now im trying to
> set it up with SQLite.
>
> I've installed SQLite, unixODBC and created a DSN (freeswitch is also
> compiled with odbc support). When testing the connection to the SQLite
> database with the isql utility everything works:
>
>
>
> +---------------------------------------+
> | Connected!                            |
> |                                       |
> | sql-statement                         |
> | help [tablename]                      |
> | quit                                  |
> |                                       |
> +---------------------------------------+
> SQL>
>
>
>
>
>
> Unfortunately when starting freeswitch I get this error in the console:
>
>
>
> 2011-02-20 19:28:44.203665 [ERR] switch_odbc.c:365 STATE: HY000 CODE 21
> ERROR: [unixODBC][SQLite]connect failed
>
> 2011-02-20 19:28:44.203672 [CRIT] switch_core_sqldb.c:386 Failure!
> 2011-02-20 19:28:44.203677 [CRIT] mod_cidlookup.c:137 Cannot Open ODBC
> Database!
>
>
>
>
>
> Here's my config from /conf/autoload_configs/cidlookup.conf.xml:
>
>
>
> <configuration name="cidlookup.conf" description="cidlookup Configuration">
>   <settings>
>     <param name="cache" value="false"/>
>     <!-- expire is in seconds -->
>     <param name="cache-expire" value="86400"/>
>     <param name="odbc-dsn" value="mysqlitedb"/>
>
>     <!-- comment out sql to not setup a database (directory) lookup -->
>     <param name="sql" value="
>      SELECT name||' ('||type||')' AS name
>       FROM phonebook p JOIN numbers n ON p.id = n.phonebook_id
>       WHERE n.number='${caller_id_number}'
>       LIMIT 1
>       "/>
>   </settings>
> </configuration>
>
> I someone could point me into the right direction that would be great.
>
> Kind regards,
>
> Erik Dekkers (wvds-nl)
> _______________________________________________
> 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
>
>



More information about the FreeSWITCH-users mailing list