Skip to content

Instantly share code, notes, and snippets.

@mheadd
Created January 17, 2011 22:06
Show Gist options
  • Select an option

  • Save mheadd/783592 to your computer and use it in GitHub Desktop.

Select an option

Save mheadd/783592 to your computer and use it in GitHub Desktop.
Simple outbound call
<?php
// Include the Tropo WebAPI class.
require('classes/tropo.class.php');
// Create a new Session object and get the value of the number_to_dial parameter.
$session = new Session();
$number_to_dial = $session->getParameters("number_to_dial");
// Create a new Tropo object, dial and say the message.
$tropo = new Tropo();
$tropo->call("tel:+1".$number_to_dial);
$tropo->say("This is a test call.");
// Render the JSON for Tropo to consume.
$tropo->renderJSON();
@mheadd

mheadd commented Jan 17, 2011

Copy link
Copy Markdown
Author

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