Skip to content

Instantly share code, notes, and snippets.

View debojitkakoti's full-sized avatar

DEBOJIT KAKOTI debojitkakoti

View GitHub Profile
@debojitkakoti
debojitkakoti / asterisk_zombie_kill.sh
Last active August 29, 2015 14:15
Asterisk zombie killing
#!/bin/sh
###########################################################################
#
# clean-up Asterisk zombies
# file asterisk_zombie_kill.sh
# Description: clean_up all parent dead Asterisk AGI processes, v 1.0 2006/05/10 bb Exp $
#
# cron task */30 * * * * root /usr/local/sbin/clean_up.sh
#
###########################################################################
@debojitkakoti
debojitkakoti / meetme
Created June 30, 2015 06:45
asterisk meetme table for real time conference setup
CREATE TABLE `meetmes` (
`bookid` INT(11) NOT NULL AUTO_INCREMENT,
`created` DATETIME NOT NULL,
`confno` INT(10) NULL DEFAULT NULL,
`pin` INT(10) NULL DEFAULT NULL,
`adminpin` CHAR(20) NULL DEFAULT NULL,
`opts` CHAR(20) NULL DEFAULT NULL,
`adminopts` CHAR(20) NULL DEFAULT NULL,
`maxusers` INT(11) NOT NULL DEFAULT '10',
`members` INT(11) NULL DEFAULT NULL,
@debojitkakoti
debojitkakoti / extconfig.conf
Created June 30, 2015 06:51
extconfig.conf for asterisk real time
; Static and realtime external configuration
; engine configuration
;
; See https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration
; for basic table formatting information.
;
[settings]
;
; Static configuration files:
;
@debojitkakoti
debojitkakoti / conference
Created June 30, 2015 07:01
conferece dialplan
[conf_miss_conference]
exten => _X.,1,Ringing()
exten => _X.,n,Wait(2)
exten => _X.,n,AGI(example.php);your agi script here use pin based authentication here
exten => _X.,n,Set(MEETME_RECORDINGFILE=/var/spool/asterisk/meetme/${UNIQUEID});your conference recording location
exten => _X.,n,MeetMe(${conference_id},rM,${conference_pin});get the conference id and pin dynamically from example.php
exten => h,1,AGI(billing.php);handle billing and other stuff here
@debojitkakoti
debojitkakoti / default
Last active October 14, 2016 05:06
Reverse Proxy with Nginx, HHVM and PHP FPM
upstream BACKEND {
server 127.0.0.1:9000; #HHVM
server unix:/var/run/php5-fpm.sock backup; #PHP-FPM in backup mode
}
server {
listen 80;
server_name YOUR_SERVER_IP;
root /var/www/sampleapp/app/webroot/;
@debojitkakoti
debojitkakoti / gps_track_server.py
Created June 20, 2016 13:10 — forked from gruzovator/gps_track_server.py
Async TCP server example (using standard python lib asyncore)
#!/usr/bin/env python
''' Async TCP server to make first tests of newly received GPS trackers '''
import asyncore
import socket
import logging
class Server(asyncore.dispatcher):
def __init__(self, address):
asyncore.dispatcher.__init__(self)