问题
There is another question trying to figure out the connection between mod_event_socket
and the Event Socket Library (ESL).
The Event Socket Library itself is a C library (libesl) that can be used to build external C applications to control FreeSWITCH via its event system.
As far as I understand, mod_esl is only a FreeSWITCH module wrapper around libesl, used to extend programming languages with the same functionality (i.e., to control a FreeSWITCH instance). The documentation doesn't mention this, but basing this assumption on the quoted sources below, and on the fact that I couldn't find anyone ever using it directly (i.e., found no mailing list question, nothing on slack, no SO questions, no blog posts, the books also barely mention it, and so on). Are there any other use cases that I'm missing?
From the Event Socket Library docmentation:
Installation
There are several options to configure
mod_esl
to add support for multiple languages.First, in
libs/esl
, type make# Under the FreeSWITCH source top-level directory cd /usr/src/freeswitch/libs/esl make
Then, to enable specific languages type
make
+ one of:perlmod-install
to add Perl supportphpmod
to add PHP support ...Example:
make perlmod-install
From the FreeSWITCH 1.2 book:
Note Windows users must build
mod_esl
with Microsoft Visual Studio (the pre-compiled binaries will not suffice). Right-click onmod_esl
and click on Build. It will createesl.dll
. Place this file in your Lua installation'sclib
sub-folder. When running a Lua script in Windows, use the command prompt and executelua
followed by the name of the script. For example:lua single_command.lua
.
As for what the difference between FreeSWITCH built-in languages and ESL scripting, see this question.
来源:https://stackoverflow.com/questions/59227887/what-is-the-purpose-of-freeswitchs-mod-esl