Skip to content

Instantly share code, notes, and snippets.

View radralph's full-sized avatar
😮

Ralph Sutacio radralph

😮
View GitHub Profile
call $caller, {:callerID => 'sip:21581064@sip.tropo.net'}
say "Welcome to our sample A S R"
result = ask "please type in your 8 digit code", {
:choices => "[8 DIGITS]",
:mode => "dtmf",
:timeout => 10.0,
:attempts => 2,
:onBadChoice => lambda { |event|
say "Please try again"
},
@radralph
radralph / demo.php
Last active March 15, 2016 03:10
sample code for php
<?php
call(array("9175744034"), array(
"timeout" => 120,
"callerID" => 'sip:21583390@sip.tropo.net',
)
);
say("Sample call using phone number without plus sign. Cleaned.");
hangup();
?>
var request = new XMLHttpRequest();
request.open('GET', '/my/url', true);
request.send();
say("hello hello world");
@radralph
radralph / sample_delay.rb
Created April 17, 2015 03:14
sample delay
sleep(2)
say "Hi This is a sample say method"
hangup
say "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."
#call $caller, {:callerID => 'sip:21581064@sip.tropo.net'}
#wait(3000)
call $caller, { :callerID => 'sip:21583822@sip.tropo.net'}
say "Hello, this is a test from globe. thank you"
hangup
@radralph
radralph / Binary.md
Last active March 30, 2017 03:22
Binary SMS documentation

Binary SMS

Binary Short Messaging interface allows an application to send any generic binary object attachments to the network using SMS.

Use POST method on this URI:

https://devapi.globelabs.com.ph/smsmessaging/v1/outbound/{senderAddress}/requests?access_token={access_token}

Parameters

hangup
@radralph
radralph / say.rb
Last active October 14, 2016 04:22
TTS
say "Bacon ipsum dolor amet meatloaf landjaeger flank kielbasa tongue kevin shoulder pig salami beef ribs spare ribs."