Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- require 'rubygems'
- require 'adhearsion'
- require 'adhearsion/voip/asterisk/manager_interface'
- require 'timeout'
- include Adhearsion::VoIP::Asterisk::Manager
- status = Timeout::timeout(60) do
- asterisk = ManagerInterface::connect(
- :host => "localhost",
- :username => "localconnect",
- :password => "ranchbone",
- :events => true)
- response = asterisk.send_action_synchronously("Originate",
- "Channel" => "SIP/sip.tollfreegateway.com/#{ARGV[0]}",
- "Context" => "demo", "Exten" => "6000", "Priority" => "1")
- end
Add Comment
Please, Sign In to add comment