Skip to content

Instantly share code, notes, and snippets.

View altanai's full-sized avatar
🎯
Focusing

altanai altanai

🎯
Focusing
View GitHub Profile
function init(e){var n;return e&&!location.hash.replace("#","").length?(location.href=location.href.split("#")[0]+"#"+(100*Math.random()).toString().replace(".",""),location.reload()):n=e&&location.hash.replace("#","").length?location.href.replace(/\/|:|#|\?|\$|\^|%|\.|`|~|!|\+|@|\[|\||]|\|*. /g,"").split("\n").join("").split("\r").join(""):prompt("Enter session ",""),n}var t=" ",e=null,n="tara181989@gmail.com",usersList=document.getElementById("userslist"),numbersOfUsers=document.getElementById("numbersofusers"),usersContainer=document.getElementById("usersContainer"),localUserId=null,remoteUserId=null,card=document.getElementById("card"),containerDiv,main=document.querySelector("#main"),smaller=document.querySelector("#smaller"),webcallpeers=[],sessions={},whoIsTyping=document.querySelector("#who-is-typing"),repeatFlagShowButton=null,repeatFlagHideButton=null,repeatFlagRemoveButton=null,localVideo=null,miniVideo=null,remoteVideos=[],autoload=!0,sessionid=null,socketAddr="/",incomingAudio=!0,incomingVideo=!0
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-si
<Response>
<Speak loop="5" voice="WOMAN">
Welcome to Altanai's automatic response from answer URL. Have a nice day !
</Speak>
</Response>
@altanai
altanai / privacypolicy.txt
Created December 18, 2018 08:41
privacy policy
Sample file
<Response>
<Dial callerId="987987">
<Number>919871204072</Number>
</Dial>
</Response>
@altanai
altanai / Opensips.md
Created April 5, 2019 11:07
Installation of Opensips SIP server to proxy SIP messages

installation from repo

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 049AD65B
 echo "deb http://apt.opensips.org trusty 2.4-releases" >/etc/apt/sources.list.d/opensips.list

Manual Installation

Requirnments

@altanai
altanai / Freswitch.md
Created April 5, 2019 11:10
Freeswitch SIP server installation on ubuntu

Install from Ubuntu packages

wget -O - https://files.freeswitch.org/repo/ubuntu-1604/freeswitch-1.6/freeswitch_archive_g0.pub | apt-key add -
 
echo "deb http://files.freeswitch.org/repo/ubuntu-1604/freeswitch-1.6/ xenial main" > /etc/apt/sources.list.d/freeswitch.list
 
# you may want to populate /etc/freeswitch at this point.
# if /etc/freeswitch does not exist, the standard vanilla configuration is deployed
apt-get update && apt-get install -y freeswitch-meta-all
contract Owned {
address owner;
function Owned() public {
owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
import gi
import time
from gi.repository import GObject, Gst
gi.require_version('Gst', '1.0')
Gst.init(None)
pipeline = Gst.Pipeline()
rpicamsrc = Gst.ElementFactory.make("rpicamsrc", "rpicam")
h264parse = Gst.ElementFactory.make("h264parse", "h264")
flvmux = Gst.ElementFactory.make("flvmux", "flv")
@altanai
altanai / twilio_turn_toekn.js
Created February 24, 2021 19:46
Express web-server with API endpoint to get Twilio STUN/TURN with realtime token
require('dotenv').config();
console.log('Environment variable TWILIO_ACCOUNT_SID has the value: ', process.env.TWILIO_ACCOUNT_SID);
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = require('twilio')(accountSid, authToken);
const app = require('express')();
const bodyParser = require('body-parser');