xyj70 / fusionpbx

Automatically exported from code.google.com/p/fusionpbx
0 stars 0 forks source link

odbc variables #320

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The ODBC access could be used on several scripts, could be usefull to have the 
parameters related to that on global vars, making use of that on the scripts 
instead of configuration files, like config.lua. For that we could consider the 
following variables, on vars.xml:
dsn_freeswitch
dsn_fusionpbx
dsn_user
dsn_pass
dsn_type 

Original issue reported on code.google.com by jferre...@wavecom.pt on 17 Sep 2012 at 6:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
In FusionPBX version 2 and lower that system -> variables would be the right 
place for that info. However in FusionPBX version 3 Advanced -> Databases. Is 
the correct place you choose odbc then set the database name is the DSN name, 
and username and password are respectively the DSN username and DSN password. 
When you save this it will write a LUA script file called config.lua that can 
be included. Only problem is at the moment the ODBC connection is assumed to be 
FusionPBX that gets defined to Advanced -> Databases. Still need to define a 
way to select one is for the system (fusionpbx) and one for switch (freeswitch)

Original comment by markjcrane@gmail.com on 18 Sep 2012 at 3:54

GoogleCodeExporter commented 9 years ago
I believe the best way is to generate automatically config.lua during the 
installation and upgrade phases, but we should not need to declare the 
freeswitch and fusionpbx odbc  parameters there, we could extract odbc 
parameters directly from autoload_configs/switch.conf.xml, the 
/advanced/databases could be usefull to connect to other external databases for 
other developments, and could be only compatible with odbc or sqlite freeswitch 
access. With that the result after the installation and upgrade time should be 
the following variables on config.lua

fusionpbx_db_type - odbc or sqlite
fusionpbx_dsn
fusionpbx_user
fusionpbx_pass
freeswitch_db_type
freeswitch_dsn
freeswitch_user
freeswitch_pass

The other Databases could be on the Advanced/databases but if somebody need 
them could query that table and create global variables, on runtime scripts, as 
they need to access them.

Original comment by jferre...@wavecom.pt on 18 Sep 2012 at 10:42

GoogleCodeExporter commented 9 years ago
FreeSWITCH 1.2.7 and higher the ODBC syntax has been changed. Also note if 
using PostgeSQL its now possible to use the native PostgreSQL driver directly 
with FreeSWITCH. Those using MySQL will have to continue to use ODBC.

In the dev branch that will be part of fusionpbx 3.3 I have a system_dsn 
(postgres) and switch_dsn (freeswitch) this approach allows for the new syntax 
sqlite:// pgsql:// and odbc://

Original comment by markjcrane@gmail.com on 24 Apr 2013 at 5:57

GoogleCodeExporter commented 9 years ago
No response from QA for more than 1 year so closing this ticket.

Original comment by ewsamu...@gmail.com on 19 Jul 2014 at 10:34