Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Switch to MySQL db for config


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
lists at telium.io
Guest





PostPosted: Mon Dec 06, 2021 10:56 am    Post subject: [Freeswitch-users] Switch to MySQL db for config Reply with quote

I would like to use MySQL to hold my FreeSWITCH config. I found instructions on how to setup the DSN, but how to I create the db/table structure? Is there a script to do this?
Back to top
Antony.Stone at freesw...
Guest





PostPosted: Mon Dec 06, 2021 11:10 pm    Post subject: [Freeswitch-users] Switch to MySQL db for config Reply with quote

On Monday 06 December 2021 at 16:00:30, TTT wrote:

Quote:
I would like to use MySQL to hold my FreeSWITCH config.

What do you mean by "config"?

All of it, or just certain aspects (such as user directory, SIP registrations,
dialplan...)?

Quote:
I found instructions on how to setup the DSN,

Point us at the URL so that we know what you're doing?

Quote:
but how to I create the db/table structure? Is there a script to do this?

What are you using as the "glue" between MySQL and FreeSwitch? Common options
would be xml-curl or lua. In both cases you create your DB tables however you
like, and you then write a lua script or create something that curl can
interrogate, to return the XML which you would otherwise have placed into a
flat file for FreeSwitch to parse.


Regards,


Antony.

--
.evah I serutangis sseltniop tsom eht fo eno eb tsum sihT

Please reply to the list;
please *don't* CC me.

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://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
https://freeswitch.com
Back to top
lists at telium.io
Guest





PostPosted: Tue Dec 07, 2021 11:11 pm    Post subject: [Freeswitch-users] Switch to MySQL db for config Reply with quote

I was actually referring to FreeSWITCH core. I'm reading a book on FreeSwitch (https://www.amazon.ca/FreeSWITCH-1-8-Anthony-Minessale-II-ebook/dp/B071ZZBH8G/ref=sr_1_3?keywords=freeswitch&qid=1638915802&s=books&sr=1-3) and it mentions that FreeSWITCH keeps its operating information in a database at runtime. I think it's PostgreSQL

I was wondering if/how I could switch that to MySQL. I thought there might be a DSN setting in the XML registry that affects this. This books says you can setup ODBC providers but it's not clear how, or if this applies to "core".

