Skip to content

Instantly share code, notes, and snippets.

View catlike's full-sized avatar

Robin Rodriguez catlike

  • AWS
  • Indianapolis, IN
View GitHub Profile
require 'rubygems'
require 'sinatra'
require 'lib/sms'
require 'thread'
queue = Queue.new
consumer = Thread.new do
while (true) do
message = queue.pop
[{"name":"speak","phrase":"Thanks for calling!"},
{"name":"playback","filename":"monkeys"}]
[{"name":"Playback","filename":"vm-theperson"}]
[
{"name":"Dial","destination":"8635296493","timeout":"20","url":"https://gist.github.com/raw/670972/6acda495379b193a3cbe2ea791287974331f1696/gistfile1.json"}
]
[
{"name":"Playback","filename":"vm-theperson"},
{"name":"Playback","filename":"vm-isunavail"},
{"name":"Playback","filename":"vm-leavemsg"},
{"name":"Playback","filename":"beep"},
{"name":"Record","filename":"sounds/voicemail_test.wav","maxduration":"300"}
]
[
{"name":"Dial","destination":"8635296493","timeout":"20","url":"https://gist.github.com/raw/670449/de9a11ec4b0c7da9deef8ae78f27fcc99ea9aeda/gistfile2.json",}
]
[{"name":"Speak","phrase":"Callie^Please leave a message at the tone"},{"name":"Record","filename":"sounds/testing.wav","maxduration":"60","url":"http://173.108.167.239/call","method":"post"},{"name":"OnHangup","url":"http://173.108.167.239/call","method":"post"}]
[{"name":"speak","phrase":"Thanks for calling!"},
{"name":"Sleep","duration":"5"},
{"name":"GetDigits","max":"5","timeout":"2"},
{"name":"DTMF","digits":"12345"},
{"name":"dial","destination":"8476766615"}]
@catlike
catlike / cloudvox_create_sip_account.php
Created November 6, 2010 01:28
PHP example of creating a SIP account on Cloudvox
<?php
//Name of Cloudvox Account
$CVAccountName = 'foo';
//URL to post to create SIP account
$url ="https://$CVAccountName.cloudvox.com/phones.json";
//Extension to create
$extension = '2720';
@catlike
catlike / cv_edit_sip_account.rb
Created November 4, 2010 21:56
Cloudvox: Sample usage to list/add/delete SIP accounts
require 'yaml'
require 'rest_client'
require 'json'
class EditSIPAccount
def initialize
@cv_config = YAML.load_file 'cloudvox_account.yml'
#cloudvox_account.yml format