This file contains 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
import zillabyte | |
from twilio.rest import TwilioRestClient | |
def send_text(controller, tup): | |
# Register twilio client | |
twilio_client = TwilioRestClient(tup["twilio_sid"], tup["twilio_auth"]) | |
try: | |
# Send message to recipient and wait 1 second (twilio SMS rate limit) |
This file contains 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
import zillabyte | |
twilio_sid = "SID_HERE" | |
twilio_auth = "AUTH_HERE" | |
class TwilioEach: | |
def prepare(self, controller): | |
# Dictionary of phone numbers subscribed to cities (just for show with small sample, please use a | |
# REAL source when using a significant number of phone numbers) |
This file contains 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
console.log('Loading event'); | |
// Twilio Credentials | |
var accountSid = ''; | |
var authToken = ''; | |
var fromNumber = ''; | |
var https = require('https'); | |
var queryString = require('querystring'); |
This file contains 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
package main | |
import ( | |
"encoding/xml" | |
"net/http" | |
"net/url" | |
"fmt" | |
"strings" | |
"io/ioutil" | |
"encoding/json" |
This file contains 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 | |
// From http://ertw.com/blog/2013/11/05/using-an-ip-phone-with-twilio/ | |
// Connect an incoming call to your SIP phone through Twilio | |
$called = preg_replace('/sip:1?(.*?)@.*/', '{$1}', $_POST['Called']); | |
header("content-type: text/xml"); | |
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; | |
?> | |
<Response> |
This file contains 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 | |
// Set the numbers to call | |
$numbers = array("<number to call 1>", "<number to call 2>", "<number to call n>"); | |
$number_index = isset($_REQUEST['number_index']) ? $_REQUEST['number_index'] : "0"; | |
$DialCallStatus = isset($_REQUEST['DialCallStatus']) ? $_REQUEST['DialCallStatus'] : ""; | |
header("content-type: text/xml"); | |
// Check the status of the call and |
NewerOlder