Skip to content

Instantly share code, notes, and snippets.

@pwim
Created March 23, 2012 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwim/2166693 to your computer and use it in GitHub Desktop.
Save pwim/2166693 to your computer and use it in GitHub Desktop.
Boundio Example
#!/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