FreeSWITCH 中的内置(或嵌入式)语言与使用事件套接字库 (ESL) 的脚本有什么区别?
What is the difference between built-in (or embedded) languages in FreeSWITCH and scripts using the Event Socket Library (ESL)?
FreeSWITCH 中嵌入了许多语言(例如JavaScript,请参阅the docs), made possible by SWIG "to make the core FreeSWITCH library accessible to scripting"。
语言也可以使用 Event Socket Library 来达到同样的目的,那有什么区别呢?
和the FreeSWITCH 1.2 book points out一样,确实不一样:
ESL scripts versus built-in languages
Keep in mind that ESL-based programs are not the same as using
built-in languages. The FreeSWITCH event socket is a TCP-based
connection to FreeSWITCH. The ESL is an abstraction library that is
available for more languages than just the few that are built-in to
FreeSWITCH. You must first install the Lua, Perl, Python, or PHP for
your system before using ESL.
内置语言 FreeSWITCH默认安装,可用于编写脚本控制(和配置1) 一个 FreeSWITCH 实例而不是编辑 XML 文件来实现相同的目的。这些脚本只能从 dialplan action or form the console as an API call (e.g., look for luarun
or jsrun
).
使用 Event Socket Library (ESL) 的脚本可以从任何地方 运行 获得与内置语言相同的结果,但首先它们会建立网络连接以FreeSWITCH 实例能够发送 API 调用。
1 请参阅 Serving Configuration with mod_lua
and Serving Configuration with JavaScript 文档页面。
FreeSWITCH 中嵌入了许多语言(例如JavaScript,请参阅the docs), made possible by SWIG "to make the core FreeSWITCH library accessible to scripting"。
语言也可以使用 Event Socket Library 来达到同样的目的,那有什么区别呢?
和the FreeSWITCH 1.2 book points out一样,确实不一样:
ESL scripts versus built-in languages
Keep in mind that ESL-based programs are not the same as using built-in languages. The FreeSWITCH event socket is a TCP-based connection to FreeSWITCH. The ESL is an abstraction library that is available for more languages than just the few that are built-in to FreeSWITCH. You must first install the Lua, Perl, Python, or PHP for your system before using ESL.
内置语言 FreeSWITCH默认安装,可用于编写脚本控制(和配置1) 一个 FreeSWITCH 实例而不是编辑 XML 文件来实现相同的目的。这些脚本只能从 dialplan action or form the console as an API call (e.g., look for luarun
or jsrun
).
使用 Event Socket Library (ESL) 的脚本可以从任何地方 运行 获得与内置语言相同的结果,但首先它们会建立网络连接以FreeSWITCH 实例能够发送 API 调用。
1 请参阅 Serving Configuration with mod_lua
and Serving Configuration with JavaScript 文档页面。