Skip to content

Instantly share code, notes, and snippets.

055200070
const http = require("https")
const querystring = require('querystring');
var tokens = []
var jsonfile = require('jsonfile')
function getin(payload) {
var data ={}
if (payload) {
if (! payload.page_no) {
jsonfile.writeFile("out.json", tokens)
0408fe714e7631efcf55fb046080cd2fc692eb36f0e18c851b94e2d9bbeca63895c9c9893e24649ef5f5f441a326757938a70d43537a5cdafd8ceb82336744aaeb;jmatty1983
<script src="https://phone.sipgate.com/static/js/webphone.js"></script>
<div id='sipgate-webphone-container' style="height: 550px; width: 400px;"></div>
<script>
var webphone = new SipgateWebphone();
webphone.init({
container: document.getElementById('sipgate-webphone-container'),
clientId: 'CLIENT_ID'
});
</script>
@BlackMac
BlackMac / README.md
Last active April 26, 2017 10:57
Verify a phone number using the SMS sending capabilities of the sipgate REST API.

SMS phone number verification

Use the sipgate REST-API to verify if a mobile phone number is valid.

To try this just type

mkdir smsauth
cd smsauth
curl -O "https://gist.githubusercontent.com/BlackMac/0d16c4564e785cdad9b9624e6dac4f2c/raw/verify_number.php"
@BlackMac
BlackMac / sipgate.html
Last active February 22, 2016 21:53 — forked from anonymous/sipgate.html
Inject sipgate.js into a website
<script charset="utf-8" src="https://sipgatesocket.herokuapp.com/static/sipgate.min.js"></script>
<script charset="utf-8">
new Sipgate.io.live("{{uuid}}");
</script>
@BlackMac
BlackMac / sipgatesocket.html
Last active December 3, 2015 19:29
fastest way to include sipgate in Web projects
<script charset="utf-8" src="https://cdn.socket.io/socket.io-1.3.7.js" />
<script charset="utf-8" src="https://sipgatesocket.herokuapp.com/sipgateio.min.js" />
<script charset="utf-8">
var test = new SipgateIO("ENTER UUID HERE", {
all: function(data) {
console.log(data);
}
});
</script>
@BlackMac
BlackMac / iotest.css
Last active August 29, 2015 14:21
CSS for the sipgate.io meteor tutorial
/* CSS declarations go here */
body {
font-family: "Helvetica Neue";
font-weight: 200;
padding:0;
margin:0;
}
h1 {
margin:0;
@BlackMac
BlackMac / sipgateio_node.js
Last active August 29, 2015 14:19
a sipgate.io example in node.js
if (call.direction === "in") {
switch (call.from){
case numbers.grandma:
call.play("http://sipgate.io/hi_grandma.wav");
break;
case numbers.boss:
call.reject();
break;
}
}
@BlackMac
BlackMac / post_parse.js
Created March 27, 2015 11:50
very basic post parser
parsePost = function(input) {
var result = {};
var parts = input.split("&");
parts.forEach(function(part) {
var divided = part.split("=");
result[divided[0]] = divided[1];
});
return result;
};