FreeSWITCH中是否有与Asterisk AMI和AGI相似的东西? [英] Are there parallels to Asterisk AMI and AGI in FreeSWITCH?

查看:123
本文介绍了FreeSWITCH中是否有与Asterisk AMI和AGI相似的东西?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Asterisk具有 Asterisk管理器界面(AMI)星号网关接口(AGI),通过它们可以触发PHP脚本在星号的某些事件中.使用相同的PHP脚本还可以指示Asterisk在呼叫/会议旁边做什么.在FreeSWITCH中有与AMI和AGI相似的地方吗?

Asterisk has Asterisk Manager Interface (AMI) and Asterisk Gateway Interface (AGI), using which one can trigger PHP scripts at certain events from Asterisk. Using the same PHP scripts can also instruct Asterisk what to do next to a call/conference. Are there parallels to AMI and AGI in FreeSWITCH?

推荐答案

这些是很好的问题.我只是想在@dkwiebe所说的话中添加一些内容(正确的是,顺便说一句).

These are good questions. I just wanted to add a few things to what @dkwiebe said (which is correct, BTW).

FreeSWITCH中的AMI等效项是事件套接字. (从技术上讲,它不是事件套接字库"或ESL,它是用于编写使用事件套接字的程序的抽象层.我只是想区分一下.)实际上,相当于星号-r"的FreeSWITCH实际上是一个基于ESL的程序,名为"fs_cli"-FreeSWITCH命令行界面的简称. fs_cli程序是您可以使用ESL完成的一个很好的示例.

The AMI equivalent in FreeSWITCH is the event socket. (Technically it's not the "Event Socket Library" or ESL, which is an abstraction layer for writing programs that use the event socket. I just wanted to make that distinction.) In fact, the FreeSWITCH equivalent of "asterisk -r" is actually an ESL-based program called "fs_cli" - short for FreeSWITCH Command Line Interface. The fs_cli program is a great example of what you can accomplish with ESL.

此外,没有理由不能使用ESL程序来完成AGI脚本可以完成的许多工作. ESL连接对象"可以锁定"到单个呼叫分支上并对其进行控制. Wiki上有一些示例,即将出版的《 FreeSWITCH食谱》将对此主题进行一些介绍. (全部披露:我是《 FreeSWITCH食谱》的合著者.)

Also, there is no reason that you cannot use an ESL program to do many of the things that can be done with AGI scripts. The ESL "connection object" can "lock on" to a single call leg and control it. There are examples on the wiki and the forthcoming FreeSWITCH Cookbook will have some recipes on the subject. (Full disclosure: I am a co-author of the FreeSWITCH Cookbook.)

fs_ivrd守护程序提供了另一种与ESL相关的控制调用(如AGI)的方法.它不如ESL常用,但对于类似AGI的脚本来说是一个不错的选择.有关更多详细信息,请参见此Wiki页面.

Another ESL-related method of controlling calls like AGI is with the fs_ivrd daemon. It's less commonly used than ESL but is a nice option for AGI-like scripting. See this wiki page for more details.

最后,我想提到Lua是执行脚本/逻辑/等的绝佳选择.在通话控制中.它简单,轻巧且易于学习.在实验室中,我们已经在8核计算机上看到了数千个并发的Lua控制的调用.即使在某些非常苛刻的环境中,Lua也能正常工作.

Lastly, I would like to mention that Lua is a great choice for doing scripting/logic/etc. in call control. It is simple, light, and easy to learn. In the lab we've seen a few thousand concurrent Lua-controlled calls on an 8-core machine. Lua works even in some very demanding environments.

可以随时加入irc.freenode.net上的#freeswitch与FreeSWITCH社区讨论您的问题.

Feel free to join #freeswitch on irc.freenode.net to discuss your questions with the FreeSWITCH community.

这篇关于FreeSWITCH中是否有与Asterisk AMI和AGI相似的东西?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