Skip to content

Instantly share code, notes, and snippets.


altanai altanai

View GitHub Profile
altanai / twilio_turn_toekn.js
Created Feb 24, 2021
Express web-server with API endpoint to get Twilio STUN/TURN with realtime token
View twilio_turn_toekn.js
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 /
Created May 22, 2020
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 /
Created Apr 5, 2019
Freeswitch SIP server installation on ubuntu

Install from Ubuntu packages

wget -O - | apt-key add -
echo "deb 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 /
Created Apr 5, 2019
Installation of Opensips SIP server to proxy SIP messages

installation from repo

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

Manual Installation


altanai /
Last active Jun 2, 2020
RTPEngine on Ubuntu16 to be used with Kamailio as SIP proxy


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

View iboundtrunk.xml
<Dial callerId="987987">
View voipo.sol
contract Owned {
address owner;
function Owned() public {
owner = msg.sender;
modifier onlyOwner {
require(msg.sender == owner);
View speakanswer.xml
<Speak loop="5" voice="WOMAN">
Welcome to Altanai's automatic response from answer URL. Have a nice day !
View gst-python tee
import gi
import time
from gi.repository import GObject, Gst
gi.require_version('Gst', '1.0')
pipeline = Gst.Pipeline()
rpicamsrc = Gst.ElementFactory.make("rpicamsrc", "rpicam")