Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0"?>
<ccxml xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml" version="1.0">
<meta name="author" content="John Dyer"/>
<meta name="maintainer" content="jdyer@voxeo.com"/>
<var name="conn_id"/>
<var name="dialog_id"/>
<var name="my_var"/>
<var name="caller_id"/>
<var name="called_id"/>
<eventprocessor>
<?xml version="1.0"?>
<ccxml xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml" version="1.0">
<meta name="author" content="John Dyer"/>
<meta name="maintainer" content="jdyer@voxeo.com"/>
<var name="conn_id"/>
<var name="dialog_id"/>
<var name="my_var"/>
<var name="caller_id"/>
<var name="called_id"/>
<eventprocessor>
Allison (American English Female)
Susan (American English Female)
Dave (American English Male)
Steven (American English Male)
Soledad (American Spanish Female)
Ximena (American Spanish Female)
Carlos (American Spanish Male)
Laila (Arabic Female)
Tarik (Arabic Male)
Diego (Argentine Spanish Male)
module Rayo
%w(json yaml optparse fileutils awesome_print fog rainbow logger spice ostruct erubis terminal-table/import).each{|lib| require lib}
Dir[File.dirname(__FILE__) + "/lib/*.rb"].each{|file| require file }
CONFIG = Rayo::Config.new(File.open("config.yml") { |file| YAML.load(file) })
include Aws
Spice.setup do |s|
module Rayo
module Aws
AWS = Fog::Compute.new({
:provider => 'AWS',
:aws_access_key_id => CONFIG.aws.access_key_id,
:aws_secret_access_key => CONFIG.aws.secret_access_key
})
def create_server(opts={})
hostname=opts[:hostname]
class Aws
require 'fog'
require 'logger'
require 'erubis'
require 'json'
def initialize(opts={})
opts={
#
# Cookbook Name:: cassandra
# Recipe:: default
#
# Copyright 2011, Voxeo Labs ©2011
#
# All rights reserved - Do Not Redistribute
#
%w(/var/log/cassandra /var/lib/cassandra /opt/chef/cassandra).each do |dir|
template "#{path}/conf/sipmethod.xml" do
source "sipmethod.xml.erb"
owner u
group g
variables(
:mrcp_ip => node["ec2"]["public_ipv4"], # Ticket: 1615349 node["prism"]["config"]["MRCPSRV"]["IP"],
:mrcp_port => node["prism"]["config"]["MRCPSRV"]["Port"],
:address => node["prism"]["sipmethod"]["address"],
:relay_address => node["prism"]["sipmethod"]["relay_address"],
:relay_port => node["prism"]["sipmethod"]["relay_port"],
describe "#download_file", fakefs: true do
it "should download correct file" do
FakeFS do
FakeWeb.register_uri(:get, "http://hudson.voxeolabs.com/hudson/job/Rayo/700/artifact/rayo-war/target/rayo_b700.war", :body => "foo", :status=>["200","OK"])
Rayo.download_file(:resource=>"http://hudson.voxeolabs.com/hudson/job/Rayo/700/artifact/rayo-war/target/rayo_b700.war",:target=>'/tmp/rayo.war')
end
File.exists?('/tmp/rayo.war').should be_true
File.read('/tmp/rayo.war').should == 'foo'
end
def self.jmx(opts={})
%w(net/http nokogiri).each{|lib| require lib}
opts={
:port=>47520,
:ip=>'localhost',
:bean=>'com.micromethod.sipmethod:name=sip,type=server.service',
:item=>'ActiveSession'
}.merge!(opts)