[Freeswitch-users] ODBC error STATE: HY000 CODE 21 ERROR
Steven Ayre
steveayre at gmail.com
Mon Feb 21 12:17:46 MSK 2011
mysqlitedb is your dsn? Can you can share your unixodbc config files -
perhaps there's a problem in there.
-Steve
On 21 February 2011 08:49, Erik Dekkers <erik.dekkers at wvds.nl> wrote:
> Steve,
>
>
>
> Thnx for this explanation! Now it’s clear to me.
>
> Still having the connection failure. Any idea’s how to fix it? The
> errorcodes doesn’t provide detailed information of the problem and how to
> fix it.
>
>
>
> Thnx
>
>
>
> Erik
>
>
>
> *Van:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at lists.freeswitch.org] *N**amens *
> Steven Ayre
> *Verzonden:* maandag 21 februari 2011 9:37
>
> *Aan:* FreeSWITCH Users Help
> *Onderwerp:* Re: [Freeswitch-users] ODBC error STATE: HY000 CODE 21 ERROR
>
>
>
> While ODBC isn't required for the core for a few modules such as mod_sofia,
> most modules that use a database do need ODBC - mod_cidlookup is one of
> them.
>
> -Steve
>
> On 21 February 2011 08:18, Erik Dekkers <erik.dekkers at wvds.nl> wrote:
>
> Thnx for the answer,
>
> Mod_cidlookup requires that you set a DSN so it knows where to get the data
> right? How would I connect mod_cidlookup to a db without setting a DSN?
>
> Regards
>
> Erik
>
> -----Oorspronkelijk bericht-----
> Van: freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at lists.freeswitch.org] Namens Steven Ayre
> Verzonden: maandag 21 februari 2011 1:04
> Aan: FreeSWITCH Users Help
> Onderwerp: Re: [Freeswitch-users] ODBC error STATE: HY000 CODE 21 ERROR
>
>
> Correct. Sqlite doesn't use odbc, you only need unixodbc if you want to
> connect via odbc to mysql, mssql, postgresql etc.
>
> Steve on iPhone
>
> On 20 Feb 2011, at 21:34, curriegrad2004 <curriegrad2004 at gmail.com> wrote:
>
> > 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-us
> >> ers
> >> http://www.freeswitch.org
> >>
> >>
> >
> > _______________________________________________
> > 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-use
> > rs
> > http://www.freeswitch.org
>
> _______________________________________________
> 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
>
> _______________________________________________
> 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
>
>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110221/23a93b53/attachment.html
More information about the FreeSWITCH-users
mailing list