Created
August 4, 2009 13:53
-
-
Save wwalker/161235 to your computer and use it in GitHub Desktop.
ahn_quick_start
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
1. in extensions.conf create a context that dumps into agi: | |
[my_ahn_app] | |
exten => s,1,AGI(agi://127.0.0.1) | |
2. ahn create my_proj | |
cd my_proj | |
ahn create my_component | |
vim components/my_component/my_component.rb | |
methods_for :dialplan do | |
def my_app | |
MyApp.new.start | |
end | |
end | |
class MyApp | |
def init(dialplan) | |
@dialplan = dialplan | |
end | |
def start | |
# do AGI stuff here | |
x = input 2, :play => 'my_prompt_sound' | |
dial('SIP/15555555555/outbound-peer') | |
end | |
end | |
3. ahn - # starts up the daemon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment