Antony.Stone at freesw... Guest
|
Posted: Tue Nov 30, 2021 9:11 am Post subject: [Freeswitch-users] Serving sofia.conf via lua |
|
|
Hi.
I am trying to get Freeswitch to get its sofia configuation from lua instead of
static XML files.
https://freeswitch.org/confluence/display/FREESWITCH/mod_xml_curl tells me for
example that "Section: configuration - This is used to send back configuration
files such as sofia.conf."
So, I'm pretty sure what I want to do should be possible, but nowhere have I
so far been able to find a fully working example telling me how to do it.
My understanding so far is that:
1. I need to create a lua script which generates the *complete* XML as would
be served from /etc/freeswitch/autoload_configs/sofia.conf.xml and all its
included sub-directories/files
2. This XML as output from the script should be enclosed within tags:
<document type="freeswitch/xml">
<section name="configuration">
... XML goes here ...
</section>
</document>
3. I should place this lua script in freeswitch's scripting directory, which
on my (Debian) machine is /usr/share/freeswitch/scripts
4. I need to enable this script to be run by including in
/etc/freeswitch/autoload_configs/lua.conf.xml:
<param name="xml-handler-script" value="sofia.conf.lua"/>
<param name="xml-handler-bindings" value="configuration"/>
The first thing which is not clear to me is what I should do about
/etc/freeswitch/autoload_configs/sofia.conf.xml
- if I leave it as it is, it appears to be used in the normal way, and my lua
script is ignored
- if I delete it (or rename it to sofia.conf.xml.noload for example) then sofia
doesn't get loaded *at all* and when I go into fs_cli I do not even have a
"sofia" command
- if I "touch" the filename so that
/etc/reeswitch/autoload_configs/sofia.conf.xml exists but is empty, I get the
same result egain - the "sofia" command does not even exist in the cli
So, can anyone point me at how to join these things up correctly so that I can
serve sofia configuration settings from a lua script?
I've been told here that:
On Friday 05 November 2021 at 12:28:55, David Villasmil wrote:
Quote: | In FS there’s the embedded lua. You can do almost anything with it.
|
I'm struggling to find the documentation telling me how, though :(
Thanks in advance,
Antony.
--
"It would appear we have reached the limits of what it is possible to achieve
with computer technology, although one should be careful with such statements;
they tend to sound pretty silly in five years."
- John von Neumann (1949)
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 |
|