Asterisk IVR AGI 框架; 粘附替代方案?
我正在尝试开始使用 Asterisk 和 Ruby 编写可扩展的电信级应用程序。 我原本打算使用 Adhearsion 框架来实现此目的,但它不具备所需的成熟度,并且文档严重缺乏。 AsteriskRuby 似乎是一个不错的选择,因为它有很好的文档记录并且似乎是由 Vonage 编写的。
有人有部署基于 AGI 的 IVR 应用程序的经验吗? 您使用了什么框架(如果有)? 如果合理的话,我什至会考虑使用非 Ruby 的。 谢谢!
I am trying to get started writing scalable, telecom-grade applications with Asterisk and Ruby. I had originally intended to use the Adhearsion framework for this, but it does not have the required maturity and its documentation is severely lacking. AsteriskRuby seems to be a good alternative, as it's well documented and appears to be written by Vonage.
Does anyone have experience deploying AGI-based IVR applications? What framework, if any, did you use? I'd even consider a non-Ruby one if it's justified. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
随着 v0.8.1 的发布,您应该重新访问 Adhearsion,并且文档最近已经变得更好了。 看看这里:
http://adhearsion.com
http://docs.adhearsion.com
http://api.adhearsion.com
You should revisit Adhearsion as v0.8.1 is out, and the documentation has gotten much better quite recently. Have a look here:
http://adhearsion.com
http://docs.adhearsion.com
http://api.adhearsion.com
如果您正在寻找“电信级”应用程序,您可能需要考虑 SipXecs 而不是 asterisk。 它功能强大、免费且开源,并提供北电的商业支持。 您可以通过 ruby(或任何其他语言)中的 Web 服务 API 与其交互。
有关更多信息,请参阅 SipXecs wiki。 该网站上有一个比较矩阵,比较了 AsteriskNOW 和 TrixBox 的功能。
If you're looking for "telecom-grade" applications, you may want to look into SipXecs instead of asterisk. It's featureful, free, and open source, with commercial support available from Nortel. You can interact with it via a Web Services API in ruby (or any other language).
See the SipXecs wiki for more information. There's a comparison matrix on that site, comparing features with AsteriskNOW and TrixBox.
SipX 确实是错误的答案。 我在 SipX 3.10.2 上编写了一些极其复杂的 VoiceXML,自从 SipX 4 为需要编译 JAR 的 IVR 接口放弃 SipXVXML 以来,一切都毫无意义。 最重要的是,北电申请破产、开源版本的文档极其糟糕、对 VXML 2.0(自 3.10.2 起)和 SIP 标准(自 3.10.2 起,与 ITSP 不能很好地保持一致)的合规性较差。 我会为它出色的工作而喝彩,它完成了它的设计任务,即成为 PBX。 但作为一名 IVR,如果我可以重来一次,我会做一些不同的事情。 我不知道具体是什么,但有些不同。 我现在正在研究 Trixbox CE,并致力于将其绑定到 JVoiceXML 或 VoiceGlue 中。
另外,不要阅读 SipX wiki 的废话。 它将 SipX 3.10 与 AsteriskNOW 1 和 Trixbox 1 进行了比较。来吧。 这就像将 Mac OS X 与 Win95 进行比较一样! 更现实的比较是 SipX 4(将于 2009 年第一季度发布)与 Asterisk 1.6 和 Trixbox 2.6,这表明除了可扩展性和高可用性方面之外,它们实现了几乎相同的结果; SipX 在这方面获胜。 但是,为了成熟和稳定,我建议使用 Asterisk。
另外,我使用 SipXVXML 获得的真实性能结果:
Dell PowerEdge R200,至强双核 3.2GHz,在出现抖动之前可处理 17 个呼叫。
HP DL380 G4,双 Xeon HT 3.2 GHz,在长时间暂停之前可处理 30 个呼叫。
当我完成评估 VoiceGlue 和 JVoiceXML 后,我将发布我的发现,但我认为我最终会编写一个从 AGI 调用的自定义 PHP,因为所有工具都是 Asterisk 原生的。
SipX is really the wrong answer. I've written some extremely complicated VoiceXML on SipX 3.10.2 and it's been all for naught since SipX 4 is dropping SipXVXML for an interface that requires IVRs to be compiled JARs. Top that off with Nortel filing bankruptcy, extremely poor documentation on the open-source version, poor compliance with VXML 2.0 (as of 3.10.2) and SIP standards (as of 3.10.2, does not trunk well with ITSPs). I will applaud it for a bangup job doing what it was designed to do, be a PBX. But as an IVR, if I had it to do all over again, I'd do something different. I don't know what for sure, but something different. I'm toying with Trixbox CE now and working on tying it into JVoiceXML or VoiceGlue.
Also, don't read that SipX wiki crap. It compares SipX 3.10 to AsteriskNOW 1 to Trixbox 1. Come on. It's like comparing Mac OS X to Win95! A more realistic comparison would be SipX 4 (due out 1Q 2009) to Asterisk 1.6 and Trixbox 2.6, which would show that they accomplish near identical results except in the arena of scalibility and high-availability; SipX wins at that. But, for maturity and stability, I'd advocate Asterisk.
Also, my real world performance results with SipXVXML:
Dell PowerEdge R200, Xeon Dual Core 3.2GHz, handles 17 calls before jitters.
HP DL380 G4, Dual Xeon HT 3.2 GHz, handles 30 calles before long pauses.
I'll post my findings when I finish evaluating VoiceGlue and JVoiceXML but I think I'm going to end up writing a custom PHP called from AGI since all the tools are native to Asterisk.
我在此处提出了一些相关问题,此处,以及此处。 我正在使用微软的语音服务器,并且我非常想了解现有的替代方案,尤其是开源的。 您可能会在其中一个问题的答案中找到一些有用的信息。
I have asked somewhat related questions here, here, and here. I'm using Microsoft's Speech Server, and I'm very intested to learn about any alternatives that are out there, especially open source ones. You might find some good info in the answers to one of those questions.
确实没有任何其他框架。 当然,每种语言都有 AGI 绑定,但就开发电话应用程序的成熟框架而言,我们还没有做到这一点。 至少在开源世界中是这样。
There really aren't any other frameworks out there. There's of course AGI bindings to every language, but as far as full-fledged frameworks for developing telephony applications, we're just not there yet. At least in the open-source world.
我广泛使用了 JAGIServer,尽管它不再处于开发阶段,但它非常好且易于使用。 它是 FastAGI 的接口,我建议您使用它而不是简单的 AGI。
该框架的新版本是 OrderlyCalls ,它似乎有更多功能,但因为我不需要他们,我没试过。
我想这完全取决于你想用 AGI 做什么; 通常我有一个有点复杂的拨号计划来收集和验证所有用户输入,然后使用 AGI 连接到 Java 应用程序,该应用程序将读取一些变量,用它做一些事情(执行操作、查询等),然后设置更多AGI 通道上的变量并断开连接。 此时,拨号计划将根据 Java 应用程序设置的变量的结果继续进行。
这工作得非常快,因为你在 Java 应用程序上有一个 ServerSocket,它接收来自 AGI 的传入连接,使用新套接字创建一个 JAGIClient 和一个 JAGIProcessor 的新实例(你必须编写它,它是一个将完成你所有工作的对象)处理),然后在线程池内运行 JAGIClient。
您的 JAGIProcessor 实现了 processCall 方法,它可以完成所需的所有工作,与作为参数传递的 JAGIClient 进行交互,读取和设置变量或执行 AGI 接口允许您执行的任何操作。
因此,您有一个始终运行的 Java 应用程序,它可以是一个简单的 J2SE 应用程序,也可以是容器上的 EE 应用程序,这并不重要; 一旦它运行,它将非常快地处理 AGI 请求,因为不需要启动新进程(与为每个 AGI 调用运行一个程序的简单 AGI 相比)。
I used JAGIServer extensively, even though it's not under development anymore, and it's pretty good and easy to use. It's an interface for FastAGI, which I recommend you use instead of simple AGI.
The new version of this framework is OrderlyCalls which seems to have a lot more features but since I haven't needed them, I haven't tried it.
I guess it all depends on what you want to do with AGI; usually I have a somewhat complex dialplan to gather and validate all user input and then just use AGI to connect to a Java application which will read some variables, do some stuff with it (perform operations, queries, etc etc) and then sets some more variables on the AGI channel and disconnects. At this point, the dialplan continues depending on the result of the variables set by the Java app.
This works really fast because you have a ServerSocket on the Java app, which receives incoming connections from AGI, creates a JAGIClient with the new socket and a new instance of a JAGIProcessor (which you have to write, it's the object that will do all your processing), and then run the JAGIClient inside a thread pool.
Your JAGIProcessor implements the processCall method where it does all the work it needs, interacting with the JAGIClient passed as a parameter, to read and set variables or do whatever stuff the AGI interface allows you to.
So you have a Java app running all the time and it can be a simple J2SE app or an EE app on a container, doesn't matter; once it's running, it will process AGI requests really fast, since no new processes have to be started (in contrast to simple AGI which runs a program for every AGI call).
对于小型且简单的应用程序,我在 Perl 中使用 Asterisk::AGI。 Fast AGI 也有扩展。 对于更大的应用程序,例如 VoIP 运营商的后端,我使用类似于用 Java 编写的 OrderlyCalls 的东西(我自己的代码)。 OrderlyCalls 非常适合从 java fastagi 引擎开始并将其扩展到您的需求。
For small and easy applications I use Asterisk::AGI in perl. There are also extensions for the Fast AGI. For bigger applications, like VoIP operator's backends I use something similar to OrderlyCalls written in Java (my own code). OrderlyCalls is great though to start with java fastagi engine and extend it to your needs.
PHP编写的简单小型灵活的Asterisk AGI IVR
http://freshmeat.net/projects/phpivr
Simple small flexible Asterisk AGI IVR written on PHP
http://freshmeat.net/projects/phpivr
又闻一闻。 在利用 PHPAGI 将客户的 IVR 从 SipX 迁移到 Asterisk 后,我必须说我还没有遇到过任何其他架构如此简单和强大。 今天我将在之前测试过 SipX 的同一硬件上对 Trixbox CE 2.8 进行压力测试。 但我必须说,使用 PHPAGI 进行 IVR 和使用 Asterisk CLI 进行调试效果非常好,并且使我能够比任何其他公司更快地开发 IVR。 我今天正在致力于实施 TTS 和 ASR,我会尽可能发布我的压力测试结果。
Smee again. After migrating my client's IVR's over from SipX to Asterisk utilizing PHPAGI, I must say that I haven't encountered any other architecture that anywhere near as simple and capable. I'll be stress testing Trixbox CE 2.8 today on the same hardware I had tested SipX on earlier. But I must say, using PHPAGI for the IVR and the Asterisk CLI for debugging has worked perfectly and allowed me to develop IVR's far faster than any other company out there. I'm working on implementing TTS and ASR today and I'll post my stress test results when I can.