Skip to content

Instantly share code, notes, and snippets.

@mwchambers
Created October 26, 2011 12:04
Show Gist options
  • Save mwchambers/1316150 to your computer and use it in GitHub Desktop.
Save mwchambers/1316150 to your computer and use it in GitHub Desktop.
Asterisk Manager Interface - Originate using adhearsion
require 'adhearsion'
require 'adhearsion/voip/asterisk/manager_interface'
include Adhearsion::VoIP::Asterisk::Manager
# You need to enable originate in manager.conf for the user.
# see Privilege column of 'manager show commands'
asterisk = ManagerInterface.connect :host => "127.0.0.1", :username => "user", :password => "pass"
response = asterisk.send_action "Originate", "Channel" => "SIP/100",
"Exten" => "101", "Priority" => "1", "Timeout" => "60000", "Context" => "from-internal", "CallerID" => "100"
p response.headers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment