Created
October 26, 2011 12:04
-
-
Save mwchambers/1316150 to your computer and use it in GitHub Desktop.
Asterisk Manager Interface - Originate using adhearsion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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