Coder Social home page Coder Social logo

adhearsion / adhearsion Goto Github PK

View Code? Open in Web Editor NEW
609.0 50.0 129.0 7.23 MB

A Ruby framework for building telephony applications

Home Page: http://adhearsion.com

License: MIT License

Ruby 73.87% Gherkin 0.93% HTML 0.15% Shell 0.02% Perl 25.02% Procfile 0.01%

adhearsion's Introduction

Gem Version Build Code Climate Coverage Status Inline docs

Adhearsion

Adhearsion is an open-source voice application development framework. Adhearsion users write applications atop the framework with Ruby and call into their code.

Adhearsion rests above a lower-level telephony platform, for example Asterisk, FreeSWITCH or Voxeo PRISM, and provides a framework for integrating with various resources, such as SQL, LDAP and XMPP (Jabber).

Features

  • Simple Ruby code
  • Flexible CallControllers to handle calls
  • High-level media handling constructs
  • Simple interaction between calls
  • Self-documenting configuration engine
  • Support for plugins and other code reuse
  • Integration with databases, web APIs, etc
  • Event monitoring, async communication

Requirements

  • Ruby 2.2.0+ or JRuby 9.0.0.0+
  • ruby_speech dependencies
  • A VoIP platform:
    • Asterisk 11+
    • FreeSWITCH 1.4+
  • An interest in building cool new things

Ruby 1.9 is no longer supported by Adhearsion or the Ruby core team. You should upgrade to Ruby 2.2 as a matter of urgency in order to continue receiving security fixes.

Install

gem install adhearsion

Examples

An Adhearsion application can be as simple as this:

answer
say 'Hello, and thank you for your call. We will put you through to the front desk now...'
dial 'tel:+18005550199'
hangup

For more examples, check out the website.

Documentation

Visit Adhearsion's website for code examples and more information about the project. Also checkout the Adhearsion wiki on Github for community documentation.

If you're having trouble, you may want to try asking your question on the IRC channel (#adhearsion on irc.freenode.net), mailing list or, if you've found a bug, report it on the bug tracker.

Related Projects

These Open Source projects are also maintained by members of the Adhearsion team and may be useful when developing Adhearsion apps:

  • Telephony-Dev-Box is a system for creating virtual machines that will preconfigure Adhearsion, Asterisk, FreeSWITCH and PRISM together. Just add a SIP client and start calling your app!
  • SippyCup makes generating SIPp profiles and RTP media easy. Useful for load testing your apps and telephony infrastructure.

Authors

Core team:

Contributors: https://github.com/adhearsion/adhearsion/contributors

Original author: Jay Phillips

Contributions

Adhearsion has a set of contribution guidelines which help to smooth the contribution process. There is a pre-commit hook that runs encoding checks available in pre-commit. To use it, please copy it to .git/hooks/pre-commit and make it executable.

Copyright

Copyright (c) 2011-2014 Adhearsion Foundation Inc. MIT LICENSE (see LICENSE for details).

adhearsion's People

Contributors

baldrailers avatar benlangfeld avatar bklang avatar chewi avatar codemangler avatar crafterm avatar dilshodm avatar dwilkie avatar eric avatar gersmann avatar gfaza avatar hiroyuki-sato avatar jerodsanto avatar jicksta avatar joshrivers avatar jsgoecke avatar jsman avatar juandebravo avatar justinaiken avatar kares avatar lgleasain avatar libryder avatar lpradovera avatar olleolleolle avatar pungoyal avatar ringtiny avatar rmoriz avatar sfgeorge avatar taylor avatar vangberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adhearsion's Issues

Error in 0.8.4 during hangup

For the automatic test purpose a call between different adhearsion contexts is generated using 'originate' on asterisk. When call termination is invoked using hangup function error occurs (see below). It seems that hangup function is executed on already hanguped context. Moreover, hangup dialplan function in adhearsion does not terminates dialplan execution immediately (next functions are executed), is it intended behaviour or error? How can I terminate context execution definitely?

ERROR agi: NoMethodError: undefined method deliver_message' for nil:NilClass ERROR agi: /usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/voip/asterisk/agi_server.rb:15:indisconnecting'
/usr/lib/ruby/gems/1.8/gems/log4r-1.1.4/src/log4r/outputter/outputter.rb:128:in synchronize' /usr/lib/ruby/gems/1.8/gems/log4r-1.1.4/src/log4r/outputter/outputter.rb:128:insynch'
/usr/lib/ruby/gems/1.8/gems/log4r-1.1.4/src/log4r/outputter/outputter.rb:108:in canonical_log' (eval):3:indebug'
(eval):8:in debug' (eval):8:ineach'
(eval):8:in debug' /usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/voip/asterisk/commands.rb:68:inraw_response'
/usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/voip/asterisk/commands.rb:80:in response' /usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/voip/asterisk/commands.rb:136:inhangup'
/home/lpaszke/workspaces/eclipse/implix/cc-proxy_trunk_src/adhearsion/dialplan.rb:404:in load' /usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/voip/dial_plan.rb:50:ininstance_eval'
/usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/voip/dial_plan.rb:50:in run' /usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/voip/dial_plan.rb:107:inhandle'
/usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/voip/dial_plan.rb:83:in handle' /usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/voip/asterisk/agi_server.rb:34:inserve'
/usr/lib/ruby/1.8/gserver.rb:211:in start' /usr/lib/ruby/1.8/gserver.rb:208:ininitialize'
/usr/lib/ruby/1.8/gserver.rb:208:in new' /usr/lib/ruby/1.8/gserver.rb:208:instart'
/usr/lib/ruby/1.8/gserver.rb:198:in initialize' /usr/lib/ruby/1.8/gserver.rb:198:innew'
/usr/lib/ruby/1.8/gserver.rb:198:in start' /usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/voip/asterisk/agi_server.rb:81:instart'
/usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/initializer/asterisk.rb:62:in join_server_thread_after_initialized' /usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/theatre.rb:66:incall'
/usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/theatre.rb:66:in trigger_immediately' /usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/theatre.rb:63:inmap'
/usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/theatre.rb:63:in trigger_immediately' /usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/events_support.rb:47:intrigger_immediately'
/usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/initializer.rb:358:in trigger_after_initialized_hooks' /usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/initializer.rb:144:instart'
/usr/lib/ruby/gems/1.8/gems/adhearsion-0.8.4/lib/adhearsion/initializer.rb:92:in start' /home/lpaszke/workspaces/eclipse/implix/cc-proxy_trunk_src/features/support/env.rb:46 /home/lpaszke/workspaces/eclipse/implix/cc-proxy_trunk_src/features/support/env.rb:44:infork'
/home/lpaszke/workspaces/eclipse/implix/cc-proxy_trunk_src/features/support/env.rb:44
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/core_ext/instance_exec.rb:48:in instance_exec' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/core_ext/instance_exec.rb:48:incucumber_instance_exec'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/core_ext/instance_exec.rb:69:in cucumber_run_with_backtrace_filtering' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/core_ext/instance_exec.rb:36:incucumber_instance_exec'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/rb_support/rb_hook.rb:14:in invoke' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/language_support/language_methods.rb:102:ininvoke'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/language_support/language_methods.rb:90:in execute_before' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/language_support/language_methods.rb:89:ineach'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/language_support/language_methods.rb:89:in execute_before' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/language_support/language_methods.rb:13:inbefore'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/step_mother.rb:296:in before' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/step_mother.rb:295:ineach'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/step_mother.rb:295:in before' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/step_mother.rb:277:inbefore_and_after'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/scenario.rb:45:in accept' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/scenario.rb:100:inwith_visitor'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/scenario.rb:39:in accept' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/tree_walker.rb:51:invisit_feature_element'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/tree_walker.rb:180:in broadcast' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/tree_walker.rb:50:invisit_feature_element'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/feature.rb:26:in accept' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/feature.rb:25:ineach'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/feature.rb:25:in accept' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/tree_walker.rb:20:invisit_feature'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/tree_walker.rb:180:in broadcast' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/tree_walker.rb:19:invisit_feature'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/features.rb:29:in accept' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/features.rb:17:ineach'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/features.rb:17:in each' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/features.rb:28:inaccept'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/tree_walker.rb:14:in visit_features' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/tree_walker.rb:180:inbroadcast'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/ast/tree_walker.rb:13:in visit_features' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/cli/main.rb:61:inexecute!'
/usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/../lib/cucumber/cli/main.rb:20:in execute' /usr/lib/ruby/gems/1.8/gems/cucumber-0.6.2/bin/cucumber:8 /usr/bin/cucumber:19:inload'
/usr/bin/cucumber:19

