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
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <title>jQuery / Phono Sample</title> | |
| <style type="text/css"> | |
| </style> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> | |
| <script type="text/javascript" src="js/jquery.phono.js"></script> |
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
| // If the channel selected is TEXT, send a message. | |
| if(channel == 'TEXT') | |
| { | |
| log("*** Sending text message. ***"); | |
| message("Hello, " + customerName + ", " + msg, { to: sendToNumber, network: "SMS"} ); | |
| } | |
| // If the channel selected is Voice, make a call. | |
| else | |
| { | |
| log("*** Making outbound phone call. ***"); |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Web; | |
| using System.Xml; | |
| using TropoCSharp.Structs; | |
| using TropoCSharp.Tropo; | |
| namespace OutboundTest | |
| { | |
| class Program |
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 | |
| wait(3000); | |
| answer(); | |
| say('Hello, sending your message now.'); | |
| message("Hi, this is a test message.", array("to" => "6512345432", "network" => "SMS")); | |
| say('good bye'); | |
| hangup(); | |
| ?> |
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 | |
| // The URL where the test-auth.php script resides. | |
| define("POST_DATA_TO_URL", "http://someurl/my-script.php"); | |
| // Function to send value to my-script.php script via cURL with digest authentication. | |
| function submitValue($myValue) { | |
| $ch = curl_init(POST_DATA_TO_URL); | |
| curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); | |
| curl_setopt($ch, CURLOPT_USERPWD, "admin:mypass"); |
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 | |
| define("COUCH_DB_HOST", ""); | |
| define("COUCH_DB_PORT", ""); | |
| define("COUCH_DB_NAME", ""); | |
| function saveData($question, $to, $answer) { | |
| $doc = json_encode(array("question" => $question, "to" => $to, "answer" => $answer, )); | |
| $url = COUCH_DB_HOST.":".COUCH_DB_PORT."/".COUCH_DB_NAME; |
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
| /** | |
| * Simple outbound message launcher in Node.js | |
| * | |
| * You will need to have a Tropo scripting aplication set up | |
| * to use this. See sample code below: | |
| * | |
| * message(msg, { to:number, network:"SMS" }); | |
| * | |
| * Save this file in your Tropo account as message.js | |
| * |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <title>Bayeux / Comet Test for Tropo</title> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> | |
| <script type="text/javascript" src="http://path/to/your/bayeaux/server/tropo.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { |
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
| var sys = require('sys'); | |
| var http = require('http'); | |
| var EventEmitter = require('events').EventEmitter; | |
| TropoSession = function() { | |
| this.responseBody; | |
| }; | |
| TropoSession.prototype = new EventEmitter; |
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 | |
| // Get the zip code from the caller. | |
| $zip = ask("Say your 5 digit zip code", array("choices" => "[5 DIGITS]")); | |
| // Get the address, using a dynamically generated grammar for the user zip code. | |
| $address = ask("What is your street address, beginning with your street number?", | |
| array("choices" => "http://path/to/web/host/streets.php?zip={$zip->value}")); | |
| // Write the address to the logger. |