I need to run a DB query (Postgresql) from dialplan and store results in variables. I came across this link https://wiki.freeswitch.org/wiki/Mod_odbc_query and looks like this is what I need. But I was wondering if I can use direct (without odbc) query to postgresql. Is there any such application available? P.S. I read some posts about postgresql native support but have not been able to figure out what do I need to do to run a postgresql query from dialplan and store results with out odbc
Hi John, Give Lua a try: https://freeswitch.org/confluence/display/FREESWITCH/Lua+with+Database On Mon, Jan 12, 2015 at 5:27 PM, John Nash <john.nash778@gmail.com> wrote:
I need to run a DB query (Postgresql) from dialplan and store results in variables. I came across this link https://wiki.freeswitch.org/wiki/Mod_odbc_query and looks like this is what I need.
But I was wondering if I can use direct (without odbc) query to postgresql. Is there any such application available?
P.S. I read some posts about postgresql native support but have not been able to figure out what do I need to do to run a postgresql query from dialplan and store results with out odbc
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ítalo Rossi
OK. LuaSQL provides direct access to postgresql but does not support connection pooling. ""FreeSWITCH Database Handler" looks like a way to go but I have to go through using ODBC to postgresql right? Can there be any downside of using ODBC? On Tue, Jan 13, 2015 at 3:30 AM, Ítalo Rossi <italorossib@gmail.com> wrote:
Hi John,
Give Lua a try:
https://freeswitch.org/confluence/display/FREESWITCH/Lua+with+Database
On Mon, Jan 12, 2015 at 5:27 PM, John Nash <john.nash778@gmail.com> wrote:
I need to run a DB query (Postgresql) from dialplan and store results in variables. I came across this link https://wiki.freeswitch.org/wiki/Mod_odbc_query and looks like this is what I need.
But I was wondering if I can use direct (without odbc) query to postgresql. Is there any such application available?
P.S. I read some posts about postgresql native support but have not been able to figure out what do I need to do to run a postgresql query from dialplan and store results with out odbc
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ítalo Rossi
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi! https://freeswitch.org/confluence/display/FREESWITCH/PostgreSQL+in+the+core helps you 2015-01-13 9:59 GMT+03:00 John Nash <john.nash778@gmail.com>:
OK. LuaSQL provides direct access to postgresql but does not support connection pooling. ""FreeSWITCH Database Handler" looks like a way to go but I have to go through using ODBC to postgresql right? Can there be any downside of using ODBC?
On Tue, Jan 13, 2015 at 3:30 AM, Ítalo Rossi <italorossib@gmail.com> wrote:
Hi John,
Give Lua a try:
https://freeswitch.org/confluence/display/FREESWITCH/Lua+with+Database
On Mon, Jan 12, 2015 at 5:27 PM, John Nash <john.nash778@gmail.com> wrote:
I need to run a DB query (Postgresql) from dialplan and store results in variables. I came across this link https://wiki.freeswitch.org/wiki/Mod_odbc_query and looks like this is what I need.
But I was wondering if I can use direct (without odbc) query to postgresql. Is there any such application available?
P.S. I read some posts about postgresql native support but have not been able to figure out what do I need to do to run a postgresql query from dialplan and store results with out odbc
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ítalo Rossi
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- with best regards, Dmitriy Borisov
You should look into XML curl. On Jan 13, 2015 8:00 AM, "John Nash" <john.nash778@gmail.com> wrote:
OK. LuaSQL provides direct access to postgresql but does not support connection pooling. ""FreeSWITCH Database Handler" looks like a way to go but I have to go through using ODBC to postgresql right? Can there be any downside of using ODBC?
On Tue, Jan 13, 2015 at 3:30 AM, Ítalo Rossi <italorossib@gmail.com> wrote:
Hi John,
Give Lua a try:
https://freeswitch.org/confluence/display/FREESWITCH/Lua+with+Database
On Mon, Jan 12, 2015 at 5:27 PM, John Nash <john.nash778@gmail.com> wrote:
I need to run a DB query (Postgresql) from dialplan and store results in variables. I came across this link https://wiki.freeswitch.org/wiki/Mod_odbc_query and looks like this is what I need.
But I was wondering if I can use direct (without odbc) query to postgresql. Is there any such application available?
P.S. I read some posts about postgresql native support but have not been able to figure out what do I need to do to run a postgresql query from dialplan and store results with out odbc
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ítalo Rossi
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I don't think so. I have several boxes running in production with unixodbc (2.3) and it's pretty stable. Em 13/01/2015 04:03, "John Nash" <john.nash778@gmail.com> escreveu:
OK. LuaSQL provides direct access to postgresql but does not support connection pooling. ""FreeSWITCH Database Handler" looks like a way to go but I have to go through using ODBC to postgresql right? Can there be any downside of using ODBC?
On Tue, Jan 13, 2015 at 3:30 AM, Ítalo Rossi <italorossib@gmail.com> wrote:
Hi John,
Give Lua a try:
https://freeswitch.org/confluence/display/FREESWITCH/Lua+with+Database
On Mon, Jan 12, 2015 at 5:27 PM, John Nash <john.nash778@gmail.com> wrote:
I need to run a DB query (Postgresql) from dialplan and store results in variables. I came across this link https://wiki.freeswitch.org/wiki/Mod_odbc_query and looks like this is what I need.
But I was wondering if I can use direct (without odbc) query to postgresql. Is there any such application available?
P.S. I read some posts about postgresql native support but have not been able to figure out what do I need to do to run a postgresql query from dialplan and store results with out odbc
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ítalo Rossi
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Use freeswitch.Dbh (https://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh) It's stable and uses FreeSWITCH's connection pools. It supports any FreeSWITCH DSNs - so sqlite, ODBC or postgresql native driver. https://wiki.freeswitch.org/wiki/DSN
Surely you mean the Confluence pages at https://freeswitch.org/confluence/display/FREESWITCH/Lua+freeswitch+dbh https://freeswitch.org/confluence/display/FREESWITCH/Databases (formerly DSN) That nasty old wiki is deprecated, I don't know why people are still linking to it. Bote From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Steven Ayre Sent: Tuesday, 13 January, 2015 09:19 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Database query from dialplan Use freeswitch.Dbh (https://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh) It's stable and uses FreeSWITCH's connection pools. It supports any FreeSWITCH DSNs - so sqlite, ODBC or postgresql native driver. https://wiki.freeswitch.org/wiki/DSN
Simple, comes up on Google before confluence :) On Jan 13, 2015 9:37 PM, "Bote Man" <bote_radio@botecomm.com> wrote:
Surely you mean the Confluence pages at
https://freeswitch.org/confluence/display/FREESWITCH/Lua+freeswitch+dbh
https://freeswitch.org/confluence/display/FREESWITCH/Databases (formerly DSN)
That nasty old wiki is deprecated, I don't know why people are still linking to it.
Bote
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Steven Ayre *Sent:* Tuesday, 13 January, 2015 09:19 *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Database query from dialplan
Use freeswitch.Dbh (https://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh)
It's stable and uses FreeSWITCH's connection pools.
It supports any FreeSWITCH DSNs - so sqlite, ODBC or postgresql native driver.
https://wiki.freeswitch.org/wiki/DSN
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Actually, the search utility within Confluence is pretty good. If you just send people to https://confluence.freeswitch.org They can find what they want rather quickly, with the proper pointer. If something is still missing, we welcome the help in moving pages over to Confluence from the old wiki. Cheers! Bote From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of David Villasmil Govea Sent: Tuesday, 13 January, 2015 15:55 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Database query from dialplan Simple, comes up on Google before confluence :) On Jan 13, 2015 9:37 PM, "Bote Man" <bote_radio@botecomm.com> wrote: Surely you mean the Confluence pages at https://freeswitch.org/confluence/display/FREESWITCH/Lua+freeswitch+dbh https://freeswitch.org/confluence/display/FREESWITCH/Databases (formerly DSN) That nasty old wiki is deprecated, I don't know why people are still linking to it. Bote From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Steven Ayre Sent: Tuesday, 13 January, 2015 09:19 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Database query from dialplan Use freeswitch.Dbh (https://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh) It's stable and uses FreeSWITCH's connection pools. It supports any FreeSWITCH DSNs - so sqlite, ODBC or postgresql native driver. https://wiki.freeswitch.org/wiki/DSN _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thought that per Ken it is http://freeswitch.org/confluence now... Yossi On 01/13/2015 03:38 PM, Bote Man wrote:
Actually, the search utility within Confluence is pretty good. If you just send people to
https://confluence.freeswitch.org
They can find what they want rather quickly, with the proper pointer.
If something is still missing, we welcome the help in moving pages over to Confluence from the old wiki.
Cheers!
Bote
*From:*freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *David Villasmil Govea *Sent:* Tuesday, 13 January, 2015 15:55 *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Database query from dialplan
Simple, comes up on Google before confluence :)
On Jan 13, 2015 9:37 PM, "Bote Man" <bote_radio@botecomm.com <mailto:bote_radio@botecomm.com>> wrote:
Surely you mean the Confluence pages at
https://freeswitch.org/confluence/display/FREESWITCH/Lua+freeswitch+dbh
https://freeswitch.org/confluence/display/FREESWITCH/Databases (formerly DSN)
That nasty old wiki is deprecated, I don't know why people are still linking to it.
Bote
*From:*freeswitch-users-bounces@lists.freeswitch.org <mailto:freeswitch-users-bounces@lists.freeswitch.org> [mailto:freeswitch-users-bounces@lists.freeswitch.org <mailto:freeswitch-users-bounces@lists.freeswitch.org>] *On Behalf Of *Steven Ayre *Sent:* Tuesday, 13 January, 2015 09:19 *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Database query from dialplan
Use freeswitch.Dbh (https://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh)
It's stable and uses FreeSWITCH's connection pools.
It supports any FreeSWITCH DSNs - so sqlite, ODBC or postgresql native driver.
https://wiki.freeswitch.org/wiki/DSN
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@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@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thank you. I have compiled freeswitch with postgresql core as per https://freeswitch.org/confluence/display/FREESWITCH/PostgreSQL+in+the+core I read many documentation pages but am still confused on few points... 1- Can freeswitch.dbh be used directly as core dsn (without ODBC Like the DSN used at freeswitch startup). If yes would it support connection pooling? 2- Can freeswitch.dbh be used to connect to some different database (Then core database) in lua scripts? On Wed, Jan 14, 2015 at 2:06 AM, Bote Man <bote_radio@botecomm.com> wrote:
Surely you mean the Confluence pages at
https://freeswitch.org/confluence/display/FREESWITCH/Lua+freeswitch+dbh
https://freeswitch.org/confluence/display/FREESWITCH/Databases (formerly DSN)
That nasty old wiki is deprecated, I don't know why people are still linking to it.
Bote
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Steven Ayre *Sent:* Tuesday, 13 January, 2015 09:19 *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Database query from dialplan
Use freeswitch.Dbh (https://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh)
It's stable and uses FreeSWITCH's connection pools.
It supports any FreeSWITCH DSNs - so sqlite, ODBC or postgresql native driver.
https://wiki.freeswitch.org/wiki/DSN
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
hello, 1- Can freeswitch.dbh be used directly as core dsn (without ODBC Like the DSN used at freeswitch startup). If yes would it support connection pooling? I believe you must use odbc. As someone said before, yes, it will use connection pooling. 2- Can freeswitch.dbh be used to connect to some different database (Then core database) in lua scripts? Yes, you can connect to any db. In the case of MySQL it's like so: /etc/odbc.ini [freeswitch] Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so SERVER = [SERVER-IP] PORT = 3306 DATABASE = [DATABASE] OPTION = 67108864 USER = [USER] PASSWORD = [PASSWORD] [my_other_db] Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so SERVER = [SERVER-IP] PORT = 3306 DATABASE = [DATABASE] OPTION = 67108864 USER = [USER] PASSWORD = [PASSWORD] /etc/odbcinst.ini [MySQL] Description = MySQL driver Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so UsageCount = 1 FileUsage = 1 Threading = 0 function dbConnect() conn = freeswitch.Dbh("odbc://my_other_db:user:passw"); assert(conn:connected()) end On Wed, Jan 14, 2015 at 8:24 AM, John Nash <john.nash778@gmail.com> wrote:
Thank you.
I have compiled freeswitch with postgresql core as per https://freeswitch.org/confluence/display/FREESWITCH/PostgreSQL+in+the+core I read many documentation pages but am still confused on few points...
1- Can freeswitch.dbh be used directly as core dsn (without ODBC Like the DSN used at freeswitch startup). If yes would it support connection pooling?
2- Can freeswitch.dbh be used to connect to some different database (Then core database) in lua scripts?
On Wed, Jan 14, 2015 at 2:06 AM, Bote Man <bote_radio@botecomm.com> wrote:
Surely you mean the Confluence pages at
https://freeswitch.org/confluence/display/FREESWITCH/Lua+freeswitch+dbh
https://freeswitch.org/confluence/display/FREESWITCH/Databases (formerly DSN)
That nasty old wiki is deprecated, I don't know why people are still linking to it.
Bote
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Steven Ayre *Sent:* Tuesday, 13 January, 2015 09:19 *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] Database query from dialplan
Use freeswitch.Dbh (https://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh)
It's stable and uses FreeSWITCH's connection pools.
It supports any FreeSWITCH DSNs - so sqlite, ODBC or postgresql native driver.
https://wiki.freeswitch.org/wiki/DSN
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- DVG -- Imagination is more important than knowledge Albert Einstein
Hello, Just out of curiosity, has anyone managed to connect to MySQL via Handlersocket ? If yes, would appreciate tips. Cheers, Abdul Hakeem From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of David Villasmil Govea Sent: Wednesday, January 14, 2015 2:06 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Database query from dialplan hello, 1- Can freeswitch.dbh be used directly as core dsn (without ODBC Like the DSN used at freeswitch startup). If yes would it support connection pooling? I believe you must use odbc. As someone said before, yes, it will use connection pooling. 2- Can freeswitch.dbh be used to connect to some different database (Then core database) in lua scripts? Yes, you can connect to any db. In the case of MySQL it's like so: /etc/odbc.ini [freeswitch] Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so SERVER = [SERVER-IP] PORT = 3306 DATABASE = [DATABASE] OPTION = 67108864 USER = [USER] PASSWORD = [PASSWORD] [my_other_db] Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so SERVER = [SERVER-IP] PORT = 3306 DATABASE = [DATABASE] OPTION = 67108864 USER = [USER] PASSWORD = [PASSWORD] /etc/odbcinst.ini [MySQL] Description = MySQL driver Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so UsageCount = 1 FileUsage = 1 Threading = 0 function dbConnect() conn = freeswitch.Dbh("odbc://my_other_db:user:passw"); assert(conn:connected()) end On Wed, Jan 14, 2015 at 8:24 AM, John Nash <john.nash778@gmail.com> wrote: Thank you. I have compiled freeswitch with postgresql core as per https://freeswitch.org/confluence/display/FREESWITCH/PostgreSQL+in+the+core I read many documentation pages but am still confused on few points... 1- Can freeswitch.dbh be used directly as core dsn (without ODBC Like the DSN used at freeswitch startup). If yes would it support connection pooling? 2- Can freeswitch.dbh be used to connect to some different database (Then core database) in lua scripts? On Wed, Jan 14, 2015 at 2:06 AM, Bote Man <bote_radio@botecomm.com> wrote: Surely you mean the Confluence pages at https://freeswitch.org/confluence/display/FREESWITCH/Lua+freeswitch+dbh https://freeswitch.org/confluence/display/FREESWITCH/Databases (formerly DSN) That nasty old wiki is deprecated, I don't know why people are still linking to it. Bote From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Steven Ayre Sent: Tuesday, 13 January, 2015 09:19 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Database query from dialplan Use freeswitch.Dbh (https://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh) It's stable and uses FreeSWITCH's connection pools. It supports any FreeSWITCH DSNs - so sqlite, ODBC or postgresql native driver. https://wiki.freeswitch.org/wiki/DSN _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- DVG -- Imagination is more important than knowledge Albert Einstein
participants (8)
-
Abdul Hakeem
-
Bote Man
-
David Villasmil Govea
-
I put the Who? in Mishehu
-
John Nash
-
Steven Ayre
-
Ítalo Rossi
-
Борисов, Дмитрий / Dmitriy Borisov