Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marks/notify_webservice
Tropo Session API (IM/SMS/Voice) and Postage App (Email) Helpers
https://github.com/marks/notify_webservice
Last synced: 17 days ago
JSON representation
Tropo Session API (IM/SMS/Voice) and Postage App (Email) Helpers
- Host: GitHub
- URL: https://github.com/marks/notify_webservice
- Owner: marks
- Created: 2010-03-26T19:56:04.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2010-03-26T20:31:26.000Z (over 14 years ago)
- Last Synced: 2024-10-11T09:34:56.804Z (about 1 month ago)
- Language: Ruby
- Homepage: http://marksilver.net
- Size: 102 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
Notify Web Service to Leverage Tropo/PostageApp Communication Channels
======================================================================TODO
----
README :)For now, execute `ruby app.rb` and go to `http://localhost:4567/` to see instructions and example usage. You can also look inside the `app.rb` file for the haml markup for that file.
Sample Tropo Application Use
----------------------------
Use the code below in a Tropo Hosted Scripting application to let the user text a number of seconds to wait before dispatching a call to them. This could be used to request a fake call via text so you can safely excuse yourself from a date, etc. The call is dispatched using a HTTP GET to the `notify_webservice`Demo: SMS text message "15" to 240-242-7964 to get a phone call to your cell phone in 15 seconds. The call will come from an "Unknown" or no caller-id phone number.
#SMS: time in seconds to wait
require "open-uri"
answer
if $currentCall.callerID.length == 11
sleep_time = $currentCall.initialText.to_i
say "okay, we'll call you in about #{sleep_time} seconds"
sleep sleep_time
response = open(URI.encode("http://notifyr.heroku.com/#{$currentCall.callerID}/voice/#{sleep_time} seconds have elapsed")).read
if response == "false" then say "Sorry, there was a problem. Try again." end
else
say "Sorry, this only works if you SMS 240-242-7964"
end
hangup