[Freeswitch-users] ODBC through JS (To all interested:)
Rupa Schomaker
freeswitch-users at lists.rupa.com
Wed Oct 15 23:23:22 PDT 2008
On 10/16/2008 12:23 AM, Gayatri Kulkarni wrote:
> when i run odbcinst -j on my system, it shows me 3 files:
> /usr/local/etc/odbc.ini
> /usr/local/etc/odbcinst.ini
> /root/.odbc.ini
>
> When all these files are identical, i can successfully esatcblish the
> connection through my JS script
> What does it show on your system?
$ sudo -u freeswitch odbcinst -j
unixODBC 2.2.11
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
USER DATA SOURCES..: /opt/freeswitch/.odbc.ini
/etc/odbcinst.ini:
[PostgreSQL ANSI]
Description = PostgreSQL ODBC driver (ANSI version)
Driver = /usr/lib/odbc/psqlodbca.so
Setup = /usr/lib/odbc/libodbcpsqlS.so
Debug = 0
CommLog = 1
UsageCount = 1
[PostgreSQL Unicode]
Description = PostgreSQL ODBC driver (Unicode version)
Driver = /usr/lib/odbc/psqlodbcw.so
Setup = /usr/lib/odbc/libodbcpsqlS.so
Debug = 0
CommLog = 1
UsageCount = 1
/etc/odbc.ini:
[phone]
Description = PostgreSQL
Driver = PostgreSQL ANSI
Trace = Yes
TraceFile = /tmp/psqlodbc.log
Database = phone
Servername = localhost
UserName =
Password =
Port =
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
ConnSettings =
/opt/freeswitch/.odbc.ini is an empty file
>
> --
> Regards,
> Gayatri Kulkarni
>
> On Mon, Oct 13, 2008 at 7:22 PM, Rupa Schomaker
> <freeswitch-users at lists.rupa.com
> <mailto:freeswitch-users at lists.rupa.com>> wrote:
>
> This seems to be dependent on how your ODBC is setup. On my system,
> using the debian supplied odbc, freeswitch is working just fine with
> /etc/odbc.ini.
>
> On 10/13/2008 2:58 AM, Gayatri Kulkarni wrote:
> > To all those who are interested:
> >
> > Freeswitch uses *.odbc.ini* file to connect to the database and
> not the
> > {prefix for unixODBC}/etc/odbc.ini
> > *so make sure that one is right before you use("ODBC")* in your
> > applications; otherwise even if you can successfully connect to
> your DB
> > with the isql command, you wont be able to use it through your FS
> app.
> >
> > It's good to find out things on my own :) (time consuming though!)
> >
> >
> > --
> > Regards,
> > Gayatri Kulkarni
> >
> > On Mon, Oct 13, 2008 at 11:21 AM, Gayatri Kulkarni
> > <xtpl.gayatri at gmail.com <mailto:xtpl.gayatri at gmail.com>
> <mailto:xtpl.gayatri at gmail.com <mailto:xtpl.gayatri at gmail.com>>> wrote:
> >
> > Like we have to add odbc-dsn as a parm name in the
> voicemail.xml for
> > voice mail,
> > do we ave to do add it somewhere for running it in javascript too?
> >
> > like i said before, i can successfully connect with same username,
> > password, DSN through isql utility
> > why does fs not find the DSN name?
> >
> >
> > --
> > Regards,
> > Gayatri Kulkarni
More information about the FreeSWITCH-users
mailing list