-----Original Message-----
From: FreeSWITCH-users [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Antony Stone
Sent: Monday, December 6, 2021 11:02 AM
To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org>
Subject: Re: [Freeswitch-users] Switch to MySQL db for config

On Monday 06 December 2021 at 16:00:30, TTT wrote:

Quote:
I would like to use MySQL to hold my FreeSWITCH config.

What do you mean by "config"?

All of it, or just certain aspects (such as user directory, SIP registrations, dialplan...)?

Quote:
I found instructions on how to setup the DSN,

Point us at the URL so that we know what you're doing?

Quote:
but how to I create the db/table structure? Is there a script to do this?

What are you using as the "glue" between MySQL and FreeSwitch? Common options would be xml-curl or lua. In both cases you create your DB tables however you like, and you then write a lua script or create something that curl can interrogate, to return the XML which you would otherwise have placed into a flat file for FreeSwitch to parse.


Regards,


Antony.

--
.evah I serutangis sseltniop tsom eht fo eno eb tsum sihT

Please reply to the list;
please *don't* CC me.

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://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
https://freeswitch.com


_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://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
https://freeswitch.com
Back to top
martin at pattersong.c...
Guest





PostPosted: Wed Dec 08, 2021 4:37 am    Post subject: [Freeswitch-users] Switch to MySQL db for config Reply with quote

This page talks about it:
https://freeswitch.org/confluence/display/FREESWITCH/ODBC+DSN.
Basically there's a parameter switch-core-dsn in switch.conf.xml. In
the vanilla config there's a bunch of comments in that file explaining
the options.

No need to worry about creating the schema - FreeSWITCH does that for you.

Martin.

Martin Paterson, Pattersong Music
Reduced orchestrations of G&S

On Tue, 7 Dec 2021 at 22:25, TTT <lists@telium.io> wrote:
Quote:

I was actually referring to FreeSWITCH core. I'm reading a book on FreeSwitch (https://www.amazon.ca/FreeSWITCH-1-8-Anthony-Minessale-II-ebook/dp/B071ZZBH8G/ref=sr_1_3?keywords=freeswitch&qid=1638915802&s=books&sr=1-3) and it mentions that FreeSWITCH keeps its operating information in a database at runtime. I think it's PostgreSQL

I was wondering if/how I could switch that to MySQL. I thought there might be a DSN setting in the XML registry that affects this. This books says you can setup ODBC providers but it's not clear how, or if this applies to "core".

-----Original Message-----
From: FreeSWITCH-users [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Antony Stone
Sent: Monday, December 6, 2021 11:02 AM
To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org>
Subject: Re: [Freeswitch-users] Switch to MySQL db for config

On Monday 06 December 2021 at 16:00:30, TTT wrote:

Quote:
I would like to use MySQL to hold my FreeSWITCH config.

What do you mean by "config"?

All of it, or just certain aspects (such as user directory, SIP registrations, dialplan...)?

Quote:
I found instructions on how to setup the DSN,

Point us at the URL so that we know what you're doing?

Quote:
but how to I create the db/table structure? Is there a script to do this?

What are you using as the "glue" between MySQL and FreeSwitch? Common options would be xml-curl or lua. In both cases you create your DB tables however you like, and you then write a lua script or create something that curl can interrogate, to return the XML which you would otherwise have placed into a flat file for FreeSwitch to parse.


Regards,


Antony.

--
.evah I serutangis sseltniop tsom eht fo eno eb tsum sihT

Please reply to the list;
please *don't* CC me.

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://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
https://freeswitch.com


_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://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
https://freeswitch.com

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://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
https://freeswitch.com
Back to top
rahman.duran at erzuru...
Guest





PostPosted: Wed Dec 08, 2021 9:56 am    Post subject: [Freeswitch-users] Switch to MySQL db for config Reply with quote

Hi,

Adding " <param name="core-db-dsn" value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='blablabla' options='-c client_min_messages=NOTICE'" />" to "switch.conf.xml" did the trick for us. You can add a similar line for mariadb/mysql.


Rahman




TTT <lists@telium.io (lists@telium.io)>, 8 Ara 2021 Çar, 07:12 tarihinde şunu yazdı:

Quote:
I was actually referring to FreeSWITCH core.  I'm reading a book on FreeSwitch  (https://www.amazon.ca/FreeSWITCH-1-8-Anthony-Minessale-II-ebook/dp/B071ZZBH8G/ref=sr_1_3?keywords=freeswitch&qid=1638915802&s=books&sr=1-3) and it mentions that FreeSWITCH keeps its operating information in a database at runtime.  I think it's PostgreSQL

I was wondering if/how I could switch that to MySQL.  I thought there might be a DSN setting in the XML registry that affects this.  This books says you can setup ODBC providers but it's not clear how, or if this applies to "core".

-----Original Message-----
From: FreeSWITCH-users [mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of Antony Stone
Sent: Monday, December 6, 2021 11:02 AM
To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Subject: Re: [Freeswitch-users] Switch to MySQL db for config

On Monday 06 December 2021 at 16:00:30, TTT wrote:

Quote:
I would like to use MySQL to hold my FreeSWITCH config.

What do you mean by "config"?

All of it, or just certain aspects (such as user directory, SIP registrations, dialplan...)?

Quote:
I found instructions on how to setup the DSN,

Point us at the URL so that we know what you're doing?

Quote:
but how to I create the db/table structure?  Is there a script to do this?

What are you using as the "glue" between MySQL and FreeSwitch?  Common options would be xml-curl or lua.  In both cases you create your DB tables however you like, and you then write a lua script or create something that curl can interrogate, to return the XML which you would otherwise have placed into a flat file for FreeSwitch to parse.


Regards,


Antony.

--
.evah I serutangis sseltniop tsom eht fo eno eb tsum sihT

                                                   Please reply to the list;
                                                         please *don't* CC me.

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com


_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com
Back to top
ericsgeek at gmail.com
Guest





PostPosted: Wed Dec 08, 2021 7:48 pm    Post subject: [Freeswitch-users] Switch to MySQL db for config Reply with quote

On 12/7/2021 2:25 PM, TTT wrote:
Quote:
I was actually referring to FreeSWITCH core. I'm reading a book on FreeSwitch (https://www.amazon.ca/FreeSWITCH-1-8-Anthony-Minessale-II-ebook/dp/B071ZZBH8G/ref=sr_1_3?keywords=freeswitch&qid=1638915802&s=books&sr=1-3) and it mentions that FreeSWITCH keeps its operating information in a database at runtime. I think it's PostgreSQL

I was wondering if/how I could switch that to MySQL. I thought there might be a DSN setting in the XML registry that affects this. This books says you can setup ODBC providers but it's not clear how, or if this applies to "core".

I believe you can.  The module in question is mod_mariadb, but that's
because it uses the mariadb shared library rather than the mysql shared
library, not because it only works with mariadb. Those two use
compatible over-the-wire protocols, so using it to talk to mysql
shouldn't be an issue.

I haven't tested this with mysql itself, however.  At any rate, these
are the steps it took for me using MariaDB.  Much simpler than ODBC in
my opinion.

You will want to make sure that mod_mariadb is installed and preloaded. 
I'm not certain that preloaded is necessary, but it was specified in the
writeup I found.  So this is the file
autoload_configs/pre_load_modules.xml from my server.

<configuration name="pre_load_modules.conf" description="Modules">
  <modules>
    <!-- Databases -->
    <load module="mod_mariadb" />
    <!-- <load module="mod_pgsql"/> -->
  </modules>
</configuration>

Then, you need to set the core-db-dsn param in switch.conf.xml as
mentioned above.  In the case of a mariadb dsn, it would look like this.

<param name="core-db-dsn"
value="mariadb://Socket=/var/run/mysqld/mysqld.sock;Database=FreeSWITCH;uid=FreeSWITCH;Pwd=XXXXXXXXXXXX"/>

If you're using TCP instead of a unix socket, replace the
"Socket=[socket name]" with "Host=[host name]" and a setting for Port if
you're not using the default port.  Also, change the Database and uid
parameter to suit your setup.

Oh, and as an FYI, the default storage provider that FreeSWITCH uses is
SQLLite, not PGSQL.



_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://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
https://freeswitch.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services