This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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: | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# | |
########################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('phpagi.php'); | |
$agi = new AGI(); | |
$clid = $agi->request['agi_callerid']; // -Caller ID | |
$dest = $agi->request['agi_dnid']; // -Destination id | |
$uid = $agi->request['agi_uniqueid']; | |
$rdnis =$agi->request['agi_rdnis']; //Redirected Dialed Number Information Service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$m = new MongoClient(); | |
// select a database | |
$db = $m->seq; | |
// select a collection (analogous to a relational database's table) | |
$collection = $db->counters; | |
$user_collection = $db->user; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
header('Content-Description: File Transfer'); | |
header('Content-Type: application/octet-stream'); | |
header('Content-Disposition: attachment; filename='.basename($destination_name_ulaw)); | |
header('Content-Transfer-Encoding: binary'); | |
header('Expires: 0'); | |
header('Cache-Control: must-revalidate'); | |
header('Pragma: public'); | |
header('Content-Length: ' . filesize($destination_name_ulaw)); | |
ob_clean(); | |
flush(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$words ="dilli%20bharat%20ki%20rajdhani%20hey"; | |
$file = "sample.wav"; | |
if (!file_exists($file)) { | |
$mp3 = file_get_contents('http://translate.google.com/translate_tts?tl=hi&q='.$words); | |
file_put_contents($file, $mp3); | |
} | |
?> | |
NewerOlder