freeswitch with postgres setup process?
Hello All, I have freeswitch installed from source on Debian 8.3 64 bit and Postgresql 9.4 installed from the Postgres packages[1]. What's the best way to have Freeswitch use a database that I'll setup and create? Do I need to recompile freeswitch with certain modules enabled? Do I need to enable to config flags? I've completed these things: install unixodbc-dev install odbc-postgresql update /etc/odbc.ini: [freeswitch] ; WARNING: The old psql odbc driver psqlodbc.so is now renamed psqlodbcw.so ; in version 08.x. Note that the library can also be installed under an other ; path than /usr/local/lib/ following your installation. Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so Description=Connection to LDAP/POSTGRESQL Servername=localhost Port=5432 Protocol=6.4 FetchBufferSize=99 Username=freeswitch Password=xxx Database=freeswitch ReadOnly=no Debug=1 CommLog=1 view etc/odbcinst.ini [PostgreSQL ANSI] Description=PostgreSQL ODBC driver (ANSI version) Driver=psqlodbca.so Setup=libodbcpsqlS.so Debug=0 CommLog=1 UsageCount=1 [PostgreSQL Unicode] Description=PostgreSQL ODBC driver (Unicode version) Driver=psqlodbcw.so Setup=libodbcpsqlS.so Debug=0 CommLog=1 UsageCount=1 And finally, test the connection: # isql -v freeswitch +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ [1] http://www.postgresql.org/download/linux/debian/ -- ------- inum: 883510009027723 sip: jungleboogie@sip2sip.info xmpp: jungle-boogie@jit.si
FreeSWITCH if configured at build time to use postgresql can use it directly or via odbc just by setting the DSN settings appropriately in the configs. Check confluence for the various module configs where you might want to sue a DB backend -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of jungle Boogie Sent: Sunday, April 10, 2016 11:23 AM To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: [Freeswitch-users] freeswitch with postgres setup process? Hello All, I have freeswitch installed from source on Debian 8.3 64 bit and Postgresql 9.4 installed from the Postgres packages[1]. What's the best way to have Freeswitch use a database that I'll setup and create? Do I need to recompile freeswitch with certain modules enabled? Do I need to enable to config flags? I've completed these things: install unixodbc-dev install odbc-postgresql update /etc/odbc.ini: [freeswitch] ; WARNING: The old psql odbc driver psqlodbc.so is now renamed psqlodbcw.so ; in version 08.x. Note that the library can also be installed under an other ; path than /usr/local/lib/ following your installation. Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so Description=Connection to LDAP/POSTGRESQL Servername=localhost Port=5432 Protocol=6.4 FetchBufferSize=99 Username=freeswitch Password=xxx Database=freeswitch ReadOnly=no Debug=1 CommLog=1 view etc/odbcinst.ini [PostgreSQL ANSI] Description=PostgreSQL ODBC driver (ANSI version) Driver=psqlodbca.so Setup=libodbcpsqlS.so Debug=0 CommLog=1 UsageCount=1 [PostgreSQL Unicode] Description=PostgreSQL ODBC driver (Unicode version) Driver=psqlodbcw.so Setup=libodbcpsqlS.so Debug=0 CommLog=1 UsageCount=1 And finally, test the connection: # isql -v freeswitch +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ [1] http://www.postgresql.org/download/linux/debian/ -- ------- inum: 883510009027723 sip: jungleboogie@sip2sip.info xmpp: jungle-boogie@jit.si _________________________________________________________________________ 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 Ken, On 10 April 2016 at 10:19, Ken Rice <krice@freeswitch.org> wrote:
FreeSWITCH if configured at build time to use postgresql can use it directly or via odbc just by setting the DSN settings appropriately in the configs. Check confluence for the various module configs where you might want to sue a DB backend
Okay, in the conf/autoload_configs/switch.conf.xml, I made this change: !-- <param name="core-db-dsn" value="dsn:username:password" /> --> <param name="core-db-dsn" value="dsn:freeswitch:xxx" /> Stopped and started FS. I still don't see any tables on the db. Is this the config flag to use posgres: ./configure --enable-core-pgsql-support Thanks!
See https://freeswitch.org/confluence/display/FREESWITCH/PostgreSQL+in+the+core Thanks, Moishe Grunstein Tornado Computer Systems, Inc. 212.400.7650 888.IPPBX.US Service Request Email: support@nysolutions.com Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of jungle Boogie Sent: Sunday, April 10, 2016 4:37 PM To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] freeswitch with postgres setup process? HI Ken, On 10 April 2016 at 10:19, Ken Rice <krice@freeswitch.org> wrote:
FreeSWITCH if configured at build time to use postgresql can use it directly or via odbc just by setting the DSN settings appropriately in the configs. Check confluence for the various module configs where you might want to sue a DB backend
Okay, in the conf/autoload_configs/switch.conf.xml, I made this change: !-- <param name="core-db-dsn" value="dsn:username:password" /> --> <param name="core-db-dsn" value="dsn:freeswitch:xxx" /> Stopped and started FS. I still don't see any tables on the db. Is this the config flag to use posgres: ./configure --enable-core-pgsql-support Thanks! _________________________________________________________________________ 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
On 10 April 2016 at 13:54, Moishe Grunstein <max@nysolutions.com> wrote:
See https://freeswitch.org/confluence/display/FREESWITCH/PostgreSQL+in+the+core
I was told odbc is preferred but I'll that page out and see what happens. Thanks! -- ------- inum: 883510009027723 sip: jungleboogie@sip2sip.info xmpp: jungle-boogie@jit.si
Whi said odbc is preferred? I prefer native pgsql over odbc every day Sent from my iPhone
On Apr 10, 2016, at 3:59 PM, jungle Boogie <jungleboogie0@gmail.com> wrote:
On 10 April 2016 at 13:54, Moishe Grunstein <max@nysolutions.com> wrote: See https://freeswitch.org/confluence/display/FREESWITCH/PostgreSQL+in+the+core
I was told odbc is preferred but I'll that page out and see what happens.
Thanks!
-- ------- inum: 883510009027723 sip: jungleboogie@sip2sip.info xmpp: jungle-boogie@jit.si
_________________________________________________________________________ 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
Thats because the db strings for native pgsql are libpq connect strings dsn:user:pass is odbc Sent from my iPhone
On Apr 10, 2016, at 3:37 PM, jungle Boogie <jungleboogie0@gmail.com> wrote:
HI Ken,
On 10 April 2016 at 10:19, Ken Rice <krice@freeswitch.org> wrote: FreeSWITCH if configured at build time to use postgresql can use it directly or via odbc just by setting the DSN settings appropriately in the configs. Check confluence for the various module configs where you might want to sue a DB backend
Okay, in the conf/autoload_configs/switch.conf.xml, I made this change:
!-- <param name="core-db-dsn" value="dsn:username:password" /> --> <param name="core-db-dsn" value="dsn:freeswitch:xxx" />
Stopped and started FS. I still don't see any tables on the db.
Is this the config flag to use posgres: ./configure --enable-core-pgsql-support
Thanks!
_________________________________________________________________________ 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
On 10 April 2016 at 14:44, Ken Rice <krice@freeswitch.org> wrote:
Thats because the db strings for native pgsql are libpq connect strings dsn:user:pass is odbc
Which one is correct if I do ./configure --enable-core-pgsql-support 1. <param name="core-db-dsn" value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='xxx' options='-c client_min_messages=NOTICE'" /> 2. <param name="core-db-dsn" value="dsn:freeswitch:xxx" /> Also, I see event_handlers/mod_cdr_pg_csv in modules.conf Does that need to be uncommented? Thanks, jb -- ------- inum: 883510009027723 sip: jungleboogie@sip2sip.info xmpp: jungle-boogie@jit.si
If you use postgres in the core 1. <param name="core-db-dsn" value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='xxx' options='-c client_min_messages=NOTICE'" /> https://freeswitch.org/confluence/display/FREESWITCH/PostgreSQL+in+the+core If you use odbc 2. <param name="core-db-dsn" value="dsn:freeswitch:xxx" /> https://freeswitch.org/confluence/display/FREESWITCH/ODBC+DSN Thanks, Moishe Grunstein Tornado Computer Systems, Inc. 212.400.7650 888.IPPBX.US Service Request Email: support@nysolutions.com Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of jungle Boogie Sent: Sunday, April 10, 2016 6:06 PM To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] freeswitch with postgres setup process? On 10 April 2016 at 14:44, Ken Rice <krice@freeswitch.org> wrote:
Thats because the db strings for native pgsql are libpq connect strings dsn:user:pass is odbc
Which one is correct if I do ./configure --enable-core-pgsql-support 1. <param name="core-db-dsn" value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='xxx' options='-c client_min_messages=NOTICE'" /> 2. <param name="core-db-dsn" value="dsn:freeswitch:xxx" /> Also, I see event_handlers/mod_cdr_pg_csv in modules.conf Does that need to be uncommented? Thanks, jb -- ------- inum: 883510009027723 sip: jungleboogie@sip2sip.info xmpp: jungle-boogie@jit.si _________________________________________________________________________ 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
participants (3)
-
jungle Boogie
-
Ken Rice
-
Moishe Grunstein