Prematurely hanging up a call intermittently results in the error below. I'm not sure of the exact conditions required to reproduce.
[2012-05-16 14:21:19] DEBUG Adhearsion::Call: 1b19d201-1db8-4f68-aad6-7c9c5224f39a: Executing command #<Punchblock::Component::Asterisk::AGI::Command name="EXEC SayDigits", params_array=["2600"], target_call_id=nil, component_id=nil, target_mixer_name=nil, state_name=:new>
[2012-05-16 14:21:19] DEBUG Punchblock::Translator::Asterisk::Call: 1b19d201-1db8-4f68-aad6-7c9c5224f39a: Executing command: #<Punchblock::Component::Asterisk::AGI::Command name="EXEC SayDigits", params_array=["2600"], target_call_id="1b19d201-1db8-4f68-aad6-7c9c5224f39a", component_id=nil, target_mixer_name=nil, state_name=:requested>
[2012-05-16 14:21:19] DEBUG Punchblock::Translator::Asterisk::Component::Asterisk::AGICommand: Call ID: 1b19d201-1db8-4f68-aad6-7c9c5224f39a, Component ID: e8c84fdb-1bee-495e-bb02-11bd148737ab: Starting up...
[2012-05-16 14:21:19] DEBUG Punchblock::Translator::Asterisk::Component::Asterisk::AGICommand: Call ID: 1b19d201-1db8-4f68-aad6-7c9c5224f39a, Component ID: e8c84fdb-1bee-495e-bb02-11bd148737ab: Handling response: #<RubyAMI::Response:0x00000003fd0388 @headers={"ActionID"=>"ac57991e-f726-41bf-9499-dfd17c67c23c", "Message"=>"Added AGI command to queue"}, @action=Action: agi
ActionID: ac57991e-f726-41bf-9499-dfd17c67c23c
Channel: SIP/gigaset-00000014
Command: EXEC SayDigits "2600"
CommandID: e8c84fdb-1bee-495e-bb02-11bd148737ab
>
[2012-05-16 14:21:19] DEBUG Punchblock::Translator::Asterisk::Component::Asterisk::AGICommand: Call ID: 1b19d201-1db8-4f68-aad6-7c9c5224f39a, Component ID: e8c84fdb-1bee-495e-bb02-11bd148737ab: Setting response on component node to #<Punchblock::Ref id="e8c84fdb-1bee-495e-bb02-11bd148737ab", target_call_id=nil, component_id=nil, target_mixer_name=nil>
[2012-05-16 14:21:21] WARN Punchblock::Translator::Asterisk::Call: 1b19d201-1db8-4f68-aad6-7c9c5224f39a: Could not find component for AMI event: #<RubyAMI::Event:0x007fb1742599c8 @headers={"Privilege"=>"agi,all", "SubEvent"=>"End", "Channel"=>"SIP/gigaset-00000014"}, @name="AsyncAGI">
[2012-05-16 14:21:21] DEBUG Punchblock::Translator::Asterisk::Component::Asterisk::AGICommand: Call ID: 1b19d201-1db8-4f68-aad6-7c9c5224f39a, Component ID: e8c84fdb-1bee-495e-bb02-11bd148737ab: Handling AMI event: #<RubyAMI::Event:0x007fb1741ad290 @headers={"Privilege"=>"agi,all", "SubEvent"=>"Exec", "Channel"=>"SIP/gigaset-00000014", "CommandID"=>"e8c84fdb-1bee-495e-bb02-11bd148737ab", "Result"=>"200%20result%3D-1%0A"}, @name="AsyncAGI">
[2012-05-16 14:21:21] DEBUG Punchblock::Translator::Asterisk::Component::Asterisk::AGICommand: Call ID: 1b19d201-1db8-4f68-aad6-7c9c5224f39a, Component ID: e8c84fdb-1bee-495e-bb02-11bd148737ab: Received AsyncAGI:Exec event, sending complete event.
[2012-05-16 14:21:21] DEBUG Punchblock::Translator::Asterisk::Component::Asterisk::AGICommand: Call ID: 1b19d201-1db8-4f68-aad6-7c9c5224f39a, Component ID: e8c84fdb-1bee-495e-bb02-11bd148737ab: Sending event #<Punchblock::Event::Complete reason=#<Punchblock::Event::Complete::Hangup name=:hangup, target_call_id="1b19d201-1db8-4f68-aad6-7c9c5224f39a", component_id="e8c84fdb-1bee-495e-bb02-11bd148737ab", target_mixer_name=nil>, recording=nil, target_call_id="1b19d201-1db8-4f68-aad6-7c9c5224f39a", component_id="e8c84fdb-1bee-495e-bb02-11bd148737ab", target_mixer_name=nil>
[2012-05-16 14:21:21] DEBUG Adhearsion::Call: 1b19d201-1db8-4f68-aad6-7c9c5224f39a: Receiving message: #<Punchblock::Event::Complete reason=#<Punchblock::Event::Complete::Hangup name=:hangup, target_call_id="1b19d201-1db8-4f68-aad6-7c9c5224f39a", component_id="e8c84fdb-1bee-495e-bb02-11bd148737ab", target_mixer_name=nil>, recording=nil, target_call_id="1b19d201-1db8-4f68-aad6-7c9c5224f39a", component_id="e8c84fdb-1bee-495e-bb02-11bd148737ab", target_mixer_name=nil>
[2012-05-16 14:21:21] ERROR Adhearsion::Call: 1b19d201-1db8-4f68-aad6-7c9c5224f39a: <NoMethodError> undefined method `code' for #<Punchblock::Event::Complete::Hangup:0x007fb138164450>
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/gems/adhearsion-2.0.0/lib/adhearsion/foundation/object.rb:22:in `method_missing'
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/bundler/gems/adhearsion-asterisk-20b8cd7cff63/lib/adhearsion/asterisk/call_controller_methods.rb:21:in `block in agi'
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/bundler/gems/adhearsion-asterisk-20b8cd7cff63/lib/adhearsion/asterisk/call_controller_methods.rb:21:in `map'
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/bundler/gems/adhearsion-asterisk-20b8cd7cff63/lib/adhearsion/asterisk/call_controller_methods.rb:21:in `agi'
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/bundler/gems/adhearsion-asterisk-20b8cd7cff63/lib/adhearsion/asterisk/call_controller_methods.rb:37:in `execute'
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/bundler/gems/adhearsion-asterisk-20b8cd7cff63/lib/adhearsion/asterisk/call_controller_methods.rb:376:in `play_digits'
/home/jlecuirot/ctnv/app/call_controllers/inbound_requests_call_controller.rb:24:in `run'
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/gems/adhearsion-2.0.0/lib/adhearsion/call_controller.rb:83:in `execute!'
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/gems/adhearsion-2.0.0/lib/adhearsion/call_controller.rb:45:in `block in exec'
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/gems/adhearsion-2.0.0/lib/adhearsion/call_controller.rb:44:in `catch'
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/gems/adhearsion-2.0.0/lib/adhearsion/call_controller.rb:44:in `exec'
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/gems/adhearsion-2.0.0/lib/adhearsion/call.rb:296:in `block (2 levels) in execute_controller'
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/gems/adhearsion-2.0.0/lib/adhearsion/foundation/exception_handler.rb:6:in `catching_standard_errors'
/home/jlecuirot/.rvm/gems/ruby-1.9.3-p194/gems/adhearsion-2.0.0/lib/adhearsion/call.rb:294:in `block in execute_controller'
[2012-05-16 14:21:21] DEBUG Adhearsion::Call: 1b19d201-1db8-4f68-aad6-7c9c5224f39a: Receiving message: #<Punchblock::Event::End reason=:hangup, headers_hash={}, target_call_id="1b19d201-1db8-4f68-aad6-7c9c5224f39a", component_id=nil, target_mixer_name=nil>
[2012-05-16 14:21:21] INFO Adhearsion::Call: 1b19d201-1db8-4f68-aad6-7c9c5224f39a: Call ended
[2012-05-16 14:21:21] DEBUG Adhearsion::Call: 1b19d201-1db8-4f68-aad6-7c9c5224f39a: Finished executing controller #<InboundRequestsCallController call=1b19d201-1db8-4f68-aad6-7c9c5224f39a, metadata={}>
[2012-05-16 14:21:26] DEBUG Punchblock::Translator::Asterisk::Call: 1b19d201-1db8-4f68-aad6-7c9c5224f39a: Shutting down