Skip to content

Instantly share code, notes, and snippets.

View chrismatthieu's full-sized avatar
🚀
Hacking the metaverse!

Chris Matthieu chrismatthieu

🚀
Hacking the metaverse!
View GitHub Profile
answer();
wait(3000); // to avoid stupid flash audio clipping
say("Please wait while Fono places your call");
mode = currentCall.getHeader("x-sbc-transfermode");
numbers = currentCall.getHeader("x-sbc-numbertodial").split(",");
if(mode == "one") {
for(number in numbers) {
result = transfer(numbers[number], {timeout:10});
@chrismatthieu
chrismatthieu / Simple Phono call and answer app
Created October 28, 2010 16:51
Simple Phono call and answer app
<html>
<head>
<script src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script src="http://s.phono.com/releases/0.1/jquery.phono.js"></script>
</head>
<body>
<input id="call" type="button" disabled="true" value="Loading..." />
<div id="pickup" style="display:none"><input id="pickup" type="button" value="pickup" /></div>
<div id="hangup" style="display:none"><input id="hangup" type="button" value="hangup" /></div>
<html>
<head>
<title>Phono Demo</title>
<link type="text/css" rel="stylesheet" href="im.css" />
<script src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script src="http://s.phono.com/releases/0.1/jquery.phono.js"></script>
<script src="im.js"></script>
</head>
<body>
<div id="im_box">
<html>
<head>
<script src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script src="http://s.phono.com/releases/0.1/jquery.phono.js"></script>
</head>
<body>
<input id="call" type="button" disabled="true" value="Loading..." />
<div id="pickup2" style="display:none"><input id="pickup" type="button" value="pickup" /></div>
<div id="hangupdiv" style="display:none"><input id="hangup" type="button" value="hangup" /></div>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script src="http://s.phono.com/releases/0.1/jquery.phono.js"></script>
</head>
<body>
<input id="call" type="button" disabled="true" value="Loading..." />
<div id="pickup" style="display:none"><input id="pickup" type="button" value="pickup" /></div>
<div id="hangup" style="display:none"><input id="hangup" type="button" value="hangup" /></div>
call 'tel:+14805551212'
starttime = Time.new
record ".", {
:beep => false,
:timeout => 10,
:silenceTimeout => 1,
:maxTime => 10
}
#Method to create timeStamp as our conferenceID
def get_conference_id()
timeVar = Time.new
returnValue = timeVar.strftime("%Y%H%M%S")
return returnValue
end
conferenceOptions={
:mute=>false,
:playTones=>true,
#----------
# Group SMS Example Written in Ruby and Runs on Tropo Scripting Platform
#----------
answer
# Keyword "time" returns the current time to only the sender
if $currentCall.initialText.downcase[0..3] == "time"
message("Current Tropo time is " + Time.now.to_s + "UTC", {
:to => $currentCall.callerID,
var sys = require('sys');
var http = require('http');
var EventEmitter = require('events').EventEmitter;
TropoSession = function() {
this.responseBody;
};
<zimlet name="com_zimbra_phono" version="1.0" description="Phono">
<zimletPanelItem label="Phono">
<toolTipText>Right-click to place a call</toolTipText>
<contextMenu>
<menuItem label="Visit Phono" id="WWW.PHONO.COM" icon="PHONO-panelIcon">
<canvas type="window" title="Phono" width="640" height="480" />
<actionUrl target="http://s.phono.com/releases/0.2/samples/kitchen-sink/index.htm">
<param name="referrer">www.zimbra.com</param>
</actionUrl>
</menuItem>