开发者

Run two adhearsion applications on same machine

开发者 https://www.devze.com 2023-03-28 16:22 出处:网络
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

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?


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消