在同一台机器上运行两个粘合应用程序
我有两个独立的 Adhearsion 应用程序,我想知道
a) 将它们分开是否有意义 b) 如果我可以手动覆盖默认端口 Adhearsion 在
应用程序 1 上运行,可处理所有入站和出站呼叫、记录呼叫、呼叫流程等 应用程序 2 是一个 click2call 应用程序
有什么理由将它们分开?
I have two separate Adhearsion apps and I'm wondering if
a) It makes sense to separate them
b) If I can manually override the default port Adhearsion runs on
App 1 handles all inbound and outbound calls, records the calls, call flows, etc
App 2 is a click2call app
Is there any reason to keep them separated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
A) 我还没有找到在单独的 Adhearsion 进程中运行单独的应用程序的充分理由。使用 dialplan.rb 将呼叫路由到不同的 Adhearsion 组件非常容易。我还没有找到可能的收益(见下文)来抵消缺点(额外的监控、额外的内存使用、复杂性)。异常在线程内被挽救,因此 Adhearsion 实例在启动后完全失败的情况非常罕见。
B) 如果您确实找到了在单独进程中运行 Adhearsion 应用程序的理由,那么这很容易做到。您只需更改 config/startup.rb 即可将 AGI 侦听器放在不同的端口上:
config.enable_asterisk :port => 4599
经过一分钟的等待,这里列出了您可能希望为不同的 Adhearsion 应用程序使用不同的 Adhearsion 流程的几个原因:
您需要为一个应用程序运行 JRuby,为另一个应用程序运行 MRI 或 1.9(遗留代码、库依赖项)< /p>
您偏执地认为一次 Adhearsion 崩溃会导致这两个应用程序崩溃(正如我所说)上面,我认为这不太可能,但总是可能的)
您想利用通过运行两个 Ruby 进程来利用多个 CPU(我还不需要这个,但这是可能的。这里 JRuby 也是一个选项。)
您需要在 32 位主机上使用超过 3GB 的内存(也还不需要这个)
A) I haven't yet found a good reason to run separate applications in separate Adhearsion processes. It's easy enough to route calls to different Adhearsion components using dialplan.rb. I have not found the possible gains (see below) to offset the drawbacks (extra monitoring, additional memory usage, complexity). Exceptions are rescued within threads so it's pretty rare for an Adhearsion instance to completely fail once its booted.
B) If you do find some reason to run Adhearsion apps in separate processes, it's easy enough to do. You just need to change the config/startup.rb to put the AGI listener on a different port:
config.enable_asterisk :port => 4599
After stewing for a minute here are a list of a few reasons you might want different Adhearsion processes for different Adhearsion apps:
You need to run JRuby for one app and MRI or 1.9 for another (legacy code, library dependencies)
You paranoid that one Adhearsion crash will take down both applications (as I said above, I consider this unlikely, but always possible)
You want to take advantage of multiple CPUs by running two Ruby processes (I haven't needed this yet, but it's possible. JRuby is also an option here.)
You need to use more than 3GB of memory on a 32-bit host (also haven't needed this yet)