Created
May 20, 2010 18:38
-
-
Save sprite2005/407910 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| methods_for :rpc do | |
| # Simply create proxy methods for the high-level AMI methods | |
| [:send_action, :introduce, :originate, :call_into_context, :call_and_exec].each do |method_name| | |
| define_method(method_name) do |*args| | |
| if VoIP::Asterisk.manager_interface | |
| VoIP::Asterisk.manager_interface.send(method_name, *args) | |
| else | |
| ahn_log.ami_remote.error "AMI has not been enabled in startup.rb!" | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment