On any Web server, open a terminal and type:
$ sudo gem install adhearsion
$ ahn create myapp
$ cd myapp
Now let's make it do a few things:
$ cat > dialplan.rb
default {
play 'sounds/matrix'
execute 'swift', '"Press 1 to hear the date."'
case input(1)
when '1'
execute 'swift', '"Today is %s"' % Time.now.strftime("%A, %B %e")
else
play 'unavailable'
end
play 'goodbye'
}
And run the app:
Here's that dialplan.rb
Each app has a Cloudvox page with phone numbers, call history, and
the like.
To register an app, provide the URL (AGI or HTTP) and name it. We'll
assign extensions you can call from traditional phones and SIP.
That's it -- it's live. Call the number on your app's page, or try ours:
Each app can have one or more phone numbers, often in different area codes.
To browse available numbers and instantly activate one, click Numbers on your app's page.
Congratulations! You can add functionality, connect SIP phones, register more apps,
control conferences, invite collaborators — call your code.