It seems that

<Punchblock::ProtocolError> #<Punchblock::ProtocolError: name="#<Punchblock::ProtocolError: name=:feature_not_implemented text=nil call_id=nil component_id=nil>" text=nil call_id=nil component_id=nil>

Starting Adhearsion server at /Users/jsgoecke/Dropbox/Development/ahn_liquid_call
[2012-02-09 19:59:29] WARN  Adhearsion::LinuxProcName: Error while attaching libc function prctl: Function 'prctl' not found in [libc.dylib]
[2012-02-09 19:59:29] INFO  Adhearsion::Initializer: Defining RAILS_ENV variable to <development>
[2012-02-09 19:59:29] INFO  Adhearsion::PunchblockPlugin::Initializer: Starting connection to server
[2012-02-09 19:59:30] INFO  Adhearsion::Console: Starting up...
AHN> [2012-02-09 19:59:31] DEBUG Punchblock::Client: Handling event #<Punchblock::Connection::Connected:0x007f9d8e556e68> with source .
[2012-02-09 19:59:31] INFO  Punchblock::Connection::XMPP: Connected to XMPP as adhearsion@voxeolabs.p1.im
[2012-02-09 19:59:31] INFO  Adhearsion::PunchblockPlugin::Initializer: Connected to Punchblock server
[2012-02-09 19:59:31] INFO  Adhearsion::Initializer: Adhearsion v2.0.0.alpha2 initialized with environment <development>!
[2012-02-09 19:59:31] INFO  Adhearsion::Process: Transitioning from booting to running with 0 active calls due to booted event.
[2012-02-09 19:59:40] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-lrtcd0rlzho9
[2012-02-09 19:59:40] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" to="[email protected]/32427953851328846370824238" id="7994c9ed-823e-49d9-8406-60e4616da900">
  <offer xmlns="urn:xmpp:rayo:1" from="sip:[email protected]" to="sip:[email protected]">
    <header name="Record-Route" value="&lt;sip:67.231.8.195;lr=on;ftag=gK08525cf5&gt;"/>
    <header name="Content-Length" value="328"/>
    <header name="To" value="&lt;sip:[email protected]&gt;"/>
    <header name="Contact" value="&lt;sip:[email protected]:5060&gt;"/>
    <header name="Max-Forwards" value="53"/>
    <header name="Allow" value="INVITE"/>
    <header name="Content-Disposition" value="session; handling=required"/>
    <header name="CSeq" value="4229 INVITE"/>
    <header name="Via" value="SIP/2.0/UDP 67.231.8.195;branch=z9hG4bK47d7.8b186ef1.0"/>
    <header name="Call-ID" value="[email protected]"/>
    <header name="Content-Type" value="application/sdp"/>
    <header name="Accept" value="application/sdp"/>
    <header name="remote-party-id" value="&lt;sip:[email protected]:5060&gt;;privacy=off;screen=no"/>
    <header name="From" value="&lt;sip:[email protected]&gt;;tag=gK08525cf5"/>
  </offer>
</presence>
[2012-02-09 19:59:40] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::Offer to="sip:[email protected]", from="sip:[email protected]", headers_hash={:record_route=>"<sip:67.231.8.195;lr=on;ftag=gK08525cf5>", :content_length=>"328", :to=>"<sip:[email protected]>", :contact=>"<sip:[email protected]:5060>", :max_forwards=>"53", :allow=>"INVITE", :content_disposition=>"session; handling=required", :cseq=>"4229 INVITE", :via=>"SIP/2.0/UDP 67.231.8.195;branch=z9hG4bK47d7.8b186ef1.0", :call_id=>"[email protected]", :content_type=>"application/sdp", :accept=>"application/sdp", :remote_party_id=>"<sip:[email protected]:5060>;privacy=off;screen=no", :from=>"<sip:[email protected]>;tag=gK08525cf5"}, call_id="xejfqve-lx7-lrtcd0rlzho9", component_id=nil> with source .
[2012-02-09 19:59:41] DEBUG Punchblock::Client: Executing command: #<Punchblock::Command::Accept headers_hash={}, call_id=nil, component_id=nil> with options {:call_id=>"xejfqve-lx7-lrtcd0rlzho9"}
[2012-02-09 19:59:41] DEBUG Punchblock::Connection::XMPP: Sending IQ ID blather0008 #<Punchblock::Command::Accept headers_hash={}, call_id="xejfqve-lx7-lrtcd0rlzho9", component_id=nil> to [email protected]/32427953851328846370824238
[2012-02-09 19:59:41] DEBUG Punchblock::Connection::XMPP: Command blather0008 completed successfully
[2012-02-09 19:59:41] DEBUG Adhearsion::Router: Call xejfqve-lx7-lrtcd0rlzho9 passing through router matched route #<Adhearsion::Router::Route:70157336451080 name=default target=AhnLiquidCall guards=[]>
[2012-02-09 19:59:41] DEBUG Adhearsion::PunchblockPlugin::Initializer: Event received for call xejfqve-lx7-lrtcd0rlzho9: #<Punchblock::Event::Offer to="sip:[email protected]", from="sip:[email protected]", headers_hash={:record_route=>"<sip:67.231.8.195;lr=on;ftag=gK08525cf5>", :content_length=>"328", :to=>"<sip:[email protected]>", :contact=>"<sip:[email protected]:5060>", :max_forwards=>"53", :allow=>"INVITE", :content_disposition=>"session; handling=required", :cseq=>"4229 INVITE", :via=>"SIP/2.0/UDP 67.231.8.195;branch=z9hG4bK47d7.8b186ef1.0", :call_id=>"[email protected]", :content_type=>"application/sdp", :accept=>"application/sdp", :remote_party_id=>"<sip:[email protected]:5060>;privacy=off;screen=no", :from=>"<sip:[email protected]>;tag=gK08525cf5"}, call_id="xejfqve-lx7-lrtcd0rlzho9", component_id=nil>
[2012-02-09 19:59:41] DEBUG Adhearsion::Call: xejfqve-lx7-lrtcd0rlzho9: Routing call to: sip:95260079*14153675082@sip.flowroute.com
[2012-02-09 19:59:41] DEBUG Adhearsion::Call: xejfqve-lx7-lrtcd0rlzho9: Caller is: nil
[2012-02-09 19:59:41] DEBUG Punchblock::Client: Executing command: #<Punchblock::Command::Dial to="sip:95260079*[email protected]", from="tel:+16508683271", join=nil, headers_hash={}, call_id=nil, component_id=nil> with options {:call_id=>nil}
[2012-02-09 19:59:41] DEBUG Punchblock::Connection::XMPP: Sending IQ ID blather000a #<Punchblock::Command::Dial to="sip:95260079*[email protected]", from="tel:+16508683271", join=nil, headers_hash={}, call_id=nil, component_id=nil> to [email protected]/32427953851328846370824238
[2012-02-09 19:59:42] DEBUG Punchblock::Client: Executing command: #<Punchblock::Command::Hangup headers_hash={}, call_id=nil, component_id=nil> with options {:call_id=>"xejfqve-lx7-lrtcd0rlzho9"}
[2012-02-09 19:59:42] ERROR Adhearsion::Initializer: <Punchblock::ProtocolError> #<Punchblock::ProtocolError: name="#<Punchblock::ProtocolError: name=:feature_not_implemented text=nil call_id=nil component_id=nil>" text=nil call_id=nil component_id=nil>
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/gems/celluloid-0.8.0/lib/celluloid/responses.rb:20:in `value'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/gems/celluloid-0.8.0/lib/celluloid/actor.rb:44:in `call'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/gems/celluloid-0.8.0/lib/celluloid/actor_proxy.rb:72:in `method_missing'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call_controller/dial.rb:57:in `block in dial'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call_controller/dial.rb:56:in `map!'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call_controller/dial.rb:56:in `dial'
    /Users/jsgoecke/Dropbox/Development/ahn_liquid_call/lib/ahn_liquid_call.rb:11:in `run'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call_controller.rb:67:in `execute!'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call_controller.rb:41:in `block in exec'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call_controller.rb:40:in `catch'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call_controller.rb:40:in `exec'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call.rb:211:in `block (2 levels) in execute_controller'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/foundation/exception_handler.rb:4:in `catching_standard_errors'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call.rb:209:in `block in execute_controller'
