Skip to content

Instantly share code, notes, and snippets.

@mheadd
Created February 16, 2012 02:10
Show Gist options
  • Save mheadd/1840982 to your computer and use it in GitHub Desktop.
Save mheadd/1840982 to your computer and use it in GitHub Desktop.
<?php
if($currentCall->initialText) {
_log("*** User sent: " . $currentCall->initialText . " ***");
$result = ask("", array("choices" => "[ANY]"));
}
else {
call($numberToCall, array("timeout" => 60, "channel" => "TEXT", "network" => "SMS"));
$result = ask("Respond with a digit, any digit.", array("choices" => "[1 DIGIT]"));
}
say("You entered, " . $result->value);
?>
@mheadd
Copy link
Author

mheadd commented Feb 16, 2012

Initial outbound with call to Tropo Session API:

http://api.tropo.com/1.0/sessions?action=create&token=[your-token]&numberToCall=[your-number]

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