Created
March 23, 2012 04:12
-
-
Save pwim/2166693 to your computer and use it in GitHub Desktop.
Boundio Example
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
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
require "boundio" | |
require "csv" | |
include Boundio | |
greeting = AudioFile.create(:convtext => "こんにちは、") | |
message = AudioFile.create(:convtext => "さん。") | |
CSV.parse($stdin) do |row| | |
name = AudioFile.create(:convtext => row[1]) | |
call = Call.create(:tel_to => row[0], :cast => greeting + name + message) | |
while call.status.processing? | |
puts call.status | |
sleep 1 | |
end | |
puts call.status | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment