Skip to content

Instantly share code, notes, and snippets.

@cloudvoxcode
cloudvoxcode / adhearsion-asterisk-music-on-hold.rb
Created June 15, 2010 20:38
Asterisk music on hold in any conference room
# 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
[{"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"}]
@cloudvoxcode
cloudvoxcode / adhearsion_outgoing_call.rake
Created June 23, 2010 05:40
place & receive a phone call with Ruby (Adhearsion)
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)."
#!/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
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