Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

altanai altanai

🎯
Focusing
View GitHub Profile
@altanai
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
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
RTPEngine installattion on Ubuntu 18 on EC2
View RTPEngine_installattion.md

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 Apr 5, 2019
Freeswitch SIP server installation on ubuntu
View Freswitch.md

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 Apr 5, 2019
Installation of Opensips SIP server to proxy SIP messages
View Opensips.md

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 Jun 2, 2020
RTPEngine on Ubuntu16 to be used with Kamailio as SIP proxy
View RTPEngine.md

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

View iboundtrunk.xml
<Response>
<Dial callerId="987987">
<Number>919871204072</Number>
</Dial>
</Response>
View voipo.sol
contract Owned {
address owner;
function Owned() public {
owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
View speakanswer.xml
<Response>
<Speak loop="5" voice="WOMAN">
Welcome to Altanai's automatic response from answer URL. Have a nice day !
</Speak>
</Response>
View gst-python tee
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")