This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<vxml xmlns="http://www.w3.org/2001/vxml" version="2.1"> | |
<!-- | |
This work is licensed under a Creative Commons License | |
To review this license, go to http://creativecommons.org/licenses/by-sa/3.0/us/ | |
--> | |
<meta name="maintainer" content="[email protected]" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('my/local/directory/php-lib/init.php'); | |
$text = "Hello world!"; | |
$p = <p>{$text}</p>; | |
echo <html> | |
<head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Contents of vxml.php | |
*/ | |
abstract class :xhp:vxml-element extends :x:primitive { | |
protected | |
$tagName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('my/local/directory/php-lib/init.php'); | |
function setMessageBlock($id, $logtext, $prompttext) { | |
$log = <log>*** {$logtext} ***</log>; | |
$prompt = <prompt>{$prompttext}</prompt>; | |
return <block name={$id}>{$log}{$prompt}</block>; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Render a simple dialog asking for a caller's phone number. | |
*/ | |
// Include CloudVox JSON helper classes. | |
include('cloudvox-json-http-classes.php'); | |
$speak = new Speak("Welcome to my demo application."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
Options +FollowSymlinks | |
Options +Indexes | |
RewriteEngine on | |
RewriteCond %{SCRIPT_FILENAME} !-f | |
RewriteCond %{SCRIPT_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?/$1 | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* Copyright 2009 Mark J. Headd | |
* http://www.voiceingov.org | |
* | |
* A set of PHP classes for working with the Open311 API (http://open311.org/) | |
* | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"tropo": [ | |
{ | |
"say": { | |
"value": "Hello. Welcome to my demo application." | |
} | |
}, | |
{ | |
"ask": { | |
"attempts": 3, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Include Limonade PHP Framework (http://www.limonade-php.net/). | |
require('path/to/limonade/lib/limonade.php'); | |
// Include Tropo classes (http://github.com/mheadd/TropoPHP). | |
require('path/to/TropoClasses.php'); | |
dispatch_post('/start', 'tropo_start'); | |
function tropo_start() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This is what the ask method in the main Tropo class will look like. | |
... | |
public function ask($prompt, Array $options) { | |
$say = new say($prompt); | |
$choices = isset($options["choices"]) ? new choices($options["choices"]) : null; | |
$ask = new ask($options["attempts"], $options["bargein"], $choices, $options["minConfidence"], $options["name"], $options["required"], | |
$say, $options["timeout"]); |