Skip to content

Instantly share code, notes, and snippets.

View altanai's full-sized avatar
🎯
Focusing

altanai altanai

🎯
Focusing
View GitHub Profile
@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');
@altanai
altanai / RTPEngine_installattion.md
Created May 22, 2020 07:23
RTPEngine installattion on Ubuntu 18 on EC2

update the newly created instance

sudo apt update -y

Install rtpengine dependecies

sudo apt-get install debhelper iptables-dev libcurl4-openssl-dev 
libpcre3-dev libxmlrpc-core-c3-dev markdown libavfilter-dev 
libavformat-dev libavresample-dev libevent-dev libglib2.0-dev libhiredis-dev 
libjson-glib-dev libpcap0.8-dev libpcap-dev libssl-dev dkms module-assistant 
@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
@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 / RTPEngine.md
Last active August 19, 2022 07:02
RTPEngine on Ubuntu16 to be used with Kamailio as SIP proxy

Requirnments

sudo su 

apt update -y

apt-get install debhelper iptables-dev libcurl4-openssl-dev libglib2.0-dev  libjson-glib-dev libxmlrpc-core-c3-dev libhiredis-dev build-essential:native

for pcap

<Response>
<Dial callerId="987987">
<Number>919871204072</Number>
</Dial>
</Response>
@altanai
altanai / privacypolicy.txt
Created December 18, 2018 08:41
privacy policy
Sample file
contract Owned {
address owner;
function Owned() public {
owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
<Response>
<Speak loop="5" voice="WOMAN">
Welcome to Altanai's automatic response from answer URL. Have a nice day !
</Speak>
</Response>
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")