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
New Customer X | |
i am new to cloudvox...i think i will use it for our business | |
however, i am lost in terms of where to start since i am new to voice related programming | |
i have been in IT for over 15 years...lots of web stuff with java, but not voice | |
Cloudvox Support | |
thanks for stopping by! yeah, most of the docs are on http://help.cloudvox.com/ | |
New Customer X | |
that's what i want to implement, but not sure where to 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
#!/usr/bin/ruby -w | |
# pretend to be Asterisk 1.4 (or 1.6 in 1.4 compat mode) connecting to | |
# a Fast AGI server, as if to process an incoming call. | |
# | |
# support: http://help.cloudvox.com/ | |
# version: 20100815 | |
# | |
# usage: | |
# ./asterisk_agi_test.rb some_nondefault_option=val option2=val2 |
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
require File.expand_path(File.dirname(__FILE__) + "/../../config/environment") | |
require 'adhearsion' | |
require 'adhearsion/initializer/asterisk' | |
require 'drb' | |
# http://help.cloudvox.com/faqs/getting-started/setup-for-ruby-adhearsion | |
desc "Make an outgoing phone call to number provided as 'call' (via Cloudvox)" | |
task :make_outgoing_call do | |
if ENV['call'] | |
# Outgoing context from Cloudvox Switchboard, under "Outgoing settings (AMI)." |
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
[{"name":"speak","phrase":"Thanks for calling My Company. Press 1 for Bob or 2 for Sally."}, | |
{"name":"getdigits","max":"1","url":"http://my.server/send-caller-somewhere.json"}] |
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
# play music on hold (MP3 or other) as a second conference "participant", | |
# then disconnect (stop the music) when a real second participant joins. | |
# | |
# NOTE: this is a reference example. It hasn't been tested and | |
# may not run exactly as-is. | |
class ConferenceDirectory | |
def initialize | |
@rooms = {} | |
end |
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/ruby | |
# connect to Asterisk AMI port, authenticate, and print all AMI event messages | |
# as they're received. | |
# more or for Asterisk hosting: http://help.cloudvox.com/ | |
# version: 2010-05-04 | |
require 'socket' | |
unless ARGV.length == 4 | |
puts 'usage: ruby ./ami_listener.rb hostname port username password' |
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
[{"name":"playback","filename":"thanks-for-calling"}, | |
{"name":"speak","phrase":"Record your update now."}, | |
{"name":"record","filename":"update-from-afar.wav","url":"http://your.server/send-as-email"}, | |
{"name":"speak","phrase":"Submitted. Goodbye."}] |
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
# cell phone simulator with Adhearsion & Cloudvox (http://bit.ly/cvruby) | |
default { | |
until caller_finally_given_up? | |
case (rand*5).to_i | |
when 0 then play 'intermittent-static' | |
when 1 then execute 'swift', '"All circuits are busy. Please try your call again later."' | |
when 2 then hangup | |
when 3 then execute 'echo' | |
when 4 | |
sleep until phone_location_changed? |
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/ruby | |
require 'rubygems' | |
require 'httparty' | |
# basic Cloudvox call history to CSV example | |
# see http://help.cloudvox.com/faqs/provisioning/call-history | |
class CallDetailRecords | |
include HTTParty | |
format :json |
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 -w | |
require 'net/http' | |
require 'net/https' | |
begin | |
require 'net/http/post/multipart' | |
rescue LoadError | |
puts "This requires multipart-post." | |
puts " $ sudo gem install multipart-post" |
NewerOlder