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

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

问题描述

Asterisk 具有 Asterisk 管理器界面 (AMI)Asterisk Gateway Interface (AGI),使用它可以触发 PHP 脚本在某些来自 Asterisk 的活动中.使用相同的 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,后者是用于编写使用事件套接字的程序的抽象层.我只是想进行区分.)实际上,FreeSWITCH 等效于星号 -r"实际上是一个名为fs_cli"的基于 ESL 的程序——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 Cookbook 将提供有关该主题的一些食谱.(完全披露:我是 FreeSWITCH Cookbook 的合著者.)

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.)

另一种与 ESL 相关的控制调用(如 AGI)的方法是使用 fs_ivrd 守护程序.它不像 ESL 那样常用,但对于类似 AGI 的脚本来说是一个不错的选择.有关详细信息,请参阅此维基页面.

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天全站免登陆