AGI in the Controller with Native Routing
Consider the following in your asterisk dialplan:
exten => s, n, AGI(agi://localhost/shopping_cart/list)
Using rails routes, telegraph fakes rails into believing its receiving an HTTP request with a “Voice” MIME Type and allows you render voice commands like a normal view (like RJS). You can even share session data between web and voice sessions.
voice.say "hello-world"
voice.link_to_dtmf 'bank-index-menu' do
link 1, :action=>'new'
link 2, :action=>'list'
link :default, :action=>'index'
end
AMI as a Model
Telegraph features a robust AMI interface. It hides the complexity of sending, parsing and proxy AMI methods behind a model-like object that fits easily in your rails code.
channel = CallManager.find(:status, :channel => my_channel)
CallManager.create(:call, :channel => “SIP/someone”, :context => “outgoing”)
AMI Events built-in
Asterisk AMI events are easily processed within rails allowing database updates or other AMI commands to be sent based on these events.
def peer_status
puts “The status of #{params[:peer]} changed to #{params[:peer_status]}”
end
Easy Deployment
Telegraph applications are easily deployed, logged, deamonized and so on in a robust and scalable manner. Telegraph loads rails instances that are separate from your web application and handles all AMI commands through a DRb process.
Real Stability
Telegraph was extracted from Idapted’s online oral english and distributed call center system. This is a complex voice and web system that connects a distributed network of English Trainers in the U.S. to English students in Asia. The system is in daily use. It also forks and stabilizes code from the RAGI and Ruby AMI projects.