[2012-02-09 19:59:42] DEBUG Punchblock::Connection::XMPP: Sending IQ ID blather000c #<Punchblock::Command::Hangup headers_hash={}, call_id="xejfqve-lx7-lrtcd0rlzho9", component_id=nil> to [email protected]/32427953851328846370824238
[2012-02-09 19:59:42] DEBUG Punchblock::Connection::XMPP: Command blather000c completed successfully
[2012-02-09 19:59:42] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-lrtcd0rlzho9
[2012-02-09 19:59:42] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" to="[email protected]/32427953851328846370824238" id="f1005bbf-3de6-416f-95ff-ab1fe0263419">
  <end xmlns="urn:xmpp:rayo:1">
    <hangup/>
  </end>
</presence>
[2012-02-09 19:59:42] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::End reason=:hangup, headers_hash={}, call_id="xejfqve-lx7-lrtcd0rlzho9", component_id=nil> with source .
[2012-02-09 19:59:42] DEBUG Adhearsion::PunchblockPlugin::Initializer: Event received for call xejfqve-lx7-lrtcd0rlzho9: #<Punchblock::Event::End reason=:hangup, headers_hash={}, call_id="xejfqve-lx7-lrtcd0rlzho9", component_id=nil>

Derive defaults for domain settings, if not configured, from the Offers

Right now I must specify the 'root_domain', the 'call_domain', etc if Rayo is running on a different domain than Adhearsion is connected to. Such as:

  • PRISM on foobar.com
  • Adhearsion on barfoo.com

If I don't, I get errors since Ahn tries to send back to its own domain if I have not explicitly configured. For this it would be great if Adhearsion would detect it had none configured and would derive the appropriate domain details from the Offer that it receives on each call. For outbound, maybe the domain with the first Offer wins.

Specifying 'ahn stop' without a project location throws a crappy error

  • Not including the project locale throws a crappy error
ahn stop
/home/adhearsion/.rvm/gems/ruby-1.9.3-p0/gems/adhearsion-2.0.0.alpha2/lib/adhearsion/foundation/object.rb:19:in `method_missing': undefined method `+' for nil:NilClass (NoMethodError)
    from /home/adhearsion/.rvm/gems/ruby-1.9.3-p0/gems/adhearsion-2.0.0.alpha2/lib/adhearsion/cli_commands.rb:63:in `stop'
    from /home/adhearsion/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /home/adhearsion/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /home/adhearsion/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /home/adhearsion/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from script/ahn:9:in `<main>'
  • Works
ahn stop .
Stopping Adhearsion server at . with pid 20462

Upgrade to PB 0.9.2 and Adhearsion develop throws method_missing on connection

callisto:ahn_liquid_call jsgoecke$ bundle exec ahn -
Starting Adhearsion server at /Users/jsgoecke/Dropbox/Development/ahn_liquid_call
[2012-02-18 08:25:07] WARN  Adhearsion::LinuxProcName: Error while attaching libc function prctl: Function 'prctl' not found in [libc.dylib]
[2012-02-18 08:25:07] INFO  Adhearsion::Initializer: Defining RAILS_ENV variable to <development>
/Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-68af0f23ddd2/lib/adhearsion/foundation/object.rb:19:in `method_missing': undefined local variable or method `connection' for nil:NilClass (NameError)
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-xmpp-55855f2cb428/lib/adhearsion/xmpp/plugin.rb:17:in `block in <class:Plugin>'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-68af0f23ddd2/lib/adhearsion/plugin/initializer.rb:24:in `instance_exec'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-68af0f23ddd2/lib/adhearsion/plugin/initializer.rb:24:in `run'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-68af0f23ddd2/lib/adhearsion/plugin.rb:164:in `block in init_plugins'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-68af0f23ddd2/lib/adhearsion/plugin.rb:163:in `each'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-68af0f23ddd2/lib/adhearsion/plugin.rb:163:in `init_plugins'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-68af0f23ddd2/lib/adhearsion/initializer.rb:181:in `init_plugins'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-68af0f23ddd2/lib/adhearsion/initializer.rb:50:in `start'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-68af0f23ddd2/lib/adhearsion/initializer.rb:9:in `start'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-68af0f23ddd2/lib/adhearsion/cli_commands.rb:113:in `start_app'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-68af0f23ddd2/lib/adhearsion/cli_commands.rb:55:in `start'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from script/ahn:9:in `<main>'

Adhearsion 0.8.4 : Call ends when jump to some context and play a menu

I've a code that uses jump_to method to go to a dial plan context. The context contains a menu that plays some prompts and then give user options to select. The jumping from code to context works fine. But when it tries to execute the menu code, the call ends with exception "HANGUP511 Command Not Permitted on a dead channel". It only happens in case when we jump from code to context and play a menu. If we directly call the context, it works fine. Any suggestions?

Thanks
Atif

After running for a long period of time, stops routing

I have had an Adhearsion instance up on Rayo/PRISM for a few days and went to make a call. It gets the offer but then declines, event though the code is fine. If I restart the Adhearsion app, it works again. Here is the bad call:

[2012-02-16 00:53:01] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-2jek1uzab9kxb
[2012-02-16 00:53:01] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" to="[email protected]/29227685401329269627752190" id="6923a2b9-b01b-4bb5-9e1c-3027d6eff128">
  <offer xmlns="urn:xmpp:rayo:1" from="sip:[email protected];isup-oli=62" to="sip:[email protected]">
    <header name="Record-Route" value="&lt;sip:67.231.8.195;lr=on;ftag=gK0d337e3e&gt;"/>
    <header name="Content-Length" value="327"/>
    <header name="To" value="&lt;sip:[email protected]&gt;"/>
    <header name="Contact" value="&lt;sip:[email protected]:5060&gt;"/>
    <header name="Max-Forwards" value="50"/>
    <header name="Allow" value="INVITE"/>
    <header name="Content-Disposition" value="session; handling=required"/>
    <header name="CSeq" value="19094 INVITE"/>
    <header name="Via" value="SIP/2.0/UDP 67.231.8.195;branch=z9hG4bK7b24.db0f8f47.0"/>
    <header name="Call-ID" value="[email protected]"/>
    <header name="Content-Type" value="application/sdp"/>
    <header name="Accept" value="application/sdp"/>
    <header name="remote-party-id" value="&lt;sip:[email protected]:5060&gt;;privacy=off;screen=no"/>
    <header name="From" value="&lt;sip:[email protected];isup-oli=62&gt;;tag=gK0d337e3e"/>
  </offer>
