login | register
Wed 03 of Dec, 2008 [22:50 UTC]

voip-info.org

History

Adhearsion

Created by: admin,Last modification on Mon 11 of Aug, 2008 [18:27 UTC]
Project Website: www.adhearsion.com

From website:
Adhearsion is an open-source, unconventional framework that ties technologies together neatly. Of these, Adhearsion is most noted as being “adhesion you can hear” for integrating VoIP by building atop the fantastic Asterisk PBX software by Digium. Adhearsion was designed to “understand” the many elements of the VoIP picture and both improve them individually and tie them together in one comprehensive solution.


Adhearsion is a framework for building Ruby based VOIP applications on Asterisk. Adhearsion uses the "Ruby on Rails" database object relational mapper that maps Ruby objects directly to database tables. Adhearsion also maps Ruby objects to Asterisk internal variables giving your application almost total control over call processing.

Code Example


# This is an example extensions.rb file which
# would handle how calls are processed by
# Asterisk. This is all completely valid Ruby
internal {
  case extension
    when 100...200
      callee = User.find_by_extension extension
      unless callee.busy? then dial callee
      else
        voicemail extension

    when 111 then join 111

    when 888 
      play weather_report('Dallas, Texas')

    when 999
      play %w(a-connect-charge-of 22 
         cents-per-minute will-apply)
      sleep 2.seconds
      play 'just-kidding-not-upset'
      check_voicemail
  end
}




See Also



Comments