Skip to content

Instantly share code, notes, and snippets.

@mheadd
Created November 3, 2011 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mheadd/1337311 to your computer and use it in GitHub Desktop.
Save mheadd/1337311 to your computer and use it in GitHub Desktop.
A simple Phono example that uses the Phono callme plugin
<html>
<head>
<!-- Uses the Phono callme plugin: http://s.phono.com/releases/0.2/samples/callme/index.htm -->
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/ui-darkness/jquery-ui.css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="http://s.phono.com/releases/0.2/jquery.phono.js"></script>
<script type="text/javascript" src="http://s.phono.com/addons/callme/79a53b7/jquery.callme.js"></script>
</head>
<body>
<script type="text/javascript">
$("body").append(
$("<div/>")
.css("width","210px")
.callme({
apiKey: "your-api-key",
numberToDial: "2154442222",
buttonTextReady: "Call Chris",
slideOpen:true
})
)
</script>
</body>
</html>
@mheadd
Copy link
Author

mheadd commented Nov 3, 2011

More info an examples at:
http://phono.com/docs

@mheadd
Copy link
Author

mheadd commented Nov 3, 2011

You can also replace the value of numberToDial with the an application ID for a Tropo application, this will remove the default "powered by" message on outgoing phono calls.

Simply follow these steps:

  • Create a new Tropo Scripting application
  • Create a new hosted script for your Tropo application (e.g., in JavaScript):
transfer('14075555555', {callerID: '14078888888'});
  • When created, make note of the Phono App Address in your application settings (e.g., a string beginning with 'app:')
  • Replace the value of numberToDial in the sample above with the full string from Phono App Address setting in your Tropo app.
  • This tells the Phono instance in your browser to connect to the Tropo script you just created, the Tropo script then transfers the call to the 14075555555 number in the script and passes the 14078888888 as the callerID on the outbound call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment