Adhearsion

Project Website: adhearsion.com
Documentation: adhearsion.com/docs
API: adhearsion.com/api
Community: adhearsion.com/community
Latest Release: 2.1.0 released August 7th, 2012 (this wiki page last updated August 24th, 2012)

adhearsion.jpeg

Adhearsion is a full-featured framework for the development of applications which interact with or control voice communications. It facilitates the creation of complex applications with ease, providing a simple API.

Adhearsion is for voice application developers, Ruby developers, web developers, voice service providers, telephony networks. Everyone can benefit from Adhearsion as part of their application stack.

Code Example: IVR


# This is an example call controller file which
# would handle how calls are processed by
# Asterisk.
class MyController < Adhearsion::CallController
  def run
    answer
    resp = ask "How many woodchucks?", :limit => 1
    say "You said #{resp}. That's obviously wrong!"
  end
end


Code Example: Joining calls to an outbound call


# It is possible to set a timeout on attempting to dial out,
# and to check the status of the dial after the fact:
class SuperSecretProjectCall < Adhearsion::CallController
  def run
    answer
    status = dial 'sip:foo@bar.com', :for => 30.seconds
    case status.result
    when :answer
      say "We hope you had a nice chat!"
    when :error, :timeout
      say "Unfortunately we couldn't get hold of Bob."
    when :no_answer
      say "It looks like Bob didn't want to talk to you."
    end
  end
end


More examples can be found in the Adhearsion docs.


Adhearsion News



    See Also

    Project Website: adhearsion.com
    Documentation: adhearsion.com/docs
    API: adhearsion.com/api
    Community: adhearsion.com/community
    Latest Release: 2.1.0 released August 7th, 2012 (this wiki page last updated August 24th, 2012)

    adhearsion.jpeg

    Adhearsion is a full-featured framework for the development of applications which interact with or control voice communications. It facilitates the creation of complex applications with ease, providing a simple API.

    Adhearsion is for voice application developers, Ruby developers, web developers, voice service providers, telephony networks. Everyone can benefit from Adhearsion as part of their application stack.

    Code Example: IVR

    
    # This is an example call controller file which
    # would handle how calls are processed by
    # Asterisk.
    class MyController < Adhearsion::CallController
      def run
        answer
        resp = ask "How many woodchucks?", :limit => 1
        say "You said #{resp}. That's obviously wrong!"
      end
    end
    


    Code Example: Joining calls to an outbound call

    
    # It is possible to set a timeout on attempting to dial out,
    # and to check the status of the dial after the fact:
    class SuperSecretProjectCall < Adhearsion::CallController
      def run
        answer
        status = dial 'sip:foo@bar.com', :for => 30.seconds
        case status.result
        when :answer
          say "We hope you had a nice chat!"
        when :error, :timeout
          say "Unfortunately we couldn't get hold of Bob."
        when :no_answer
          say "It looks like Bob didn't want to talk to you."
        end
      end
    end
    


    More examples can be found in the Adhearsion docs.


    Adhearsion News



      See Also

      Created by: admin, Last modification: Thu 23 of Aug, 2012 (19:59 UTC) by sfgeorge
      Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+