Skip to content

Instantly share code, notes, and snippets.

View lgaetz's full-sized avatar

Lorne Gaetz lgaetz

  • Nova Scotia, Canada
View GitHub Profile
@hgaibor
hgaibor / targeted ChanSpy with permissions
Last active January 30, 2024 15:43 — forked from lgaetz/Targeted ChanSpy
Feature code + Class of Service implementation to allow certain users to spy/whisper/barge on a specified extension. Based on Lgaetz original targeted spy, but allowing user permissions to be set with COS module on FPBX
; Feature code + Class of Service implementation to allow certain users to spy/whisper/barge on
; a specified extension.
;
; Latest version:
; https://gist.github.com/hgaibor/82433116540f15ab345b2914500abb0d
;
; Forked original version:
; https://gist.github.com/lgaetz/78c4e114952e79596c1ed4123559d3d3
;
; Usage and install instructions:
@jfinstrom
jfinstrom / README.MD
Last active August 2, 2021 20:32
FreePBX Functions and Methods

FreePBX Development tip.

It is almost always prefered to use internal functions and methods when interacting with FreePBX. This is made dificult when you don't know what those functions are. Reading the code can be tedious at times. Here is a flow to help you figure out internals.

Standard disclaimer and shameless plug.

This is provided as information only. This is a personal thing and is not supported by my employer. FreePBX is a trademark of Sangoma who also does not endorse or support this doc. While this is not an official project my employment does allow me to feed my family while giving back. Feel free to check out https://clearlyip.com . Buying from them feeds and shelters me and my offspring :)

Finding Methods for a module:

@jtsage
jtsage / sendmail.asterisk
Created March 21, 2020 21:14
Asterisk Voicemail --> MP3 w/ IBM bluemix trasnscription
#!/bin/sh
# Asterisk Voicemail -> MP3 And IBM Bluemix Transscription
#
# Based on multiple peoples work:
# Asterisk voicemail attachment conversion script
# Revision history :
# 22/11/2010 - V1.0 - Creation by N. Bernaerts
# 07/02/2012 - V1.1 - Add handling of mails without attachment (thanks to Paul Thompson)
# 01/05/2012 - V1.2 - Use mktemp, pushd & popd
# 08/05/2012 - V1.3 - Change mp3 compression to CBR to solve some smartphone compatibility (thanks to Luca Mancino)
@Yamaha32088
Yamaha32088 / addAuthorizedIPs.php
Last active October 14, 2021 11:15
FreePBX cron job script for requesting a list of authorized ip's from a remote server and adding them to a zone
<?php
/**
* Script for dynamically adding firewall rules to FreePBX from a remote host.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@tony722
tony722 / sendmail-gcloud
Last active May 5, 2024 19:47
Freepbx Voicemail Transcription Script: Google Speech API
#!/bin/sh
# sendmail-gcloud
#
# Installation instructions
# Copy the content of this file to /usr/sbin/sendmail-gcloud
#
# Google Account
# ---------------
# Create a Google Cloud account if you don't have one yet. Free trial is available at https://console.cloud.google.com/freetrial
#!/usr/bin/php
<?php
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
*
* Script: lgaetz-usermandel.php
*
* Latest version: https://gist.github.com/lgaetz/a6cc6139aefcb711a9de2f634690ceb6
*
* Usage: Scipt to delete a FreePBX User Management user. Developed for FreePBX 14
@lgaetz
lgaetz / sendmail-bluemix
Last active September 13, 2022 14:01
Asterisk voicemail mailcmd script for VM transcription
#!/bin/sh
# sendmail-bluemix
# current verison of this script: https://gist.github.com/lgaetz/2cd9c54fb1714e0d509f5f8215b3f5e6
#
#
# Original source created by N. Bernaerts: https://github.com/NicolasBernaerts/debian-scripts/tree/master/asterisk
# modified per: https://jrklein.com/2015/08/17/asterisk-voicemail-transcription-via-ibm-bluemix-speech-to-text-api/
#
#
@Ferbla
Ferbla / remotehintpoll.php
Last active March 12, 2020 17:26 — forked from lgaetz/remotehintpoll.php
Simple PHP script that checks the extension status at a remote PBX and updates a custom hint on the local pbx for proper BLF operation.
<?php
/**** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
* remotehintpoll.php
*
* Created by Lorne Gaetz lgaetz@sangoma.com
*
* Licensed under GNU GPL version 2 or any later verison.
*
* Usage:
@jfinstrom
jfinstrom / echo.sh
Last active April 30, 2020 00:39
prints out the first argument
#!/bin/bash
echo "BY USING THIS SCRIPT, YOU AGREE TO ASSUME ALL RESPONSIBILITY"
echo "FOR USE OF THE PROGRAM INCLUDED IN THIS INSTALLATION. NO WARRANTIES"
echo "EXPRESS OR IMPLIED INCLUDING MERCHANTABILITY AND FITNESS FOR PARTICULAR"
echo "USE ARE PROVIDED. YOU ASSUME ALL RISKS KNOWN AND UNKNOWN AND AGREE TO"
echo "HOLD GOATS, CHICKENS, PHIL FROM THE 3RD FLOOR, AND THE ENTIRE"
echo "WORLD HARMLESS FROM ANY AND ALL LOSS OR DAMAGE"
echo "WHICH RESULTS FROM YOUR USE OF THIS SOFTWARE. IF ANY OF THESE TERMS"
echo "AND CONDITIONS ARE RULED TO BE UNENFORCEABLE, YOU AGREE TO ACCEPT ONE"
echo "DOLLAR IN U.S. CURRENCY AS COMPENSATORY AND PUNITIVE LIQUIDATED DAMAGES"
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {