Skip to content

Instantly share code, notes, and snippets.

View spacedsweden's full-sized avatar
🎯
Focusing

Christian Jensen spacedsweden

🎯
Focusing
View GitHub Profile
{
"event": "ice",
"callid": "[email protected]",
"timestamp": "2019-03-12T03:25:16Z",
"version": 1,
"userRate": {
"currencyId": "USD",
"amount": 0
},
"cli": "15552600684",
@spacedsweden
spacedsweden / SinchSMS.rb
Created February 29, 2016 20:36
Send sms with sinch in ruby
require "base64"
require "openssl"
require "time"
require "net/http"
require "uri"
require "json"
class SinchSms
def self.send(key, secret, message, to)
@spacedsweden
spacedsweden / allbackController.cs
Created October 28, 2015 02:05
Callbackcontroller
public class CallbackController : ApiController {
[HttpPost]
public async Task<SvamletModel> Post(CallbackEventModel model) {
var sinch = SinchFactory.CreateCallbackResponseFactory(Locale.EnUs);
var reader = sinch.CreateEventReader();
var evt = reader.ReadModel(model);
var builder = sinch.CreateIceSvamletBuilder();
switch (evt.Event)
{
case Event.IncomingCall: