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"
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> |
<script charset="utf-8" src="https://sipgatesocket.herokuapp.com/static/sipgate.min.js"></script> | |
<script charset="utf-8"> | |
new Sipgate.io.live("{{uuid}}"); | |
</script> |
<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> |
/* CSS declarations go here */ | |
body { | |
font-family: "Helvetica Neue"; | |
font-weight: 200; | |
padding:0; | |
margin:0; | |
} | |
h1 { | |
margin:0; |
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; | |
} | |
} |
parsePost = function(input) { | |
var result = {}; | |
var parts = input.split("&"); | |
parts.forEach(function(part) { | |
var divided = part.split("="); | |
result[divided[0]] = divided[1]; | |
}); | |
return result; | |
}; |