#44 ✓resolved
ronin-9952 (at lighthouseapp)

call to call_into_context() hangs until killed

Reported by ronin-9952 (at lighthouseapp) | December 17th, 2008 @ 08:36 PM

a call into call_into_context() hangs until killed. No indication of the DRb call shows up in the ahn output. But when the call_into_context() process is killed, ahn dumps this:

ERROR agi: #<EOFError: end of file reached> ERROR agi: /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/call.rb:430:in readline'

 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/call.rb:430:in `extract_variable_lines_from_io'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/call.rb:413:in `parse'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/call.rb:391:in `parse'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/object/misc.rb:28:in `returning'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/call.rb:390:in `parse'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/call.rb:145:in `variable_parser_for'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/call.rb:138:in `receive_from'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/call.rb:10:in `receive_call_from'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/asterisk/agi_server.rb:15:in `serve'
 /opt/ruby-1.8.7-p72/lib/ruby/1.8/gserver.rb:211:in `start'
 /opt/ruby-1.8.7-p72/lib/ruby/1.8/gserver.rb:208:in `initialize'
 /opt/ruby-1.8.7-p72/lib/ruby/1.8/gserver.rb:208:in `new'
 /opt/ruby-1.8.7-p72/lib/ruby/1.8/gserver.rb:208:in `start'
 /opt/ruby-1.8.7-p72/lib/ruby/1.8/gserver.rb:198:in `initialize'
 /opt/ruby-1.8.7-p72/lib/ruby/1.8/gserver.rb:198:in `new'
 /opt/ruby-1.8.7-p72/lib/ruby/1.8/gserver.rb:198:in `start'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/asterisk/agi_server.rb:66:in `start'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/initializer/asterisk.rb:56:in `join_server_thread_after_initialized'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/theatre.rb:66:in `call'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/theatre.rb:66:in `trigger_immediately'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/theatre.rb:63:in `map'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/theatre.rb:63:in `trigger_immediately'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/events_support.rb:47:in `trigger_immediately'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/initializer.rb:349:in `trigger_after_initialized_hooks'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/initializer.rb:143:in `start'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/initializer.rb:92:in `start'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/cli.rb:129:in `start'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/cli.rb:19:in `send'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/cli.rb:19:in `execute!'
 /opt/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/bin/ahn:28
 /opt/ruby-1.8.7-p72/bin/ahn:19:in `load'
 /opt/ruby-1.8.7-p72/bin/ahn:19

Both Asterisk and adhearsion reported a good AMI connection at startup. Relevant startup.rb:

config.enable_asterisk config.asterisk.enable_ami :host => "127.0.0.1", :username => "ahn_ami", :password => "xxxxxxx", :events => true config.enable_drb

AHN startup:

INFO ahn: Starting DRb on localhost:9050 INFO ahn: Adhearsion initialized! DEBUG ami: Sending AMI action:

Action: login ActionID: VpnOV4AQ-6Qu7-yFHq-3fhX-4nA55fPRfPWE Username: ahn_ami Secret: xxxxxx Events: Off

INFO ami: Successful AMI actions-only connection into ahn_ami@127.0.0.1 INFO ami: Successful AMI events-only connection into ahn_ami@127.0.0.1

call_into_context code:

!/usr/bin/env ruby

$:.unshift File.dirname(FILE)

require 'drb'

Adhearsion = DRbObject.new_with_uri 'druby://localhost:4573'

    Adhearsion.call_into_context(
            'SIP/+15126338076@voicepulse-primary',
            'record_voice_message',
            :caller_id => '5125381529',
            :name => 'Wayne Walker',
    )

Comments and changes to this ticket

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Pages