RAGI Gem - Running an additional server thread

I have RoR running and have configured RAGI (per the new tutorial
provided at ETel http://www.snapvine.com/code/ragi) but I get this:

user# script/server
=> Booting WEBrick…
[2006-01-30 14:20:25] INFO RAGI::CallServer: default-handler= port=4573
[2006-01-30 14:20:25] INFO WEBrick 1.3.1
[2006-01-30 14:20:25] INFO ruby 1.8.2 (2004-12-25) [i586-linux]
[2006-01-30 14:20:25] WARN TCPServer Error: Address already in use -
[2006-01-30 14:20:25] INFO WEBrick::GenericServer#start: pid=13375
[2006-01-30 14:20:25] INFO RAGI::CallServer: server shutdown port=4573
=> Rails application started on
=> Ctrl-C to shutdown server; call with --help for options
[2006-01-30 14:20:25] INFO WEBrick 1.3.1
[2006-01-30 14:20:25] INFO ruby 1.8.2 (2004-12-25) [i586-linux]
[2006-01-30 14:20:25] INFO WEBrick::HTTPServer#start: pid=13375

Nothing is configured to run on (xinetd) or is running on port 4573, and
yet I get this error. Also, I tried to change the default port in:

ragi-1.0.1/ragi # vi config.rb

but I get the same error for any port I try to use. How do I get this to

Use config.rb for standalone RAGI programs. If you want RAGI to run
from within Rails, instead place something like the following in
environment.rb (not config.rb)

ragi configuration

require ‘webrick’

Dependencies.mechanism = :require # class loading magic

class SimpleThreadServer < WEBrick::SimpleServer
def SimpleThreadServer.start(&block)
Thread.new do block.call

require ‘ragi/call_server’

RAGI::CallServer.new(:ServerType => SimpleThreadServer )

I’ve found that it works best for me when I place ragi under the lib
directory in the rails project. If you have more problems, please post
more details … also check that there are no existing instances of
ragi or other asterisk gateway interface programs.

You can always try doing telnet to port 4573 (e.g. telnet localhost
4573) to verify that there’s nothing running on that port. If there’s
nothing running, you should get connection refused.

– G.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs