Skip to content

Instantly share code, notes, and snippets.

View adeshpandey's full-sized avatar
💭
Fighting for the one :)

Adesh Pandey adeshpandey

💭
Fighting for the one :)
View GitHub Profile
var params = {host:"genius.host"}
function register(scriptParams) {
params = scriptParams;
}
function register()
function process(event) {
event.Tag("js");
event.Put("event.host",params.host)
}
filebeat.inputs:
- type: log
paths:
- /logs/app.log
processors:
- script:
lang: javascript
file: ${path.config}/my-script.js
output.kafka:
hosts:
version: "3.7"
services:
zookeeper:
image: confluentinc/cp-zookeeper:6.2.1
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- "22181:2181"
kafka:
#!KAMAILIO
#!define DBURL "mysql://mysql_user:mysql_pass@localhost/kamailio"
#!substdef "!MY_IP_ADDR!LOCAL_IP_ADDRESS!g"
#!substdef "!MY_DOMAIN!PUBLIC_DOMAIN!g"
#!substdef "!MY_WS_PORT!8080!g"
#!substdef "!MY_WSS_PORT!8081!g"
#!substdef "!MY_WS_ADDR!tcp:MY_IP_ADDR:MY_WS_PORT!g"
wget -O- https://deb.kamailio.org/kamailiodebkey.gpg | sudo apt-key add -
echo "deb http://deb.kamailio.org/kamailio52 bionic main" | tee -a /etc/apt/sources.list.d/kamailio.list
echo "deb-src http://deb.kamailio.org/kamailio52 bionic main" >> /etc/apt/sources.list.d/kamailio.list
apt update & apt install -y kamailio
@adeshpandey
adeshpandey / install_asterisk_ubuntu.sh
Last active January 6, 2016 05:31
one click setup for asterisk 13
#!/bin/bash
apt-get install git-core subversion libjansson-dev sqlite autoconf automake libtool libxml2-dev libncurses5-dev libsrtp0 libsrtp0-dev
apt-get update
cd /usr/src/
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
tar –xzvf asterisk-13-current.tar.gz
cd asterisk-13.6.0/
./contrib/scripts/install_prereq install-sh
./contrib/scripts/install_prereq install