Skip to content

Instantly share code, notes, and snippets.

View catlike's full-sized avatar

Robin Rodriguez catlike

  • AWS
  • Indianapolis, IN
View GitHub Profile
if(is_method("REGISTER")) {
$rd = "vox5.cloudvox.com";
t_relay();
}
[{"name":"Speak","phrase":"Please hold while we connect you."},
{"name":"Dial","destination":"8635296493", "Speak","phrase":"Testing 1 2 3 4."}]
[{"name":"Speak","phrase":"It works. Enter 4 digits!"},
{"name":"GetDigits","url":"http://some.com/url-to-hit-with-result.json","max":4},
{"name":"Playback","filename":"airport"},
{"name":"Playback","filename":"north-dakota"},
{"name":"Include","url":"http://other.com/some-other-component.json"}]
[{"name":"Speak","phrase":"It works. Enter 4 digits!"},
{"name":"Dial","destination","8635296493"},
{"name":"Playback","filename":"airport"},
{"name":"Playback","filename":"north-dakota"},
{"name":"Include","url":"http://other.com/some-other-component.json"}]
[{"name":"Speak","phrase":"It works. Enter 4 digits!"},
{"name":"Dial","destination","8635296493"},
{"name":"Playback","filename":"airport"},
{"name":"Playback","filename":"north-dakota"}]
def test_swapping_with_parallel_assignment
first_name = "Roy"
last_name = "Rob"
first_name, last_name = last_name, first_name
assert_equal "Rob", first_name
assert_equal "Roy", last_name
end
[{"name":"speak","phrase":"Thanks for calling!"},
{"name":"dial","destination":"8635296493"}]
[{"name":"speak","phrase":"Thanks for calling!"}]
@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
@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';