What is the purpose of FreeSWITCH's `mod_esl`?

放肆的年华 提交于 2019-12-13 08:57:58

问题


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 support phpmod 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 on mod_esl and click on Build. It will create esl.dll. Place this file in your Lua installation's clib sub-folder. When running a Lua script in Windows, use the command prompt and execute lua 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!