</presence>
[2012-02-16 00:53:01] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::Offer to="sip:[email protected]", from="sip:[email protected];isup-oli=62", headers_hash={:record_route=>"<sip:67.231.8.195;lr=on;ftag=gK0d337e3e>", :content_length=>"327", :to=>"<sip:[email protected]>", :contact=>"<sip:[email protected]:5060>", :max_forwards=>"50", :allow=>"INVITE", :content_disposition=>"session; handling=required", :cseq=>"19094 INVITE", :via=>"SIP/2.0/UDP 67.231.8.195;branch=z9hG4bK7b24.db0f8f47.0", :call_id=>"[email protected]", :content_type=>"application/sdp", :accept=>"application/sdp", :remote_party_id=>"<sip:[email protected]:5060>;privacy=off;screen=no", :from=>"<sip:[email protected];isup-oli=62>;tag=gK0d337e3e"}, call_id="xejfqve-lx7-2jek1uzab9kxb", component_id=nil> with source .
[2012-02-16 00:53:01] DEBUG Punchblock::Client: Executing command: #<Punchblock::Command::Reject reason=:decline, headers_hash={}, call_id=nil, component_id=nil> with options {:call_id=>"xejfqve-lx7-2jek1uzab9kxb"}
[2012-02-16 00:53:01] DEBUG Punchblock::Connection::XMPP: Sending IQ ID blather4842 #<Punchblock::Command::Reject reason=:decline, headers_hash={}, call_id="xejfqve-lx7-2jek1uzab9kxb", component_id=nil> to [email protected]/29227685401329269627752190
[2012-02-16 00:53:02] DEBUG Punchblock::Connection::XMPP: Command blather4842 completed successfully
[2012-02-16 00:53:02] DEBUG Adhearsion::PunchblockPlugin::Initializer: Event received for call xejfqve-lx7-2jek1uzab9kxb: #<Punchblock::Event::Offer to="sip:[email protected]", from="sip:[email protected];isup-oli=62", headers_hash={:record_route=>"<sip:67.231.8.195;lr=on;ftag=gK0d337e3e>", :content_length=>"327", :to=>"<sip:[email protected]>", :contact=>"<sip:[email protected]:5060>", :max_forwards=>"50", :allow=>"INVITE", :content_disposition=>"session; handling=required", :cseq=>"19094 INVITE", :via=>"SIP/2.0/UDP 67.231.8.195;branch=z9hG4bK7b24.db0f8f47.0", :call_id=>"[email protected]", :content_type=>"application/sdp", :accept=>"application/sdp", :remote_party_id=>"<sip:[email protected]:5060>;privacy=off;screen=no", :from=>"<sip:[email protected];isup-oli=62>;tag=gK0d337e3e"}, call_id="xejfqve-lx7-2jek1uzab9kxb", component_id=nil>
[2012-02-16 00:53:02] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-2jek1uzab9kxb
[2012-02-16 00:53:02] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" to="[email protected]/29227685401329269627752190" id="1a2601ec-8a30-4e4a-bb5f-7a1a2e1c2f78">
  <end xmlns="urn:xmpp:rayo:1">
    <reject/>
  </end>

Double-quotes sent to #speak are not escaped for unimrcp

If the TTS/SSML text that you send to the new #speak command contains quotes, the unimrcp speech engine does not escape those quotes when EXEC'ing MRCPSynth. As a result, nothing is spoken at all.

