restful_clicktocall problem
Hi all,
I'm struggling to launch the Click2Call application which is
nicely
described on https://github.com/jsgoecke/restful_clicktocall
but it
fails to work on my system. Below my configuration:
CentOS release 5.5 (Final) Asterisk 1.4.35 + Asterisk-GUI
# gem list LOCAL GEMS
activesupport (3.0.6) adhearsion (1.0.1) bundler (1.0.11) daemons (1.1.2) eventmachine (0.12.10) git (1.2.5) i18n (0.5.0) jsgoecke-restful_adhearsion (0.1.1) json (1.5.1, 1.1.3) log4r (1.1.9) rack (1.2.2, 1.0.1) rake (0.8.7) rest-client (0.8.2) rubigen (1.5.6) rubygems-update (1.7.2) sinatra (1.2.1) thin (1.2.11) tilt (1.2.2)
# cat /etc/asterisk/manager.conf . . . [ahn_ami] secret =
iheartlolcats read =
system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
write =
system,call,agent,user,config,command,reporting,originate
I followed all the steps mentioned in the brief tutorial on
a/m
webpage (all commands executed as root):
# gem install jsgoecke-restful_adhearsion --source=http://
gems.github.com/
# ahn create click2call # cd click2call/components/ # git clone
git://github.com/jsgoecke/restful_clicktocall.git # cd .. # cat
dialplan.rb
adhearsion {
self.call.variables[:destination] = get_variable("destination")
dial self.call.variables[:destination]
}
# ahn enable component restful_rpc
# vi /config/startup.rb (and uncommented below lines of code)
config.enable_asterisk :argument_delimiter => '|'
config.asterisk.enable_ami :host => '127.0.0.1', :username =>
'ahn_ami', :password => 'iheartlolcats', :events => true
And when trying to run the whole app, the following error
occurs:
# ahn start . ERROR: restful_rpc requires the 'rack' and 'json'
gems
Log file (click2call /log/adhearsion.log) doesn’t show
anything, rack
and json gems are both installed so I do not have any clue what
might
be wrong.
Obviously, when I run "ruby run_me.rb" in /components/
restful_clicktocall/web and try to invoke that service from
http://localhost:4567,
it also results in a stack of exceptions:
Errno::ECONNREFUSED - Connection refused - connect(2):
/usr/local/lib/ruby/1.8/net/http.rb:560:in initialize'
/usr/local/lib/ruby/1.8/net/http.rb:560:inopen'
/usr/local/lib/ruby/1.8/net/http.rb:560:in connect'
/usr/local/lib/ruby/1.8/timeout.rb:53:intimeout'
/usr/local/lib/ruby/1.8/timeout.rb:93:in timeout'
/usr/local/lib/ruby/1.8/net/http.rb:560:inconnect'
/usr/local/lib/ruby/1.8/net/http.rb:553:in do_start'
/usr/local/lib/ruby/1.8/net/http.rb:542:instart'
/usr/local/lib/ruby/gems/1.8/gems/rest-client-0.8.2/lib/rest_client.rb:175:in
transmit'
/usr/local/lib/ruby/gems/1.8/gems/rest-client-0.8.2/lib/rest_client.rb:114:inexecute_inner'
/usr/local/lib/ruby/gems/1.8/gems/rest-client-0.8.2/lib/rest_client.rb:106:in
execute'
/usr/local/lib/ruby/gems/1.8/gems/rest-client-0.8.2/lib/rest_client.rb:93:inexecute'
/usr/local/lib/ruby/gems/1.8/gems/rest-client-0.8.2/lib/resource.rb:49:in
post'
/usr/local/lib/ruby/gems/1.8/gems/jsgoecke-restful_adhearsion-0.1.1/lib/restful_adhearsion.rb:24:inmethod_missing'
run_me.rb:34:in POST /call'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:1125:incall'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:1125:in
compile!'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:709:ininstance_eval'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:709:in
route_eval'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:693:inroute!'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:741:in
process_route'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:738:incatch'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:738:in
process_route'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:692:inroute!'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:691:in
each'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:691:inroute!'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:826:in
dispatch!'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:619:incall!'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:in
instance_eval'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:ininvoke'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:in
catch'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:ininvoke'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:619:in
call!'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:604:incall'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/showexceptions.rb:21:in
call'
/usr/local/lib/ruby/gems/1.8/gems/rack-1.2.2/lib/rack/methodoverride.rb:24:incall'
/usr/local/lib/ruby/gems/1.8/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in
call'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:1245:incall'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:1276:in
synchronize'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:1245:incall'
/usr/local/lib/ruby/gems/1.8/gems/rack-1.2.2/lib/rack/content_length.rb:13:in
call'
/usr/local/lib/ruby/gems/1.8/gems/rack-1.2.2/lib/rack/chunked.rb:15:incall'
/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:84:in
pre_process'
/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:82:incatch'
/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:82:in
pre_process'
/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:57:inprocess'
/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:42:in
receive_data'
/usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:inrun_machine'
/usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run'
/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/backends/base.rb:61:instart'
/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/server.rb:159:in
start'
/usr/local/lib/ruby/gems/1.8/gems/rack-1.2.2/lib/rack/handler/thin.rb:14:inrun'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/base.rb:1208:in
`run!'
/usr/local/lib/ruby/gems/1.8/gems/sinatra-1.2.1/lib/sinatra/main.rb:25
run_me.rb:49 xxx.xx.xx.xxx- - [05/May/2011 15:29:29] "POST /call
HTTP/1.1" 500
148787 0.1079
Thanks in advance for any help!!
Regards,
AT
Reported by Adam Tylman · May 5th, 2011 @ 09:35 AM
-
Ben Langfeld
- State changed from new to resolved
This was fixed, and documented here: http://mojolingo.com/blog/2011/adhearsions-restful-click2call-returns/
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.