[Freeswitch-users] Lua FreeSWITCH 1.6 dbh and PostgreSQL

Abaci B abaci64 at gmail.com
Tue Jan 26 17:28:55 MSK 2016


it's freeswitch.Dbh with a capital D.

On Tue, Jan 26, 2016 at 3:03 AM, Artur Mega <findmeinwland at gmail.com> wrote:

> Hello everybody,
> How can i connect to postgres database from lua through freeswitch.dbh ?
>
> I tried
> local dbh = freeswitch.dbh("pgsql://hostaddr=127.0.0.1 dbname=some_db
> user=uname password='passwd'") -- returns nil
> local dbh = freeswitch.dbh("odbc://some_db:uname:passwd") -- returns nil
> too
>
> Also I set up ODBS with PostgreSQL driver. If I run this command in
> console:
>
> isql some_db uname passwd
>
> then I can successfully connect to my database. What am i doing wrong?
> Also I tried to link odbc*.ini files for freeswitch:
>
> mkdir /usr/local/freeswitch/etc
> ln -s /etc/odbcinst.ini /usr/local/freeswitch/etc/odbcinst.ini
> ln -s /etc/odbc.ini /usr/local/freeswitch/etc/odbc.ini
>
> but it doesn't help too. Thanks in advance.
>
> --
>
> Arthur
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160126/ea79e624/attachment-0001.html 


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