[Freeswitch-users] Serving sofia.conf via lua (updated, partly resolved)
Antony Stone
Antony.Stone at freeswitch.open.source.it
Tue Nov 30 14:55:11 UTC 2021
On Tuesday 30 November 2021 at 14:17:47, Antony Stone wrote:
> If I take my (static, nothing fancy yet) and monolithic sofia configuration
> file and put it into /etc/freeswitch/autoload_configs/sofia.conf.xml (and
> disable lua) then it does what I expect and all works.
>
> If I take the same file and put it into my lua script (correctly enclosed
> within the extra <document> and <section> tags), then it does get loaded,
> but it produces errors relating to some of the variables pre-defined in
> vars.xml.
<...snip...>
> However, I see that some other variables, also defined in vars.xml, are
> being correctly interpreted and used from the XML provided by lua, so this
> isn't a consistent "you can't reference variables" problem.
I'm no longer so sure about *any* of the variables working correctly.
I've now converted the static XML being served by lua into something which
does the database lookups which I needed lua for in the first place, and that
is working very nicely, however any variables included in the XML output are
not being interpreted when the configuration is actually used by Freeswitch.
Does that mean that variables (for example, defined in vars.xml) simply cannot
be used in XML when that XML comes from lua instead of being in a standard
file?
What's the way round this, so that I can use the values variables as normal in
a configuration file, when the configuration is being generated by lua?
Thanks,
Antony.
--
Pavlov is in the pub enjoying a pint.
The barman rings for last orders, and Pavlov jumps up exclaiming "Damn! I
forgot to feed the dog!"
Please reply to the list;
please *don't* CC me.
More information about the FreeSWITCH-users
mailing list