In my testing, it appears that the AGI command should have double-quotes escaped with 3 backslashes (\") in order to work properly. Here's a summary of tests that worked and didn't: https://gist.github.com/e941128659baf557ffd2

Thanks,

Stephen G.

Problems using logging :formatter in daemon mode

I have the following logging configuration in startup.rb:

config.logging :level => :debug, :formatter => Log4r::PatternFormatter.new(:pattern => '%5l %c %d %x %m')

If I run "ahn start daemon ." on Adhearsion 1.2.0, it fails to initialize. It dies with the following error:

/Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer/configuration.rb:72:in `logging': undefined method `count' for #<Log4r::FileOutputter:0x007fbd31d2ec40> (NoMethodError)
        from /Users/sgeorge/Code/ifbyphone/cloudvox/apptastic/config/adhearsion.rb:44:in `block in <top (required)>'
        from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer/configuration.rb:28:in `configure'
        from /Users/sgeorge/Code/ifbyphone/cloudvox/apptastic/config/adhearsion.rb:28:in `<top (required)>'
        from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer.rb:272:in `load'
        from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer.rb:272:in `block in load_all_init_files'
        from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer.rb:272:in `each'
        from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer.rb:272:in `load_all_init_files'
        from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer.rb:147:in `start'
        from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer.rb:102:in `start'
        from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/commands.rb:209:in `start'
        from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/commands.rb:29:in `execute!'
        from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/bin/ahn:29:in `<top (required)>'
        from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/bin/ahn:19:in `load'
        from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/bin/ahn:19:in `<main>'

However, if I start up Adhearsion with either of "ahn start ." or "ahn start console ." there is no such issue.

It appears that because daemon mode has but one outputter, the AdhearsionLogger.outputters property is not an array, and so it does not have a count property.

#speak fails to work on Asterisk

As reported by @baldrailers, the #speak controller method does not currently work on Asterisk without UniMRCP. Additionally, the Punchblock Asterisk Output component throws an exception when attempting to parse the SSML document if it contains string tokens: https://gist.github.com/af88d207cc0e5d552bc4.

A few recommendations:

  1. Punchblock should report a reasonable error if an Output command is attempted with anything other than <audio/> tags in native mode
  2. Punchblock should support app_swift for Output rendering

Test failing occasionally

One test on #conference, both on develop and feature branches, occasionally fails, roughly 1 out of 2 runs.
Output from RSpec follows:

Failures:

  1. Adhearsion::CallController it should behave like conference commands#conference handling of active speaker notifications when the speaking call is not known to adhearsion with a finished speaking event calls the on_finished_speaking callback with the speaking call ID string
    Failure/Error: @foo.should == speaking_call_id
    expected: "f691ab00-1773-012f-b75b-0016d44e75c3"
    got: nil (using ==)
    Shared Example Group: "conference commands" called from ./spec/adhearsion/call_controller_spec.rb:331

    ./spec/support/call_controller/conference_commands.rb:81:in `block (5 levels) in class:CallController'

#record_to_file filename collisions

When you use #record_to_file without specifying a recording filename, Adhearsion is nice and auto-generates a filename for you. It generates the filename using an incrementing counter variable. e.g., "/tmp/recording_0", "/tmp/recording_1", etc.

The problem is that this counter is stored as a variable specific to the call. When multiple concurrent calls are recording with auto-generated filenames, they can end up using the same filename, which is bad.

I tested this and sure enough a collision did occur. Here's the output from my logs, showing 2 calls doing a recording to the same filename:

DEBUG agi: >>> EXEC MRCPSynth "Question 1 out of 6."
DEBUG agi: <<< 200 result=0

 WARN agi: Format not specified and not detected.  Defaulting to "gsm"
DEBUG agi: >>> RECORD FILE "/tmp/recording_0" "gsm" "#" "-1" "0" "s=1.5"
DEBUG agi: <<< 200 result=0

 WARN agi: Format not specified and not detected.  Defaulting to "gsm"
DEBUG agi: >>> RECORD FILE "/tmp/recording_0" "gsm" "#" "-1" "0" "s=1.5"
DEBUG agi: <<< 200 result=0 (timeout) endpos=42880

DEBUG agi: >>> EXEC MRCPSynth "Thanks for your recording."
DEBUG agi: <<< 200 result=0 (timeout) endpos=46400```

I'd like to hear what you folks think is a reasonable solution to this.  My 2 cents: I think that the filename should be composed of the call's :uniqueid as well as the existing counter mechanism.

get `dial` status

Feature Request:

I'm not sure if it's already there but, I think there should be a way to get dial status to be able to handle the call-flow better.

Error on Dial, should it raise a Ruby exception?

Should this not raise a Ruby exception to do a begin/rescue claus around, or should we be parsing the event that returns?

[2012-02-07 16:49:23] DEBUG Punchblock::Connection::XMPP:

<presence from="[email protected]" id="1ae0d37c-ffaa-438c-9e5e-13d52c15f148" to="[email protected]">
  <end xmlns="urn:xmpp:rayo:1">
    <error>Could not negotiate call</error>
  </end>
</presence> 

[2012-02-07 16:49:23] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::End reason=:error, headers_hash={}, call_id="xejfqve-lx7-tt9zt738yiay", component_id=nil> with source .

Blather DSL not available outside of XMPPBot

So, the following works:
XMPPBot.message :body do |m|
XMPPBot.say m.from, "You said: #{m.body}"
end
Because this is executed by the XMPPBot class when the callback is hit (a message with a body) and so say() is available (XMPPBot includes Blather::DSL).

This doesn't work (via bklang):
Events.register_callback "/asterisk/before_call" do |call|
XMPPBot.say some_jid, "Something"
end
because this is executed outside of XMPPBot.

Blather::DSL::say() is public, however, so i'm not entirely sure why this is the case. Can anyone point out what is wrong?

Rails models cannot be accessed through components

INFO agi: Adhearsion::VoIP::Asterisk::AGI::Server::RubyServer 0.0.0.0:4573 client:33865 disconnect
ERROR ahn: NameError: wrong constant name #<Adhearsion
DEBUG ahn: /home/korsar/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/inflector/methods.rb:124:in `const_defined?'

/home/korsar/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/inflector/methods.rb:124:in `block in constantize'
/home/korsar/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/inflector/methods.rb:123:in `each'
/home/korsar/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/inflector/methods.rb:123:in `constantize'
/home/korsar/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:183:in `block in const_missing'
/home/korsar/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:181:in `each'
/home/korsar/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:181:in `const_missing'
/home/korsar/RubymineProjects/9590ru/components/owner_call/lib/owner_call.rb:61:in `pack_dial_list'
/home/korsar/RubymineProjects/9590ru/components/owner_call/lib/owner_call.rb:36:in `generate_menu'
/home/korsar/RubymineProjects/9590ru/components/owner_call/lib/owner_call.rb:24:in `block in start'
/home/korsar/RubymineProjects/9590ru/components/owner_call/lib/owner_call.rb:21:in `loop'
/home/korsar/RubymineProjects/9590ru/components/owner_call/lib/owner_call.rb:21:in `start'
/home/korsar/RubymineProjects/9590ru/app/dialplan.rb:9:in `block in load'
/home/korsar/.rvm/gems/ruby-1.9.2-p290/gems/adhearsion-1.2.3/lib/adhearsion/voip/dial_plan.rb:71:in `instance_eval'
/home/korsar/.rvm/gems/ruby-1.9.2-p290/gems/adhearsion-1.2.3/lib/adhearsion/voip/dial_plan.rb:71:in `run'
/home/korsar/.rvm/gems/ruby-1.9.2-p290/gems/adhearsion-1.2.3/lib/adhearsion/voip/dial_plan.rb:132:in `handle'
/home/korsar/.rvm/gems/ruby-1.9.2-p290/gems/adhearsion-1.2.3/lib/adhearsion/voip/dial_plan.rb:108:in `handle'
/home/korsar/.rvm/gems/ruby-1.9.2-p290/gems/adhearsion-1.2.3/lib/adhearsion/voip/asterisk/agi_server.rb:34:in `serve'
/home/korsar/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/gserver.rb:211:in `block (2 levels) in start

Error when trying to apply the model
env => adhearsion (1.2.3) Rails (3.0.10) Ruby (1.9.2)

Console does not exit after Ahn initializes - (pry) output error: #<TypeError: exception class/object expected>

callisto:ahn_liquid_call jsgoecke$ ahn -
/Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/gems/json-1.4.6/lib/json/common.rb:2:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.
/Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/gems/logging-1.7.0/lib/logging/utils.rb:169: Use RbConfig instead of obsolete and deprecated Config.
/Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/gems/json-1.4.6/lib/json/common.rb:2:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.
/Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/gems/logging-1.7.0/lib/logging/utils.rb:169: Use RbConfig instead of obsolete and deprecated Config.
Starting Adhearsion server at /Users/jsgoecke/Dropbox/Development/ahn_liquid_call
[2012-02-20 08:38:16] WARN  Adhearsion::LinuxProcName: Error while attaching libc function prctl: Function 'prctl' not found in [libc.dylib]
[2012-02-20 08:38:16] INFO  Adhearsion::Initializer: Defining RAILS_ENV variable to <development>
[2012-02-20 08:38:17] INFO  Adhearsion::Console: Starting up...
AHN> [2012-02-20 08:38:17] INFO  Adhearsion::PunchblockPlugin::Initializer: Starting connection to server
[2012-02-20 08:38:19] DEBUG Punchblock::Client: Handling event #<Punchblock::Connection::Connected:0x007fbf1ab6fd38> with source .
[2012-02-20 08:38:19] INFO  Punchblock::Connection::XMPP: Connected to XMPP as develop@voxeolabs.p1.im/admin
[2012-02-20 08:38:19] INFO  Adhearsion::PunchblockPlugin::Initializer: Connected to Punchblock server
[2012-02-20 08:38:19] INFO  Adhearsion::Process: Transitioning from booting to running with 0 active calls due to booted event.
[2012-02-20 08:38:19] INFO  Adhearsion::Initializer: Adhearsion v2.0.0.alpha2 initialized with environment <development>!

AHN> 
AHN> 
AHN> 
AHN> 
AHN> exit
[2012-02-20 08:38:27] INFO  Adhearsion::Process: Transitioning from running to stopping with 0 active calls due to shutdown event.
[2012-02-20 08:38:27] INFO  Adhearsion::PunchblockPlugin::Initializer: Shutting down while connecting. Breaking the connection block.
(pry) output error: #<TypeError: exception class/object expected>
[2012-02-20 08:38:27] INFO  Adhearsion::Console: Shutting down
AHN> 

Symbol table continues to grow on every new call causing a memory leak

@benlangfeld My adhearsion application is handling many calls. I have noticed that any time a new call comes in and is answered, a symbol such as :sip611900014040 is added to my application's symbol table. This is causing a memory leak in my application because over time the growth of the symbol table eats up so much memory that I have to restart my application. I am using version 1.2.3 of adhearsion with ruby 1.9.2. How do I fix this?

Recording Problem

in asterisk 1.6, the recording gets discarded if caller hangup, or user didn't press # in max duration. I read that we need to pass 'k' option to keep the recording. Currently, the record method only pass max duration, and silence options to the execute method. Kindly look into this to cater for other options required by asterisk 1.6.

Thanks,
Atif

Race condition when dialing multiple destinations

At https://github.com/adhearsion/adhearsion/blob/develop/lib/adhearsion/call_controller/dial.rb#L40 there is a lambda to be executed when each of the dialed channels answer. There is a race condition where, if two calls answer at the same instant, both will hangup all the other channels, clobbering each other.

I think the fix would be to make the outer-most calls variable (assigned as a result of the map on line 37) a ThreadSafeArray. Then the lock acquired for calls.each on line 43 should protect the block, which will also need to be modified to check whether the current call is still alive before proceeding.

HANGUP511 Command Not Permitted on a dead channel

I shifted my adhearsion 0.8.2 code to 0.8.4 along with asterisk 1.6. The caller hang-up resulted in an endless loop. It seemed that the adhearsion didn't catch the hang-up exception. On going through adhearsion commands.rb, i found that there was check missing for the response message i was getting from asterisk in read method. It currently handles "511 Command Not Permitted on a dead channel" however the response i got was "HANGUP511 Command Not Permitted on a dead channel". I've overridden the read method and It seemed to solve the problem.

However, there's one more issue i faced while overriding the method. The adhearsion/voip/asterisk.rb has been required in adhearsion code twice i.e in adhearsion.rb, and initilializers/asterisk.rb, which removed the changes i made overriding the read method. I've currently commented the require in asterisk.rb. Kindly suggest if there's an impact of commenting it? If there's not, kindly fix and update the code :)

Thanks
Atif

Adhearsion crashing on Heroku Cedar

I have tried multiple ways to take advantage of the Procfile that comes with Ahn 2.0. While I may deploy and run Adhearsion, it crashes at what appears to be an attempt to connect to XMPP. I thought this might be related to v1.9.1 that Cedar uses by default, so I decided to try with 1.9.3 as described here:

http://railsapps.github.com/rails-heroku-tutorial.html

But, still have the same 'crashing' problem as seen here in the various files:

https://gist.github.com/d6d14fa97043ee98dfee

I will continue to investigate and see what I may come up with.

AHN 1.2.3 - input and :speak option passing additional parameters to swift

This command

ext = input 1, :interruptible => true, :timeout => 8.seconds, :speak => {:text => "Hi"}

Results in this output:

DEBUG agi: >>> EXEC Swift "Hi","1","1"

Which appends 1, 1 to the end of the transcription. This command:

speak "Hi"

Works as expected.

:interruptible also seems to have no effect but I'm not actually sure if that's a bug.

Generator and script differences in master and develop

The master branch uses lib/adhearsion/commands.rb, referencing it in script/ahn in generated applications.
Develop branch uses lib/adhearsion/cli_commands.rb and tries to load that.

What happens is that an app generated with master does not start with develop. This is not an issue as far as everyone knows, so I am noting this for reference.

Hangup during recording isn't detected

We're running Asterisk 1.4 and calling #record_to_file! from Adhearsion. If the caller hang up in the middle of the recording, Asterisk is sending back an explicit "(hangup)" in its response (see the log below). However, Adhearsion does not notice the hangup flag and allows our application to attempt to send further commands to Asterisk.

Adhearsion should raise a Hangup immediately when it received a (hangup) flag.

DEBUG agi: >>> RECORD FILE "/tmp/A5" "WAV" "0123456789#*" "180000" "0" "s=3"
DEBUG agi: <<< 200 result=-1 (hangup) endpos=25280

DEBUG agi: >>> EXEC MRCPSynth "Thank you for your response."|"i=any"
INFO agi: Adhearsion::VoIP::Asterisk::AGI::Server::RubyServer 0.0.0.0:4573 client:44780 disconnect

Comma in Swift text to speech causes hangup

When calling I hear 'Hello backslash" and the call is hungup.

dialplan.rb

inbound {
speak 'Hello, this is the voice of Adhearsion!'
}

Adhearsion

[root@pbx myapp]# ahn -
INFO ahn: Adhearsion v1.2.0 initialized!
INFO agi: Adhearsion::VoIP::Asterisk::AGI::Server::RubyServer 0.0.0.0:4573 start

INFO agi: Adhearsion::VoIP::Asterisk::AGI::Server::RubyServer 0.0.0.0:4573 client:36541 127.0.0.1<127.0.0.1> connect
DEBUG agi: Handling call with variables {:network=>true, :request=>#<URI::Generic:0x00000001eca148 URL:agi://localhost/>, :channel=>"SIP/vitel-inbound-00000003", :language=>"en", :type=>"SIP", :uniqueid=>"1314387233.3", :version=>"1.8.5.0", :callerid=>5551212, :calleridname=>5551212, :callingpres=>0, :callingani2=>0, :callingtns=>0, :dnid=>5551212, :rdnis=>nil, :context=>"inbound", :extension=>5551212, :priority=>1, :enhanced=>0.0, :accountcode=>"", :threadid=>140697786255104, :query=>{}, :type_of_calling_number=>:unknown}
DEBUG agi: >>> ANSWER
DEBUG agi: <<< 200 result=0

DEBUG agi: >>> EXEC Swift "Hello\, this is the voice of Adhearsion!"
DEBUG agi: <<< 200 result=0

DEBUG agi: >>> GET VARIABLE "SWIFT_DTMF"
DEBUG agi: <<< 200 result=0

INFO agi: Adhearsion::VoIP::Asterisk::AGI::Server::RubyServer 0.0.0.0:4573 client:36541 disconnect

Asterisk

-- Executing [5551212@inbound:1] AGI("SIP/vitel-inbound-00000003", "agi://localhost/") in new stack
-- AGI Script Executing Application: (Swift) Options: (Hello\\, this is the voice of Adhearsion!)
-- <SIP/vitel-inbound-00000003>AGI Script agi://localhost/ completed, returning 0
-- Auto fallthrough, channel 'SIP/vitel-inbound-00000003' status is 'UNKNOWN'

pbx*CLI>

input command

Hi,

this code works well
selected = agi.input pin.length, :timeout => 10, :accept_key => "#", :play => "vm-password"

and on this, system tells three times 'password' and freezes (i cannot enter any dtmf)
selected = agi.input pin.length, :timeout => 10, :accept_key => "", :play => "vm-password"

New member joining Konference 2 with PIN 1665.
DEBUG agi: >>> STREAM FILE "vm-password" "1234567890*#"
DEBUG agi: <<< 200 result=0 endpos=6720

DEBUG agi: >>> STREAM FILE "vm-password" "1234567890*#"
DEBUG agi: <<< 200 result=0 endpos=6720

DEBUG agi: >>> STREAM FILE "vm-password" "1234567890*#"
DEBUG agi: <<< 200 result=0 endpos=6720

<NoMethodError> undefined method `join' for 772:Fixnum

callisto:ahn_liquid_call jsgoecke$ ahn -
Starting Adhearsion server at /Users/jsgoecke/Dropbox/Development/ahn_liquid_call
[2012-02-09 19:52:03] WARN  Adhearsion::LinuxProcName: Error while attaching libc function prctl: Function 'prctl' not found in [libc.dylib]
[2012-02-09 19:52:03] INFO  Adhearsion::Initializer: Defining RAILS_ENV variable to <development>
[2012-02-09 19:52:03] INFO  Adhearsion::Console: Starting up...
AHN> [2012-02-09 19:52:04] INFO  Adhearsion::PunchblockPlugin::Initializer: Starting connection to server
[2012-02-09 19:52:15] DEBUG Punchblock::Client: Handling event #<Punchblock::Connection::Connected:0x007f9119021780> with source .
[2012-02-09 19:52:15] INFO  Punchblock::Connection::XMPP: Connected to XMPP as usera@pb.tfoundry.com
[2012-02-09 19:52:15] INFO  Adhearsion::PunchblockPlugin::Initializer: Connected to Punchblock server
[2012-02-09 19:52:15] INFO  Adhearsion::Initializer: Adhearsion v2.0.0.alpha2 initialized with environment <development>!
[2012-02-09 19:52:15] INFO  Adhearsion::Process: Transitioning from booting to running with 0 active calls due to booted event.
[2012-02-09 19:52:25] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-069kpalmfwoab
[2012-02-09 19:52:25] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" id="4c34790c-880a-421b-97a8-c7ec174e0065" to="[email protected]">
  <offer xmlns="urn:xmpp:rayo:1" from="sip:[email protected]" to="sip:[email protected]">
    <header name="Record-Route" value="&lt;sip:67.231.8.195;lr=on;ftag=gK084ff247&gt;"/>
    <header name="Content-Length" value="328"/>
    <header name="To" value="&lt;sip:[email protected]&gt;"/>
    <header name="Contact" value="&lt;sip:[email protected]:5060&gt;"/>
    <header name="Max-Forwards" value="53"/>
    <header name="Allow" value="INVITE"/>
    <header name="Content-Disposition" value="session; handling=required"/>
    <header name="CSeq" value="23288 INVITE"/>
    <header name="Via" value="SIP/2.0/UDP 67.231.8.195;branch=z9hG4bKc97f.51605685.0"/>
    <header name="Call-ID" value="[email protected]"/>
    <header name="Content-Type" value="application/sdp"/>
    <header name="Accept" value="application/sdp"/>
    <header name="remote-party-id" value="&lt;sip:[email protected]:5060&gt;;privacy=off;screen=no"/>
    <header name="From" value="&lt;sip:[email protected]&gt;;tag=gK084ff247"/>
  </offer>
</presence>
[2012-02-09 19:52:25] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::Offer to="sip:[email protected]", from="sip:[email protected]", headers_hash={:record_route=>"<sip:67.231.8.195;lr=on;ftag=gK084ff247>", :content_length=>"328", :to=>"<sip:[email protected]>", :contact=>"<sip:[email protected]:5060>", :max_forwards=>"53", :allow=>"INVITE", :content_disposition=>"session; handling=required", :cseq=>"23288 INVITE", :via=>"SIP/2.0/UDP 67.231.8.195;branch=z9hG4bKc97f.51605685.0", :call_id=>"[email protected]", :content_type=>"application/sdp", :accept=>"application/sdp", :remote_party_id=>"<sip:[email protected]:5060>;privacy=off;screen=no", :from=>"<sip:[email protected]>;tag=gK084ff247"}, call_id="xejfqve-lx7-069kpalmfwoab", component_id=nil> with source .
[2012-02-09 19:52:25] DEBUG Punchblock::Client: Executing command: #<Punchblock::Command::Accept headers_hash={}, call_id=nil, component_id=nil> with options {:call_id=>"xejfqve-lx7-069kpalmfwoab"}
[2012-02-09 19:52:25] DEBUG Punchblock::Connection::XMPP: Sending IQ ID blather0008 #<Punchblock::Command::Accept headers_hash={}, call_id="xejfqve-lx7-069kpalmfwoab", component_id=nil> to [email protected]/1llrm18ey6sws
[2012-02-09 19:52:25] DEBUG Punchblock::Connection::XMPP: Command blather0008 completed successfully
[2012-02-09 19:52:25] DEBUG Adhearsion::Router: Call xejfqve-lx7-069kpalmfwoab passing through router matched route #<Adhearsion::Router::Route:70130583272480 name=default target=AhnLiquidCall guards=[]>
[2012-02-09 19:52:25] DEBUG Adhearsion::PunchblockPlugin::Initializer: Event received for call xejfqve-lx7-069kpalmfwoab: #<Punchblock::Event::Offer to="sip:[email protected]", from="sip:[email protected]", headers_hash={:record_route=>"<sip:67.231.8.195;lr=on;ftag=gK084ff247>", :content_length=>"328", :to=>"<sip:[email protected]>", :contact=>"<sip:[email protected]:5060>", :max_forwards=>"53", :allow=>"INVITE", :content_disposition=>"session; handling=required", :cseq=>"23288 INVITE", :via=>"SIP/2.0/UDP 67.231.8.195;branch=z9hG4bKc97f.51605685.0", :call_id=>"[email protected]", :content_type=>"application/sdp", :accept=>"application/sdp", :remote_party_id=>"<sip:[email protected]:5060>;privacy=off;screen=no", :from=>"<sip:[email protected]>;tag=gK084ff247"}, call_id="xejfqve-lx7-069kpalmfwoab", component_id=nil>
[2012-02-09 19:52:26] DEBUG Adhearsion::Call: xejfqve-lx7-069kpalmfwoab: Routing call to: sip:95260079*14153675082@sip.flowroute.com
[2012-02-09 19:52:26] DEBUG Adhearsion::Call: xejfqve-lx7-069kpalmfwoab: Caller is: nil
[2012-02-09 19:52:26] DEBUG Punchblock::Client: Executing command: #<Punchblock::Command::Dial to="sip:95260079*[email protected]", from="tel:+16508683271", join=nil, headers_hash={}, call_id=nil, component_id=nil> with options {:call_id=>nil}
[2012-02-09 19:52:26] DEBUG Punchblock::Connection::XMPP: Sending IQ ID blather000a #<Punchblock::Command::Dial to="sip:95260079*[email protected]", from="tel:+16508683271", join=nil, headers_hash={}, call_id=nil, component_id=nil> to [email protected]/1llrm18ey6sws
[2012-02-09 19:52:26] DEBUG Punchblock::Connection::XMPP: Command blather000a completed successfully
[2012-02-09 19:52:33] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-ttgy6wkk6p80
[2012-02-09 19:52:33] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" id="49c9f3bf-b68d-493e-900d-68c6b03139ca" to="[email protected]">
  <ringing xmlns="urn:xmpp:rayo:1">
    <header name="Record-Route" value="&lt;sip:216.115.69.133;lr&gt;"/>
    <header name="Content-Length" value="187"/>
    <header name="Contact" value="&lt;sip:[email protected]:5060;transport=udp&gt;"/>
    <header name="To" value="&lt;sip:95260079*[email protected]&gt;;tag=SDiosce99-gK0cccc946"/>
    <header name="CSeq" value="1 INVITE"/>
    <header name="Via" value="SIP/2.0/UDP 12.208.178.148:5060;branch=z9hG4bKbhtxfdz89xyx;rport=5060"/>
    <header name="Call-ID" value="1i9rblip3e79u"/>
    <header name="Content-Type" value="application/sdp"/>
    <header name="From" value="&lt;tel:+16508683271&gt;;tag=sbg657457z9f"/>
  </ringing>
</presence>
[2012-02-09 19:52:33] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::Ringing headers_hash={:record_route=>"<sip:216.115.69.133;lr>", :content_length=>"187", :contact=>"<sip:[email protected]:5060;transport=udp>", :to=>"<sip:95260079*[email protected]>;tag=SDiosce99-gK0cccc946", :cseq=>"1 INVITE", :via=>"SIP/2.0/UDP 12.208.178.148:5060;branch=z9hG4bKbhtxfdz89xyx;rport=5060", :call_id=>"1i9rblip3e79u", :content_type=>"application/sdp", :from=>"<tel:+16508683271>;tag=sbg657457z9f"}, call_id="xejfqve-lx7-ttgy6wkk6p80", component_id=nil> with source .
[2012-02-09 19:52:33] DEBUG Adhearsion::PunchblockPlugin::Initializer: Event received for call xejfqve-lx7-ttgy6wkk6p80: #<Punchblock::Event::Ringing headers_hash={:record_route=>"<sip:216.115.69.133;lr>", :content_length=>"187", :contact=>"<sip:[email protected]:5060;transport=udp>", :to=>"<sip:95260079*[email protected]>;tag=SDiosce99-gK0cccc946", :cseq=>"1 INVITE", :via=>"SIP/2.0/UDP 12.208.178.148:5060;branch=z9hG4bKbhtxfdz89xyx;rport=5060", :call_id=>"1i9rblip3e79u", :content_type=>"application/sdp", :from=>"<tel:+16508683271>;tag=sbg657457z9f"}, call_id="xejfqve-lx7-ttgy6wkk6p80", component_id=nil>
[2012-02-09 19:52:38] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-ttgy6wkk6p80
[2012-02-09 19:52:38] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" id="9d1dc341-f147-4665-95f6-45c03d9206ab" to="[email protected]">
  <answered xmlns="urn:xmpp:rayo:1"/>
</presence>
[2012-02-09 19:52:38] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::Answered headers_hash={}, call_id="xejfqve-lx7-ttgy6wkk6p80", component_id=nil> with source .
[2012-02-09 19:52:38] DEBUG Adhearsion::PunchblockPlugin::Initializer: Event received for call xejfqve-lx7-ttgy6wkk6p80: #<Punchblock::Event::Answered headers_hash={}, call_id="xejfqve-lx7-ttgy6wkk6p80", component_id=nil>
[2012-02-09 19:52:38] DEBUG Punchblock::Client: Executing command: #<Punchblock::Command::Join other_call_id="xejfqve-lx7-069kpalmfwoab", mixer_name=nil, direction=nil, media=nil, call_id=nil, component_id=nil> with options {:call_id=>"xejfqve-lx7-ttgy6wkk6p80"}
[2012-02-09 19:52:38] DEBUG Punchblock::Connection::XMPP: Sending IQ ID blather000c #<Punchblock::Command::Join other_call_id="xejfqve-lx7-069kpalmfwoab", mixer_name=nil, direction=nil, media=nil, call_id="xejfqve-lx7-ttgy6wkk6p80", component_id=nil> to [email protected]/1llrm18ey6sws
[2012-02-09 19:52:39] DEBUG Punchblock::Connection::XMPP: Command blather000c completed successfully
[2012-02-09 19:52:39] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-ttgy6wkk6p80
[2012-02-09 19:52:39] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" id="8507ff8b-773d-427b-83ae-42f88913906c" to="[email protected]">
  <joined xmlns="urn:xmpp:rayo:1" call-id="xejfqve-lx7-069kpalmfwoab"/>
</presence>
[2012-02-09 19:52:39] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::Joined other_call_id="xejfqve-lx7-069kpalmfwoab", mixer_name=nil, call_id="xejfqve-lx7-ttgy6wkk6p80", component_id=nil> with source .
[2012-02-09 19:52:39] DEBUG Adhearsion::PunchblockPlugin::Initializer: Event received for call xejfqve-lx7-ttgy6wkk6p80: #<Punchblock::Event::Joined other_call_id="xejfqve-lx7-069kpalmfwoab", mixer_name=nil, call_id="xejfqve-lx7-ttgy6wkk6p80", component_id=nil>
[2012-02-09 19:52:39] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-069kpalmfwoab
[2012-02-09 19:52:39] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" id="5e9de775-abe4-46f0-8ec8-75b04cf7583c" to="[email protected]">
  <joined xmlns="urn:xmpp:rayo:1" call-id="xejfqve-lx7-ttgy6wkk6p80"/>
</presence>
[2012-02-09 19:52:39] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::Joined other_call_id="xejfqve-lx7-ttgy6wkk6p80", mixer_name=nil, call_id="xejfqve-lx7-069kpalmfwoab", component_id=nil> with source .
[2012-02-09 19:52:39] DEBUG Adhearsion::PunchblockPlugin::Initializer: Event received for call xejfqve-lx7-069kpalmfwoab: #<Punchblock::Event::Joined other_call_id="xejfqve-lx7-ttgy6wkk6p80", mixer_name=nil, call_id="xejfqve-lx7-069kpalmfwoab", component_id=nil>
[2012-02-09 19:52:40] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-ttgy6wkk6p80
[2012-02-09 19:52:40] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" id="8ae26a7a-8cea-4414-831f-128df0df7f59" to="[email protected]">
  <unjoined xmlns="urn:xmpp:rayo:1" call-id="xejfqve-lx7-069kpalmfwoab"/>
</presence>
[2012-02-09 19:52:40] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::Unjoined other_call_id="xejfqve-lx7-069kpalmfwoab", mixer_name=nil, call_id="xejfqve-lx7-ttgy6wkk6p80", component_id=nil> with source .
[2012-02-09 19:52:40] DEBUG Adhearsion::PunchblockPlugin::Initializer: Event received for call xejfqve-lx7-ttgy6wkk6p80: #<Punchblock::Event::Unjoined other_call_id="xejfqve-lx7-069kpalmfwoab", mixer_name=nil, call_id="xejfqve-lx7-ttgy6wkk6p80", component_id=nil>
[2012-02-09 19:52:40] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-069kpalmfwoab
[2012-02-09 19:52:40] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" id="7ea6073f-ebbe-471e-9281-494da99f3432" to="[email protected]">
  <unjoined xmlns="urn:xmpp:rayo:1" call-id="xejfqve-lx7-ttgy6wkk6p80"/>
</presence>
[2012-02-09 19:52:40] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::Unjoined other_call_id="xejfqve-lx7-ttgy6wkk6p80", mixer_name=nil, call_id="xejfqve-lx7-069kpalmfwoab", component_id=nil> with source .
[2012-02-09 19:52:40] DEBUG Adhearsion::PunchblockPlugin::Initializer: Event received for call xejfqve-lx7-069kpalmfwoab: #<Punchblock::Event::Unjoined other_call_id="xejfqve-lx7-ttgy6wkk6p80", mixer_name=nil, call_id="xejfqve-lx7-069kpalmfwoab", component_id=nil>
[2012-02-09 19:52:40] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-069kpalmfwoab
[2012-02-09 19:52:40] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" id="9acbde40-1b9f-457b-a08e-3387e036ab77" to="[email protected]">
  <end xmlns="urn:xmpp:rayo:1">
    <hangup/>
    <header name="Max-Forwards" value="68"/>
    <header name="Record-Route" value="&lt;sip:67.231.8.195;lr=on;ftag=gK084ff247&gt;"/>
    <header name="Content-Length" value="0"/>
    <header name="To" value="&lt;sip:[email protected]&gt;;tag=1hmm2uxa248ei"/>
    <header name="CSeq" value="23289 BYE"/>
    <header name="Via" value="SIP/2.0/UDP 67.231.8.195;branch=z9hG4bKb97f.a0b474d5.0"/>
    <header name="Call-ID" value="[email protected]"/>
    <header name="From" value="&lt;sip:[email protected]&gt;;tag=gK084ff247"/>
  </end>
</presence>
[2012-02-09 19:52:40] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::End reason=:hangup, headers_hash={:max_forwards=>"68", :record_route=>"<sip:67.231.8.195;lr=on;ftag=gK084ff247>", :content_length=>"0", :to=>"<sip:[email protected]>;tag=1hmm2uxa248ei", :cseq=>"23289 BYE", :via=>"SIP/2.0/UDP 67.231.8.195;branch=z9hG4bKb97f.a0b474d5.0", :call_id=>"[email protected]", :from=>"<sip:[email protected]>;tag=gK084ff247"}, call_id="xejfqve-lx7-069kpalmfwoab", component_id=nil> with source .
[2012-02-09 19:52:40] DEBUG Adhearsion::PunchblockPlugin::Initializer: Event received for call xejfqve-lx7-069kpalmfwoab: #<Punchblock::Event::End reason=:hangup, headers_hash={:max_forwards=>"68", :record_route=>"<sip:67.231.8.195;lr=on;ftag=gK084ff247>", :content_length=>"0", :to=>"<sip:[email protected]>;tag=1hmm2uxa248ei", :cseq=>"23289 BYE", :via=>"SIP/2.0/UDP 67.231.8.195;branch=z9hG4bKb97f.a0b474d5.0", :call_id=>"[email protected]", :from=>"<sip:[email protected]>;tag=gK084ff247"}, call_id="xejfqve-lx7-069kpalmfwoab", component_id=nil>
[2012-02-09 19:52:43] INFO  Punchblock::Connection::XMPP: Receiving event for call ID xejfqve-lx7-ttgy6wkk6p80
[2012-02-09 19:52:43] DEBUG Punchblock::Connection::XMPP: <presence from="[email protected]" id="a8547c73-93b5-4278-9609-8fedbffcd4ac" to="[email protected]">
  <end xmlns="urn:xmpp:rayo:1">
    <hangup/>
    <header name="Max-Forwards" value="67"/>
    <header name="Record-Route" value="&lt;sip:216.115.69.144;lr&gt;"/>
    <header name="Content-Length" value="0"/>
    <header name="To" value="&lt;tel:+16508683271&gt;;tag=sbg657457z9f"/>
    <header name="CSeq" value="31347 BYE"/>
    <header name="Via" value="SIP/2.0/UDP 216.115.69.144;branch=z9hG4bKfb12.33ead2d0ba467ed3594425517503e00b.0"/>
    <header name="Call-ID" value="1i9rblip3e79u"/>
    <header name="From" value="&lt;sip:95260079*[email protected]&gt;;tag=SDiosce99-gK0cccc946"/>
  </end>
</presence>
[2012-02-09 19:52:43] DEBUG Punchblock::Client: Handling event #<Punchblock::Event::End reason=:hangup, headers_hash={:max_forwards=>"67", :record_route=>"<sip:216.115.69.144;lr>", :content_length=>"0", :to=>"<tel:+16508683271>;tag=sbg657457z9f", :cseq=>"31347 BYE", :via=>"SIP/2.0/UDP 216.115.69.144;branch=z9hG4bKfb12.33ead2d0ba467ed3594425517503e00b.0", :call_id=>"1i9rblip3e79u", :from=>"<sip:95260079*[email protected]>;tag=SDiosce99-gK0cccc946"}, call_id="xejfqve-lx7-ttgy6wkk6p80", component_id=nil> with source .
[2012-02-09 19:52:43] DEBUG Adhearsion::PunchblockPlugin::Initializer: Event received for call xejfqve-lx7-ttgy6wkk6p80: #<Punchblock::Event::End reason=:hangup, headers_hash={:max_forwards=>"67", :record_route=>"<sip:216.115.69.144;lr>", :content_length=>"0", :to=>"<tel:+16508683271>;tag=sbg657457z9f", :cseq=>"31347 BYE", :via=>"SIP/2.0/UDP 216.115.69.144;branch=z9hG4bKfb12.33ead2d0ba467ed3594425517503e00b.0", :call_id=>"1i9rblip3e79u", :from=>"<sip:95260079*[email protected]>;tag=SDiosce99-gK0cccc946"}, call_id="xejfqve-lx7-ttgy6wkk6p80", component_id=nil>
[2012-02-09 19:52:43] ERROR Adhearsion::Initializer: <NoMethodError> undefined method `join' for 772:Fixnum
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/foundation/object.rb:19:in `method_missing'
    /Users/jsgoecke/Dropbox/Development/ahn_liquid_call/lib/ahn_liquid_call.rb:12:in `run'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call_controller.rb:67:in `execute!'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call_controller.rb:41:in `block in exec'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call_controller.rb:40:in `catch'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call_controller.rb:40:in `exec'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call.rb:211:in `block (2 levels) in execute_controller'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/foundation/exception_handler.rb:4:in `catching_standard_errors'
    /Users/jsgoecke/.rvm/gems/ruby-1.9.3-p0/bundler/gems/adhearsion-4afe46bd3e19/lib/adhearsion/call.rb:209:in `block in execute_controller'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.